This structure is used in the WNetConnectionDialog1 function to specify the browsing dialog box parameters.
At a Glance
Header file: | Winnetwk.h |
Windows CE versions: | 2.0 and later |
Syntax
typedef struct {
DWORD cbStructure;
HWND hwndOwner;
LPNETRESOURCE lpConnRes;
DWORD dwFlags;
DWORD dwDevNum;
} CONNECTDLGSTRUCT, *LPCONNECTDLGSTRUCT;
Members
cbStructure
Size of this structure, in bytes.
hwndOwner
Handle of the owning window.
lpConnRes
Long pointer to a null-terminated string that specifies the path of a network resource to connect to. If the lpRemoteName member of the NETRESOURCE structure is specified, this member is entered into the path field of the dialog box. All other members must be set to NULL except dwType which specifies the type of resources of interest, and must be one of RESOURCETYPE_DISK.
dwFlags
Specifies variations in the dialog display. This member must be set to zero or the following value:
Value | Description |
CONNDLG_RO_PATH | Instead of enabling the user to type in a path, have a read-only path already inserted. This flag should be set only if lpRemoteName is not NULL, an empty string, and CONNDLG_USE_MRU is not set. |
dwDevNum
If the call is successful, this member returns the number of the devices connected to. The value is 1 for A:, 2 for B:, 3 for C:, and so on. If the user made a deviceless connection, the value is 0xFFFFFFFF.
Return Values
WN_SUCCESS indicates that the call is successful and displays the dialog. Typically, this function returns an error only if the dialog box could not be displayed because errors that occur after are reported directly to the user. If the call is successful, dwDevNum contains the number of devices connected to. If the user cancels the dialog box, the function returns 0xFFFFFFFF.
The WN_BAD_VALUE means that CONNDLG_RO_PATH is set and lpRemoteName does not point to a remote name.