<?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: Using C# class library in Fortran in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867103#M70997</link>
    <description>&lt;P&gt;C# and Fortran arrays differ in that they are 0- and 1- basedand are the transposes of each other.&lt;/P&gt;
&lt;P&gt;It is possible to export from a C# DLL so that its classes can be accessed by unmanaged clients (Fortran, VC++,...) via the Windows API's LoadLibrary and GetProcessAddress and the use of pointers. Basically you disassemble the managed DLL without exportsvia ILDASM, edit the IL code to apply VT fixups, specify names of exports and their order in the VT, and reassemble the edited IL via ILASM to produce a new copy of the DLLwith exports. This is trivial to do but tedious. I've attached a zip with the before and after DLL's. Open them up with the Depends utility to observe their difference. MathFunctions.Dll is the managed while MF.Dll is also managed but has unmanaged exports.&lt;/P&gt;
&lt;P&gt;Gerry&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2008 21:33:12 GMT</pubDate>
    <dc:creator>g_f_thomas</dc:creator>
    <dc:date>2008-01-15T21:33:12Z</dc:date>
    <item>
      <title>Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867097#M70991</link>
      <description>Dear Formula Translators,&lt;BR /&gt;&lt;BR /&gt;I have created a c# class library with which I can create/write etc to Access databases. Now I want to create a Fortran library that "translates" this dll, so it can be used by my collegues using Fortran only. Does anybody have a workaround? Should I do more in C# than simply creating a Class that is called Mdb which contains methods to e.g. open an access database? (The other way around I had to use dllimport statements to import a FortranDll in C#).&lt;BR /&gt;&lt;BR /&gt;Cheers Arjen&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jan 2008 08:05:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867097#M70991</guid>
      <dc:creator>sjors</dc:creator>
      <dc:date>2008-01-14T08:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867098#M70992</link>
      <description>You may find that the Fortran Module Wizard helps here - it will read a .NET assembly or type library DLL and create a Fortran module with interfaces. How well it works for you depends on how you coded the C#. I have never used it for this purpose so can't provide specifics, but start by reading the documentation on the Module Wizard.&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jan 2008 15:44:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867098#M70992</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-01-14T15:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867099#M70993</link>
      <description>&lt;P&gt;Dear Steve,&lt;/P&gt;
&lt;P&gt;Thank you for your answer, this helped a lot.I managed to get it working, after quite some trial and errors. I first had to add some interfaces to my c# code, andhave the"Generate code that uses Automation Interfaces" box checked. Otherwise functions are created witharguments of integer type only, whereas I also use floats/doubles/strings.&lt;/P&gt;
&lt;P&gt;There seems to be one problem left. When I try to call a subroutine with arrays as arguments, the corresponding c# method is not called at all. If I change my c#-method to no arrays it works fine. I don't understand why it fails. The generated Fortran-code seems fine to me. Below follows an example which writes real(4) values to a column in a access database table. Do you see any problems in the code?&lt;/P&gt;
&lt;P&gt;Thanks for helping me in advance!&lt;/P&gt;
&lt;P&gt;Cheers Arjen&lt;/P&gt;
&lt;P&gt;C#-interface:&lt;/P&gt;&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;void&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;&lt;FONT size="2"&gt; WriteDataSP(&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;string&lt;/FONT&gt;&lt;FONT size="2"&gt; tableName, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;string&lt;/FONT&gt;&lt;FONT size="2"&gt; columnName, &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;float&lt;/FONT&gt;&lt;FONT size="2"&gt;[] varValues);&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;generated Fortran-code:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;SUBROUTINE&lt;/FONT&gt;&lt;FONT size="2"&gt; iMdb_WriteDataSP&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;$OBJECT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; tableName&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; columnName&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; varValues&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; $STATUS&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;IMPLICIT NONE&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTEGER&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#ca0000" size="2"&gt;INT_PTR_KIND&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;()),&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;::&lt;/FONT&gt;&lt;FONT size="2"&gt; $OBJECT &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;! Object Pointer&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#008000" size="2"&gt;!DEC$ ATTRIBUTES VALUE :: $OBJECT&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CHARACTER&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;LEN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;=*),&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;::&lt;/FONT&gt;&lt;FONT size="2"&gt; tableName &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;! BSTR&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CHARACTER&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;LEN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;=*),&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;::&lt;/FONT&gt;&lt;FONT size="2"&gt; columnName &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;! BSTR&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;REAL(4)&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;DIMENSI
ON&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(:),&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;::&lt;/FONT&gt;&lt;FONT size="2"&gt; varValues &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;! (SafeArray)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#008000" size="2"&gt;!DEC$ ATTRIBUTES REFERENCE :: varValues&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTEGER(4)&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;OUT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;),&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;OPTIONAL&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;::&lt;/FONT&gt;&lt;FONT size="2"&gt; $STATUS &lt;/FONT&gt;&lt;FONT color="#008000" size="2"&gt;! Method status&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;B&gt;&lt;FONT color="#008000" size="2"&gt;!DEC$ ATTRIBUTES REFERENCE :: $STATUS&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/B&gt;&lt;FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTEGER(4)&lt;/FONT&gt;&lt;FONT size="2"&gt; $$STATUS&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;INTEGER&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#ca0000" size="2"&gt;INT_PTR_KIND&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;())&lt;/FONT&gt;&lt;FONT size="2"&gt; invokeargs&lt;P&gt;&lt;/P&gt;&lt;P&gt;invokeargs &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;=&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTOALLOCATEINVOKEARGS&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;()&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTOADDARG&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;invokeargs&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#ff00ff" size="2"&gt;'$ARG1'&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; tableName&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTO_ARG_IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; VT_BSTR&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTOADDARG&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;invokeargs&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#ff00ff" size="2"&gt;'$ARG2'&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; columnName&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTO_ARG_IN&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; VT_BSTR&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTOADDARG&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;invokeargs&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#ff00ff" size="2"&gt;'$ARG3'&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; varValues&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;$$STATUS &lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;=&lt;/FONT&gt;&lt;FONT size="2"&gt; AUTOINVOKE&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;$OBJECT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; 1610743813&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;,&lt;/FONT&gt;&lt;FONT size="2"&gt; invokeargs&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;IF&lt;/FONT&gt;&lt;FONT size="2"&gt; &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT color="#ca0000" size="2"&gt;PRESENT&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;$STATUS&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;))&lt;/FONT&gt;&lt;FONT size="2"&gt; $STATUS &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;=&lt;/FONT&gt;&lt;FONT size="2"&gt; $$STATUS&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;CALL&lt;/FONT&gt;&lt;FO nt="" size="2"&gt; AUTODEALLOCATEINVOKEARGS &lt;FONT color="#008080" size="2"&gt;(&lt;/FONT&gt;&lt;FONT size="2"&gt;invokeargs&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;)&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" size="2"&gt;END SUBROUTINE&lt;/FONT&gt;&lt;FONT size="2"&gt; iMdb_WriteDataSP&lt;/FONT&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FO&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jan 2008 09:49:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867099#M70993</guid>
      <dc:creator>sjors</dc:creator>
      <dc:date>2008-01-15T09:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867100#M70994</link>
      <description>I'll admit that my understanding of COM and automation is tenuous. I don't see anything obvious here, but have you checked the value of the $STATUS return?&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Jan 2008 14:02:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867100#M70994</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-01-15T14:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867101#M70995</link>
      <description>&lt;P&gt;I checked the $STATUS and it is a very negative number, indicating it didn't work. A workaround would be not to use arrays, but it should be possible somehow. Maybe my c#-class is not properly defined? It works fine in c# though...Do you oranybodyelse have an example of a dll in which arrays work using code from the Module Wizard?&lt;/P&gt;
&lt;P&gt;Cheers Arjen&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2008 15:44:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867101#M70995</guid>
      <dc:creator>sjors</dc:creator>
      <dc:date>2008-01-15T15:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867102#M70996</link>
      <description>The provided COMAUTODICE sample does this, but I am not sure if it is directly applicable to your situation.&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Jan 2008 16:51:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867102#M70996</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2008-01-15T16:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867103#M70997</link>
      <description>&lt;P&gt;C# and Fortran arrays differ in that they are 0- and 1- basedand are the transposes of each other.&lt;/P&gt;
&lt;P&gt;It is possible to export from a C# DLL so that its classes can be accessed by unmanaged clients (Fortran, VC++,...) via the Windows API's LoadLibrary and GetProcessAddress and the use of pointers. Basically you disassemble the managed DLL without exportsvia ILDASM, edit the IL code to apply VT fixups, specify names of exports and their order in the VT, and reassemble the edited IL via ILASM to produce a new copy of the DLLwith exports. This is trivial to do but tedious. I've attached a zip with the before and after DLL's. Open them up with the Depends utility to observe their difference. MathFunctions.Dll is the managed while MF.Dll is also managed but has unmanaged exports.&lt;/P&gt;
&lt;P&gt;Gerry&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2008 21:33:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867103#M70997</guid>
      <dc:creator>g_f_thomas</dc:creator>
      <dc:date>2008-01-15T21:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using C# class library in Fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867104#M70998</link>
      <description>I looked at your two versions of the dlls and found a good example to disassemle and reassemble my own dll in the way you said. Furthermore I used to DLL sample as an example to load the library and get the process addresses. However, I get exceptions when I try to call a function or subroutine. I also tried your dll in this way, and that works fine so there is probably still a problem in my C#-code. For now I have a working Fortran library using methods without arrays. Thanks for all the help and advice!&lt;BR /&gt;&lt;BR /&gt;Cheers Arjen&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jan 2008 19:21:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Using-C-class-library-in-Fortran/m-p/867104#M70998</guid>
      <dc:creator>sjors</dc:creator>
      <dc:date>2008-01-16T19:21:27Z</dc:date>
    </item>
  </channel>
</rss>

