Help - restoring mapped network drives 
Author Message
 Help - restoring mapped network drives

I am looking for a way to reconnect / restore mapped network drives using a
DLL command which can be called from VB5

There is a function in User.exe and mpr.dll called WNetRestoreConnection.
(in the windows\system directory).

Does anyone know the syntax for this functions and its parameters etc.

Thanks,
Al



Mon, 23 Apr 2001 03:00:00 GMT  
 Help - restoring mapped network drives
Hi Al,

Quote:

>I am looking for a way to reconnect / restore mapped network drives using a
>DLL command which can be called from VB5

>There is a function in User.exe and mpr.dll called WNetRestoreConnection.
>(in the windows\system directory).

>Does anyone know the syntax for this functions and its parameters etc.

The closest to your function call (which I think doesn't exist) I could find
was WNetSetConnection:

DWORD WNetSetConnection( LPCTSTR lpName,
 // name of device or resource
DWORD dwProperty,
 // specifies the property type to change
LPVOID pvValue
 // pointer to the property value
);

Parameters
lpName

Specifies the name of either the redirected local device or a remote network
resource.

dwProperty

Specifies a property type to change. There is currently only one property
type:
Value                                                              Meaning

NETPROPERTY_PERSISTENT              The corresponding property value is a
DWORD. lpName must be the name of a redirected local device. If the property
value is TRUE, the connection is made persistent (that is, it will be
restored when the calling user next logs on), with its current user name. If
the property value is FALSE, then the connection is made no longer
persistent and any current connection to the network will not be broken.

pvValue

Pointer to the property value for the property type supplied. The data type
of the property value depends upon the property type.

Return Values
If the function succeeds, it returns WN_SUCCESS . If the function fails, you
will see the following error code. Value
 Meaning

WN_NOT_CONNECTED
 lpName is not a redirected local device.

--
Damit Senanayake
Microsoft MVP - Visual Basic
ICQ # : 6930718
http://members.xoom.com/damit



Tue, 24 Apr 2001 03:00:00 GMT  
 Help - restoring mapped network drives
MSDN.microsoft.com's library online does have all the stuff you are looking
for as well aas a win32 help file. Syntax only, the examples are few and far
between. I have done alot with mapping drives, printers, dynammically
setting groups, setting registry keys via a login exe when the user logs in.
I you are interested, I can send you the source. It's in Delphi


Quote:
>I am looking for a way to reconnect / restore mapped network drives using a
>DLL command which can be called from VB5

>There is a function in User.exe and mpr.dll called WNetRestoreConnection.
>(in the windows\system directory).

>Does anyone know the syntax for this functions and its parameters etc.

>Thanks,
>Al



Sat, 05 May 2001 03:00:00 GMT  
 Help - restoring mapped network drives
Perhaps http://www.mvps.org/vbnet/code/network/netconnect.htm will be of
help.

--

Randy Birch, MVP Visual Basic

http://www.mvps.org/vbnet/
http://www.mvps.org/ccrp/

To assist in maintaining this thread for the benefit of
others, please post any response to this newsgroup.


Quote:
>MSDN.microsoft.com's library online does have all the stuff you are looking
>for as well aas a win32 help file. Syntax only, the examples are few and
far
>between. I have done alot with mapping drives, printers, dynammically
>setting groups, setting registry keys via a login exe when the user logs
in.
>I you are interested, I can send you the source. It's in Delphi



>>I am looking for a way to reconnect / restore mapped network drives using
a
>>DLL command which can be called from VB5

>>There is a function in User.exe and mpr.dll called WNetRestoreConnection.
>>(in the windows\system directory).

>>Does anyone know the syntax for this functions and its parameters etc.

>>Thanks,
>>Al



Sun, 06 May 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How To Restore Network Drive Map?

2. How To Restore Network Drive Map?

3. How To Restore Network Drive Map?

4. get drive size from network network mapped drives

5. rename a drive / map network drive

6. Help Mapping network drive !

7. Change to a Mapped network drive

8. How to map network drive via code?

9. How do I Map a Network Drive?

10. Mapping Network Drive in VBA

11. Map Network Drive

12. MAPPING NETWORK DRIVE !

 

 
Powered by phpBB® Forum Software