Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing Structures to DLLs?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00066580
Message ID:
00066633
Views:
38
>I am working with a DLL that expects to be passed a structure or reference to a structure for many of the functions. I've tried passing a string or array instead without luck. How can you pass a structure from VFP?

I've been playing with this some more and just can't get it to work. For example, one function expects to be passed a reference to a structure with two items in the structure: program name, of type string, and program version of type integer. In VB it would look something like...

Type VERSIONS_REC
Prog_name AS String * 20
Prog_ver AS Integer
End Type

So, the function would return the program name and program version to that structure. I've tried passing just a string value, but the DLL only returns the first item in the structure to the string. I've also tried passing an array, but get data-type mismatch errors for these. I don't have any other ideas. Anyone?

Michael G. Emmons
memmons@nc.rr.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform