<?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: COM Server Array Passing in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795031#M34677</link>
    <description>But as far as I can tell fortran doesn't support safe arrays so I'm attempting to pass fundamentally different types across the interface?  Even the one-dimensional case only works if the array I pass is of fixed size at compile time - any attempt to dynamically allocate an array and pass it (both as an allocatable array or a pointer) and I just get zeros passed across the interface.&lt;BR /&gt;&lt;BR /&gt;Roger</description>
    <pubDate>Mon, 04 Aug 2003 15:25:02 GMT</pubDate>
    <dc:creator>roger_wilson</dc:creator>
    <dc:date>2003-08-04T15:25:02Z</dc:date>
    <item>
      <title>COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795025#M34671</link>
      <description>I'm trying to create a COM server passing dynamically sized arrays back and forth - i.e. the server doesn't know how big the arrays will be before they arrive and return arrays are dynamically within the server.&lt;BR /&gt;&lt;BR /&gt;I don't see how this can be done using the COM Server wizard which requires that the bounds of arrays are specified.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any idea how to do this or even better any example code.  The examples in the documentation do not cover the case of array properties at all.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Roger</description>
      <pubDate>Fri, 01 Aug 2003 19:20:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795025#M34671</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-01T19:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795026#M34672</link>
      <description>Does &lt;A href="http://www.canaimasoft.com/f90VB/OnlineManuals/UserManual/TH_17.htm"&gt;this link&lt;/A&gt; help?</description>
      <pubDate>Fri, 01 Aug 2003 21:10:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795026#M34672</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2003-08-01T21:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795027#M34673</link>
      <description>I'm puzzled by the wording of your question. At _some_ point, the array size _is_ know at which time you can pass it here and there with ease.&lt;BR /&gt;&lt;BR /&gt;If your arrays (or data structures for that matter) are large using COM involves significant overhead. Stuff all into a a byte array and then use the CopyMemory API to pass a pointer to the byte array on to the recipient.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Gerry T.</description>
      <pubDate>Fri, 01 Aug 2003 23:37:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795027#M34673</guid>
      <dc:creator>gfthomas8</dc:creator>
      <dc:date>2003-08-01T23:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795028#M34674</link>
      <description>thanks very much, I'll get a copy and try it.</description>
      <pubDate>Fri, 01 Aug 2003 23:51:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795028#M34674</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-01T23:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795029#M34675</link>
      <description>I'm sure you're right and that it is possible.  I think its more a limitation in the COM Sever Wizard for Visual Fortran than a fundamentally impossible task.&lt;BR /&gt;&lt;BR /&gt;The COM server wizard seems to require that the rank and bounds of array properties are specified at compile time.  I can compile a com server where I dynamically allocate the property that I am trying to pass but get a RankMismatch exception when the .NET runtime I'm using to communicate with the server attempts to read the property.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 01 Aug 2003 23:56:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795029#M34675</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-01T23:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795030#M34676</link>
      <description>The COM wizard rightly assumes that you're going to use SafeArrays. The RankMismatch error is probably because you're passing rectangular arrays to .NET whose rows are Fortran columns. Pass the transpose and cross your fingers.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Gerry T.</description>
      <pubDate>Sat, 02 Aug 2003 02:19:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795030#M34676</guid>
      <dc:creator>gfthomas8</dc:creator>
      <dc:date>2003-08-02T02:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795031#M34677</link>
      <description>But as far as I can tell fortran doesn't support safe arrays so I'm attempting to pass fundamentally different types across the interface?  Even the one-dimensional case only works if the array I pass is of fixed size at compile time - any attempt to dynamically allocate an array and pass it (both as an allocatable array or a pointer) and I just get zeros passed across the interface.&lt;BR /&gt;&lt;BR /&gt;Roger</description>
      <pubDate>Mon, 04 Aug 2003 15:25:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795031#M34677</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-04T15:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795032#M34678</link>
      <description>Just because SafeArrays are not part of Fortran doesn't mean you can't use them. CVF has a number of modules with interfaces to the appropriate APIs.&lt;BR /&gt;&lt;BR /&gt;Look in SAMPLES/MIXLANG/ARRAY.&lt;BR /&gt;Also, look at its modification NewArrays.zip at ftp://users.jagunet.com/pub/users/jtermine/VBstrings/&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Gerry T.</description>
      <pubDate>Mon, 04 Aug 2003 19:03:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795032#M34678</guid>
      <dc:creator>gfthomas8</dc:creator>
      <dc:date>2003-08-04T19:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795033#M34679</link>
      <description>Gerry&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Just because SafeArrays are not part of Fortran&lt;BR /&gt;&amp;gt; doesn't mean you can't use them. CVF has a number of&lt;BR /&gt;&amp;gt; modules with interfaces to the appropriate APIs.&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; Look in SAMPLES/MIXLANG/ARRAY.&lt;BR /&gt;&lt;BR /&gt;Where would I find this, as part of the installation? Don't seem to have it.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Also, look at its modification NewArrays.zip at&lt;BR /&gt;&amp;gt; ftp://users.jagunet.com/pub/users/jtermine/VBstrings/&lt;BR /&gt;&lt;BR /&gt;Couldn't get here as anonymous user.  Anywhere else I might find it?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; HTH,&lt;BR /&gt;&amp;gt; Gerry T.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Roger</description>
      <pubDate>Mon, 04 Aug 2003 21:03:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795033#M34679</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-04T21:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795034#M34680</link>
      <description>The samples are installed under Program FilesMicrosoft Visual StudioDF98SAMPLES.  You may or may not have the samples installed to your hard disk, depending on what version of CVF you first installed and whether you selected a standard or custom install.  The samples are on the CD-ROM under INFODFSAMPLES.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 04 Aug 2003 21:24:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795034#M34680</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2003-08-04T21:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795035#M34681</link>
      <description>Roger,&lt;BR /&gt;&lt;BR /&gt;I've attached the NewArrays.zip, courtesy of John Termine.&lt;BR /&gt;&lt;BR /&gt;Ciao,&lt;BR /&gt;Gerry T.&lt;BR /&gt;&lt;BR /&gt;ps&lt;BR /&gt;Where is John, anybody?</description>
      <pubDate>Mon, 04 Aug 2003 21:53:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795035#M34681</guid>
      <dc:creator>gfthomas8</dc:creator>
      <dc:date>2003-08-04T21:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795036#M34682</link>
      <description>Thanks very much.&lt;BR /&gt;&lt;BR /&gt;Seem to have lost or not installed my samples.  Will be playing hunt the CD for the rest of the day.&lt;BR /&gt;&lt;BR /&gt;Roger</description>
      <pubDate>Mon, 04 Aug 2003 22:05:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795036#M34682</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-04T22:05:38Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795037#M34683</link>
      <description>Re John: Hope I'm not too discourteous by publishing a private e-mail from last September:&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;Hi Jugoslav,&lt;BR /&gt;&lt;BR /&gt;How are you doing?  And how are all my VF friends?  Hope everyone is well. I am alive!  Well?  Well that's a tougher question! Nah, everything's fine.  Just doing different stuff. Over the last year I became responsible for the I/T departments for my division in the US. Haven't written any code in a long while.  Bummer.  Actually, I wrote a small C++ program a little while ago (something to do with Windows Terminal Server API), nothing all that cool really.  Hope you are well.  Apolgies for the SEVEN MONTH lag in replying.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;JT&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;We miss you John.&lt;BR /&gt;&lt;BR /&gt;Jugoslav&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Aug 2003 15:40:56 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795037#M34683</guid>
      <dc:creator>Jugoslav_Dujic</dc:creator>
      <dc:date>2003-08-05T15:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: COM Server Array Passing</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795038#M34684</link>
      <description>I've looked at the ARRAYS example and come up with this simple bit of code f90 code which I build into a dll...&lt;BR /&gt;&lt;BR /&gt;!  mc1.f90 &lt;BR /&gt;!&lt;BR /&gt;!  FUNCTIONS/SUBROUTINES exported from mc1.dll:&lt;BR /&gt;!	mc1      - subroutine &lt;BR /&gt;!&lt;BR /&gt;subroutine mc1(a)&lt;BR /&gt;&lt;BR /&gt;  !dec$ attributes dllexport, stdcall, alias : "mc1" :: mc1&lt;BR /&gt;  !dec$ attributes reference :: a&lt;BR /&gt;&lt;BR /&gt;  use dfcom&lt;BR /&gt;&lt;BR /&gt;  implicit none&lt;BR /&gt;&lt;BR /&gt;  ! Interface.&lt;BR /&gt;  pointer (a, SADummy)   !Pointer to a SafeArray structure  &lt;BR /&gt;  integer SAdummy   &lt;BR /&gt;&lt;BR /&gt;  ! Locals&lt;BR /&gt;  integer :: iRes, lbound, ubound&lt;BR /&gt;&lt;BR /&gt;  iRes = SafeArrayGetUBound(a, 1, ubound)&lt;BR /&gt;  iRes = SafeArrayGetLBound(a, 1, lbound)&lt;BR /&gt;&lt;BR /&gt;  open(99, file="c:temptest.txt", status='unknown')&lt;BR /&gt;  write(99,*)"upper bound = ",ubound&lt;BR /&gt;  write(99,*)"lower bound = ",lbound&lt;BR /&gt;  close(99)&lt;BR /&gt;&lt;BR /&gt;end subroutine mc1&lt;BR /&gt;&lt;BR /&gt;When I declare the interface to be Double[]  and attempt to call it with the .NET runtime by passing it a Double[] I get two zeros in the log file for the upper and lower bounds and the array back intact.&lt;BR /&gt;&lt;BR /&gt;If I declare the interface to be "ByRef a As Double[]" I get the same result in the log file but the array a is returned truncated down to only the first element.&lt;BR /&gt;&lt;BR /&gt;Can anyone shed some light on this?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Roger</description>
      <pubDate>Tue, 05 Aug 2003 20:27:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/COM-Server-Array-Passing/m-p/795038#M34684</guid>
      <dc:creator>roger_wilson</dc:creator>
      <dc:date>2003-08-05T20:27:37Z</dc:date>
    </item>
  </channel>
</rss>

