hi,
The
WNetUseConnection function makes a connection to a network resource. The function can redirect a local device to a network resource.
The
WNetUseConnection function is similar to the
http://msdn.microsoft.com/en-us/library/aa385418.aspx function. The main difference is that
WNetUseConnection can automatically select an unused local device to redirect to the network resource.
syntax
DWORD WNetUseConnection(
__in HWND hwndOwner,
__in LPNETRESOURCE lpNetResource,
__in LPCTSTR lpPassword,
__in LPCTSTR lpUserID,
__in DWORD dwFlags,
__out LPTSTR lpAccessName,
__inout LPDWORD lpBufferSize,
__out LPDWORD lpResult
);
http://msdn.microsoft.com/en-us/library/aa385482.aspx