Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Properly Declare an API Function?
Message
 
To
20/02/2013 10:33:44
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
01566486
Message ID:
01566500
Views:
46
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform