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