Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping and Unmapping
Message
 
To
17/09/1998 06:41:22
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00137678
Message ID:
00138268
Views:
9
>Hello Patric,
>
>Try
>
>DECLARE Integer WNetAddConnection IN WIN32API STRING @, STRING @, STRING @
>DECLARE Integer WNetCancelConnection IN WIN32API String @, INTEGER
>
>lcRemoteName = "\\Computer\Resource"
>lcPassword = "" && Connect using no password
>lcLocalName = "T:"
>
>? WNetAddConnection( @lcRemoteName, @lcPassword, @lcLocalName)
>*-- Return 0 if all is OK
>
>*-- Then to disconnect ( also returns 0 for OK)
>? WNetCancelConnection( @lcLocalName, 0)

This may sound silly, but where can I find a list of return codes? (0 means the connection attempt was successful, but if the connection fails, I'd like to give the client a good guess about why the operation may have failed.)

Thanks for your help,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform