<?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 COM Server DLL in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/COM-Server-DLL/m-p/988232#M27686</link>
    <description>Hello all, &lt;BR /&gt; &lt;BR /&gt;I posted the message below on the Intel Forum, but have not received a response.  So here it goes again.  Please note  that the subroutine I list below is just an example, and in my application I have very involved code impossible to post here. &lt;BR /&gt; &lt;BR /&gt;I have been working on converting several Fortran DLLs first to DLLs callable from Visual Basic, and now to DLLs callable from VBScript. &lt;BR /&gt; &lt;BR /&gt;I succeeded in the first task (call Visual Fortran from Visual Basic) with no problem.  Now I need help converting my Fortran subroutines to COM DLLs callable from VBScript.  I am able to do it when my Fortran subroutine returns only one value.  However, I do not know what to do for cases when the subroutine returns several output values.  I understand that when I specify arguments for object methods in the Fortran COM Server Wizard, only one argument with Intent Out can have a return value.  This makes sense since object methods are functions, but what to do about subroutines?  I was under impression that COM Server Wizard will create a wrapper, and implementation of the method is cut and paste of my original Fortran DLL.  Where am I going wrong and what am I missing?  Do I need to completely re-write my Fortran subroutines if they return more than one argument? &lt;BR /&gt; &lt;BR /&gt;A simple Fortran subroutine is listed below.  It takes three input arguments (integer, string, and float) and returns integer tripled, a concatenated string, and the float doubled. &lt;BR /&gt; &lt;BR /&gt;SUBROUTINE Test_VB (INT_ARG, STR_IN, FLOAT_ARG, INT_OUT, STR_OUT, NUM) &lt;BR /&gt;IMPLICIT NONE &lt;BR /&gt; &lt;BR /&gt;! Specify that Test_VB is exported to a DLL &lt;BR /&gt;! and that the external name is 'Test_VB' &lt;BR /&gt;!DEC$ ATTRIBUTES DLLEXPORT :: Test_VB &lt;BR /&gt;!DEC$ ATTRIBUTES ALIAS:'Test_VB' :: Test_VB &lt;BR /&gt; &lt;BR /&gt;INTEGER INT_ARG,INT_OUT &lt;BR /&gt;REAL FLOAT_ARG,NUM &lt;BR /&gt;CHARACTER*(*) STR_IN, STR_OUT &lt;BR /&gt; &lt;BR /&gt;! This routine converts INT_ARG to a string, &lt;BR /&gt;! appends the string value to STR_IN and stores it &lt;BR /&gt;! in STR_OUT. It also triples the integer and doubles &lt;BR /&gt;! the float. &lt;BR /&gt;! &lt;BR /&gt; &lt;BR /&gt;CHARACTER*5 INT_STR &lt;BR /&gt; &lt;BR /&gt;WRITE (INT_STR,'(I5)') INT_ARG &lt;BR /&gt;INT_OUT = 3*INT_ARG &lt;BR /&gt;STR_OUT = STR_IN // INT_STR &lt;BR /&gt;NUM = FLOAT_ARG*2.0 &lt;BR /&gt;			 &lt;BR /&gt;RETURN &lt;BR /&gt;END &lt;BR /&gt; &lt;BR /&gt;Please let me know what I would need to specify in the Fortran COM Server Wizard to make this work.  Again, I was able to get this to work as COM DLLs from ASP when I separated the Fortran routine into three routines returning one value each. &lt;BR /&gt; &lt;BR /&gt;Your help is greatly appreciated. &lt;BR /&gt; &lt;BR /&gt;Maria.</description>
    <pubDate>Mon, 22 Apr 2002 21:57:26 GMT</pubDate>
    <dc:creator>maria14</dc:creator>
    <dc:date>2002-04-22T21:57:26Z</dc:date>
    <item>
      <title>COM Server DLL</title>
      <link>https://community.intel.com/t5/Software-Archive/COM-Server-DLL/m-p/988232#M27686</link>
      <description>Hello all, &lt;BR /&gt; &lt;BR /&gt;I posted the message below on the Intel Forum, but have not received a response.  So here it goes again.  Please note  that the subroutine I list below is just an example, and in my application I have very involved code impossible to post here. &lt;BR /&gt; &lt;BR /&gt;I have been working on converting several Fortran DLLs first to DLLs callable from Visual Basic, and now to DLLs callable from VBScript. &lt;BR /&gt; &lt;BR /&gt;I succeeded in the first task (call Visual Fortran from Visual Basic) with no problem.  Now I need help converting my Fortran subroutines to COM DLLs callable from VBScript.  I am able to do it when my Fortran subroutine returns only one value.  However, I do not know what to do for cases when the subroutine returns several output values.  I understand that when I specify arguments for object methods in the Fortran COM Server Wizard, only one argument with Intent Out can have a return value.  This makes sense since object methods are functions, but what to do about subroutines?  I was under impression that COM Server Wizard will create a wrapper, and implementation of the method is cut and paste of my original Fortran DLL.  Where am I going wrong and what am I missing?  Do I need to completely re-write my Fortran subroutines if they return more than one argument? &lt;BR /&gt; &lt;BR /&gt;A simple Fortran subroutine is listed below.  It takes three input arguments (integer, string, and float) and returns integer tripled, a concatenated string, and the float doubled. &lt;BR /&gt; &lt;BR /&gt;SUBROUTINE Test_VB (INT_ARG, STR_IN, FLOAT_ARG, INT_OUT, STR_OUT, NUM) &lt;BR /&gt;IMPLICIT NONE &lt;BR /&gt; &lt;BR /&gt;! Specify that Test_VB is exported to a DLL &lt;BR /&gt;! and that the external name is 'Test_VB' &lt;BR /&gt;!DEC$ ATTRIBUTES DLLEXPORT :: Test_VB &lt;BR /&gt;!DEC$ ATTRIBUTES ALIAS:'Test_VB' :: Test_VB &lt;BR /&gt; &lt;BR /&gt;INTEGER INT_ARG,INT_OUT &lt;BR /&gt;REAL FLOAT_ARG,NUM &lt;BR /&gt;CHARACTER*(*) STR_IN, STR_OUT &lt;BR /&gt; &lt;BR /&gt;! This routine converts INT_ARG to a string, &lt;BR /&gt;! appends the string value to STR_IN and stores it &lt;BR /&gt;! in STR_OUT. It also triples the integer and doubles &lt;BR /&gt;! the float. &lt;BR /&gt;! &lt;BR /&gt; &lt;BR /&gt;CHARACTER*5 INT_STR &lt;BR /&gt; &lt;BR /&gt;WRITE (INT_STR,'(I5)') INT_ARG &lt;BR /&gt;INT_OUT = 3*INT_ARG &lt;BR /&gt;STR_OUT = STR_IN // INT_STR &lt;BR /&gt;NUM = FLOAT_ARG*2.0 &lt;BR /&gt;			 &lt;BR /&gt;RETURN &lt;BR /&gt;END &lt;BR /&gt; &lt;BR /&gt;Please let me know what I would need to specify in the Fortran COM Server Wizard to make this work.  Again, I was able to get this to work as COM DLLs from ASP when I separated the Fortran routine into three routines returning one value each. &lt;BR /&gt; &lt;BR /&gt;Your help is greatly appreciated. &lt;BR /&gt; &lt;BR /&gt;Maria.</description>
      <pubDate>Mon, 22 Apr 2002 21:57:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/COM-Server-DLL/m-p/988232#M27686</guid>
      <dc:creator>maria14</dc:creator>
      <dc:date>2002-04-22T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server DLL</title>
      <link>https://community.intel.com/t5/Software-Archive/COM-Server-DLL/m-p/988233#M27687</link>
      <description>Please be patient, and use the Intel forum.  This Compaq-hosted forum will be closed for new entries within a day or so.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 22 Apr 2002 22:36:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/COM-Server-DLL/m-p/988233#M27687</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2002-04-22T22:36:37Z</dc:date>
    </item>
  </channel>
</rss>

