Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mapping and Unmapping
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00137678
Message ID:
00138294
Vues:
14
>>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,

Look in WINERROR.H or WINBASE.H from VC++'s include library. Most of the API references I'm aware of use constants defined in these .H files.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform