This function brings up a general dialog for disconnecting from network resources. When the dialog attempts to disconnect and an NP returns WN_OPEN_FILES, it prompts the user for confirmation.
DWORD WNetDisconnectDialog ( HWND hwnd, DWORD dwType );
hwnd
This specifies the HWND of the owning window.
dwType
Used to specify the type of resources of interest. This must be one of:
RESOURCETYPE_DISK | Connect to disk resources. |
RESOURCETYPE_PRINT | Connect to print resources. |
WN_FUNCTION_BUSY | The MPR or NP is busy (possibly initializing). The caller should retry. |
WN_NO_NETWORK | network is not present. |
WN_OUT_OF_MEMORY | insufficient memory to bring up the dialog. |
WN_EXTENDED_ERROR | a network specific error occurred. WNetGetLastError should be called to obtain a description of the error. |