Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling WIN API.
Message
From
20/03/1997 23:52:46
 
 
To
20/03/1997 22:36:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00025042
Message ID:
00025130
Views:
40
>>>Hi,
>>>I need to pass a structure to an API from VFP5. If the structure consists of strings or numerical values, no problem. The question is how I pass a structure that has pointers in it.
>>>TIA
>>>Nick
>>
>>You must pass a char string. The length of the string must be the same as the length of the structure. You must build the structure in this string. This is based on the fact that a structure uses always a contigous memory space.
>>
>>Vlad
>
>OK so far, Vlad, but HOW to put POINTERS into the character string????
>
>Jim N.

You can transform the pointer value in chars and store them into the string. You need probably a function to transform pointers in char string. The goal is to have the same bit sequence.

But, what structure do you need? What pointers do you use in VFP? If you need to pass pointers that you receive from other API functions, there's no need to transform anything. You can receive them directly into string variables. Just declare those parameters as string.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform