>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
Gregory