This function is used to change the characteristics of a network connection.
DWORD WNetSetConnection(
LPCTSTR lpName,
DWORD dwProperty,
LPVOID pvValue
);
NETPROPERTY_PERSISTENT | the persistent property. 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 with the current user authentication. . If the property value is FALSE, then the connection is made no longer persistent without breaking any current connection to the network (if not currently connected to the network, this is the same effect as cancelling the connection). |
WN_NOT_CONNECTED | lpName not a redirected device |