Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Drive letter
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00099536
Message ID:
00099734
Views:
30
>I can't seem to get WnGetConnection to work.. do you see a problem with this code?
>
>
>declare WNetGetConnection in Win32Api string @, string @, Integer @
>local lcLocalName
>local lcRemoteName
>local lcLength
>lcRemoteName = space(200)
>lcLength = 200
>lcLocalName = 'f:\'
>retval = WNetGetConnection(@lcLocalName,@lcRemoteName,@lcLenght)

Remove the backslash. It's also a good idea to declare the function as returning an integer. If the function succeeds the return value will be 0 (which will cause retval to be .F. if it isn't declared. A non-zero value is the error number (and if the return value isn't declared evaluates to .T.). Declaring it as an integer and setting lcLocalName to 'f:\' caused the function to return 1200, which is ERROR_BAD_DEVICE.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform