Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force reconnection of a network mapped drive?
Message
 
À
04/11/2002 03:16:01
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00713586
Message ID:
00718433
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
>George-
>
>>Um, a SWAG. Look at WNetRestoreConnectionW() in the networking SDK.
>
>I think that's a brilliant SWAG *g*. Unfortunately I'm being far from brilliant. Here's the MSDN syntax:
>
>
DWORD WNetRestoreConnectionW(
>  HWND hwndParent,
>  LPCWSTR lpDevice
>);
>
>Here's my Fox declare statement.
DECLARE INTEGER WNetRestoreConnectionW IN Win32API  ;
>	INTEGER hwndParent, INTEGER lpDevice
>
>I'd like to call it with two null parameters since I want it to reconnect all possible drives for the logged in user, but I'm being totally brain dead on how to call the API function. I've tried NULL, 0's, and clicking my heels three times. NULL gives me Data Type mismatch (no huge suprise there). Any suggestions < ducks blow from Mr. Rauh> gratefully received.

Nancy,

Alan's correct about the declaration, but in order to pass a null pointer, you have to indicate that the lpDevice parameter is passed by reference
DECLARE INTEGER WNetRestoreConnectionW IN Win32API  ;
	INTEGER hwndParent, STRING @lpDevice
Pass zero as the pointer to the device.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform