Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Arrays in C dlls
Message
From
22/02/1999 15:35:37
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00190091
Message ID:
00190104
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?
>
>

Well, I don't have the C declaration in front of me (I didn't install that doc), but I can give you a VB declaration-

FUNCTION bryld (Coupon AS Variant, Maturity As Variant, ByVal settle AS Long, ByVal price AS Double, ByVal reinvest AS double) As Variant

coupon can either be a single decimal value, or an array of decimal values
Maturity can either be a single data value, or an array of data values
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform