Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Properly Declare an API Function?
Message
 
À
20/02/2013 10:33:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
01566486
Message ID:
01566500
Vues:
45
Thank-you for your explanation. As I was testing it I discovered basically what you described. So when the variable is used as an input I am using it without the "@" but when it is an output then I am adding the "@".

Simon

>>Hi
>>
>>I would like to know the correct way to delcare the following C function in VFP:
>>
>>int SetServer_IP (int context, char *Value);
>>
>>I used:
>>
>>Declare Integer SetServer_IP In XTran.dll As PP_SetServer_IP Integer lnContext,String lcIP
>>
>>but I am wondering whether the it should be:
>>
>>Declare Integer SetServer_IP In XTran.dll As PP_SetServer_IP Integer lnContext,String @ lcIP
>>
>>Thanks,
>>Simon
>
>Depends
>
>(1)
>
>Declare Integer SetServer_IP In XTran.dll As PP_SetServer_IP Integer lnContext,String lcIP
>
>
>When calling
>
>The string lcIP cannot be changed by the api
>The string variable is not preceded by @
>
>lcIP = 'something'
> = SetServer_IP(123, m.lcIP)
>
>
>You can pass null
>
> = SetServer_IP(123, null)
>
>
>(2)
>
>Declare Integer SetServer_IP In XTran.dll As PP_SetServer_IP Integer lnContext,String @ lcIP
>
>The string lcIP can be changed by the api
>The string variable is preceded by @
>
>lcIP = 'something'
> = SetServer_IP(123, @m.lcIP)
>
>
>Impossible to pass null
Simon White
dCipher Computing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform