This sample demonstrates how to pass an array of strings from Visual BASIC .NET and manipulate it in Fortran using the SafeArray and BSTR routines in module IFCOM.

System Requirements:
Build Instructions:

For Visual Studio IDE users:
  1. Open Visual Studio and load the solution .sln file
  2. If project "ARRAY" is not shown in boldface type in the Solution Explorer, right-click on project "ARRAY" and select "Set as StartUp Project".
  3. Clean the solution from menu Build > Clean Solution
  4. Build the project from menu Build > Build Solution
  5. Run the application from menu Debug > Start Without Debugging or press Ctrl-F5

    A form will be displayed containing a "Push Me" button, an input values box and an output values box. The input value box has the string values "One", "Two", "Three", ... "Twelve". When the button is pushed, Visual BASIC will call the Fortran routine passing it an array of the input strings.

For Command line users:
  1. Open the Intel Visual Fortran Build Environment window from Start menu and navigate to the sample folder
  2. Use following commands to build and test:
    1. Clean the build folder use: build.bat clean
    2. To build a release version: build.bat release
    3. To build a debug version: build.bat debug
    4. To run the program:
      1. Build the VB project ARRAY in Visual Studio IDE
      2. Manually copy the ArrayOfVBStr.dll built from above steps under directory .\debug or .\release to the VB project output folder ARRAY\bin\Debug or ARRAY\bin\Release
      3. Run ARRAY\bin\Debug\ARRAY.exe or ARRAY\bin\Release\ARRAY.exe from the command window
Detail Notes: