Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays in C dlls
Message
From
22/02/1999 15:21:41
 
 
To
22/02/1999 15:00:42
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00190091
Message ID:
00190098
Views:
16
>I know from reading that VFP arrays cannot be used externally; cannot be passed and recognized as arrays by other platforms. I am also aware of the functionality of COMARRAY() in VFP 6, but don't think that this applies.
>
>That aside- what are my options for external functions in a C library that need to be passed an array?
>

It depends on exactly the nature of the array passed to the C function; in many cases, you can construct the array in a VFP string, or in a buffer allocated with something like CLSHEAP or POINTERS, and handle conversion issues yourself (an example might be a simple vector of ULONGs, which might be passed as a string of 4 byte allocations, or an array of pointers to strings, where you have a vector of pointers which can be passed back and forth, and could then resolve the pointers as CStrings using something like lstrcopy().) What does the array declaration for the .DLL look like in C?


>I am open to the idea of building a COM object with another tool such as VB that would serve as a wrapper for the functions, but want to be aware of any problems with this approach as well as hear any other suggestions.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform