WNetConnectionDialog
This function brings up a general browsing dialog for connecting to network resources.
DWORD WNetConnectionDialog (
HWND hwnd,
DWORD dwType
);
- hwnd
- This specifies the HWND of the owning window.
- dwType
- Used to specify the type of resources of interest. Currently, this may be one of:
RESOURCETYPE_DISK |
Connect to disk resources. |
RESOURCETYPE_PRINT |
Connect to print resources. |
- WN_SUCCESS if the call is successful in bringing up the dialog. Other error codes include the following. Typically this dialog will only return an error if the dialog could not be brought up since errors that occur thereafter are reported to the user directly.
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. |