- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I am trying to pass an array of floats using a COM object written in C#.
After registering the COM DLL, the code is created by the FORTRAN COM Wizard in Daniel-COM.f90
In Daniel-main.f90, I create a class which uses the array_test function from the COM object.
The interface to array_test requires safe arrays.
Q1. Which function from the COM object should I use ($$AnalysisDb_ArrayTest or $IAnalysisDb_ArrayTest)? What is the difference?
Q2. I use two procedures MakeVariantSafeArray and GetVariantSafeArray, Is this the correct way to create a safe array for to pass to the COM object? (Needless to say that the call to $$AnalysisDb_ArrayTest fails to return zero (0=success); the program compiles and builds fine).
Any ideas on the above?
Thank you for your efforts.
Daniel.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I haven't looked at your code, but you should not be calling the generated routines with names that start with $. There are safearray manipulating routines in module OLEAUT32 - SafeArrayGetDim, SafeArrayGetElement, etc. You might want to look at the sample program VB.NET-Safearrays to see how they are used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Steve. I'll review the example.
The $ routines are the ones needed to access the COM object. They are generated by the FORTRAN wizard.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page