>>>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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement