<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Common interface for mixed-language DLL in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844502#M62471</link>
    <description>Me again :-). We develop a scientific-calculation dll with reasonably big interface (~100 structure types and ~30 exported functions). The dll is to be called from C++ (on customer's request) or Delphi (our GUI team language). We utilize the following "algorithm":&lt;BR /&gt;&lt;BR /&gt;1) Write the documentation for structure/function in C++ (actually, C) in "Windows API" style. Document the prototype in C there.&lt;BR /&gt;2) Paste it to ourdll.h header file. &lt;BR /&gt;3) Paste it to ourdll.f90 module (which doesn't contain INTERFACEs to self, but must contain all TYPEs and PARAMETERs). Use a little macro for rough translation C-&amp;gt;Fortran, then fix by hand.&lt;BR /&gt;4) Translate C header to ourdll.pas using a tool we found on the net (don't have URL at hand, if you need it I'll find it). It does a lot of job but has to be hand-fixed again. (C-&amp;gt;Fortran is generally easy to automate, but C-&amp;gt;Delphi is tricky due to "reverse syntax".)&lt;BR /&gt;&lt;BR /&gt;For routines generally, we use STDCALL, ALIAS: "_MixedCaseName@n":: MixedCaseName.&lt;BR /&gt;&lt;BR /&gt;As you see, the entire algorithm requires a lot of discipline and care. Unfortunately, I can't provide much helpful advice for routines; we do their translation by hand since INTERFACEs blocks and C declarations are rather dissimilar.&lt;BR /&gt;&lt;BR /&gt;Jugoslav</description>
    <pubDate>Thu, 06 Jun 2002 23:34:41 GMT</pubDate>
    <dc:creator>Jugoslav_Dujic</dc:creator>
    <dc:date>2002-06-06T23:34:41Z</dc:date>
    <item>
      <title>Common interface for mixed-language DLL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844501#M62470</link>
      <description>We provide Visual Fortran DLLs to internal and external customers who use Visual Basic, Visual C++ and Delphi.  I'm trying to standardize the interface used so that we can accommodate our customers without requiring a lot of work on their part.&lt;BR /&gt;&lt;BR /&gt;My inclination is to mimic the Windows API calls and require VB/Delphi to do likewise.  Since both languages support such calls, this choice seems natural.  Ideally, I could set up an INTERFACE block in every DLL with all of the DEC$ ATTRIBUTES, etc. preset.  Once that is done, providing sample VB declarations, C++ headers, and Delphi definitions would be simplified.&lt;BR /&gt;&lt;BR /&gt;I would appreciate any suggestions the user community has on dealing with these issues.</description>
      <pubDate>Thu, 06 Jun 2002 00:48:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844501#M62470</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2002-06-06T00:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: Common interface for mixed-language DLL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844502#M62471</link>
      <description>Me again :-). We develop a scientific-calculation dll with reasonably big interface (~100 structure types and ~30 exported functions). The dll is to be called from C++ (on customer's request) or Delphi (our GUI team language). We utilize the following "algorithm":&lt;BR /&gt;&lt;BR /&gt;1) Write the documentation for structure/function in C++ (actually, C) in "Windows API" style. Document the prototype in C there.&lt;BR /&gt;2) Paste it to ourdll.h header file. &lt;BR /&gt;3) Paste it to ourdll.f90 module (which doesn't contain INTERFACEs to self, but must contain all TYPEs and PARAMETERs). Use a little macro for rough translation C-&amp;gt;Fortran, then fix by hand.&lt;BR /&gt;4) Translate C header to ourdll.pas using a tool we found on the net (don't have URL at hand, if you need it I'll find it). It does a lot of job but has to be hand-fixed again. (C-&amp;gt;Fortran is generally easy to automate, but C-&amp;gt;Delphi is tricky due to "reverse syntax".)&lt;BR /&gt;&lt;BR /&gt;For routines generally, we use STDCALL, ALIAS: "_MixedCaseName@n":: MixedCaseName.&lt;BR /&gt;&lt;BR /&gt;As you see, the entire algorithm requires a lot of discipline and care. Unfortunately, I can't provide much helpful advice for routines; we do their translation by hand since INTERFACEs blocks and C declarations are rather dissimilar.&lt;BR /&gt;&lt;BR /&gt;Jugoslav</description>
      <pubDate>Thu, 06 Jun 2002 23:34:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844502#M62471</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2002-06-06T23:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Common interface for mixed-language DLL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844503#M62472</link>
      <description>OK I admit I am a computer moron. But my System Configiration saysI have 3 versions of "Intel  Common User Interface" up and running. Is this normal or am I just being paranoid?</description>
      <pubDate>Tue, 01 Apr 2008 02:48:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844503#M62472</guid>
      <dc:creator>rellion</dc:creator>
      <dc:date>2008-04-01T02:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Common interface for mixed-language DLL</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844504#M62473</link>
      <description>That has no connection with the Intel Visual Fortran compiler product - sounds like a motherboard feature. Try asking at the (not affiliated with Intel) &lt;A href="http://www.abxzone.com/"&gt;ABX Zone Forums&lt;/A&gt;.&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Apr 2008 14:16:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Common-interface-for-mixed-language-DLL/m-p/844504#M62473</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-04-01T14:16:27Z</dc:date>
    </item>
  </channel>
</rss>

