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.
The closest to your function call (which I think doesn't exist) I could find
DWORD WNetSetConnection( LPCTSTR lpName,
// name of device or resource
// specifies the property type to change
// pointer to the property value
Specifies the name of either the redirected local device or a remote network
Specifies a property type to change. There is currently only one property
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.
Pointer to the property value for the property type supplied. The data type
of the property value depends upon the property type.
If the function succeeds, it returns WN_SUCCESS . If the function fails, you
will see the following error code. Value
lpName is not a redirected local device.
Microsoft MVP - Visual Basic
ICQ # : 6930718