WNetConnectionDialog1

This function brings up a general browsing dialog for connecting to network resources.

At a Glance

Header file: Winnetwk.h
Windows CE versions: 2.0 and later

Syntax

DWORD WNetConnectionDialog1(LPCONNECTDLGSTRUCT lpConnectDlgStruc);

Parameters

lpConnectDlgStruct

[in] Long pointer to the CONNECTDLGSTRUCT structure, which establishes the browsing dialog parameters.

Return Values

ERROR_SUCCESS indicates success. 0xFFFFFFFF indicates that the user canceled the dialog box. Typically, this dialog box only returns an error if the user cannot enter a dialog session. This is because errors that occur after a session are reported to the user directly. Of the possible error values, ERROR_INVALID_PARAMETER indicates one of the following:

Other possible values are described in the following table.

Value Description
ERROR_BAD_DEV_TYPE The lpConnRes->dwType members of CONNECTDLGSTRUCT are not set to indicate RESOURCETYPE_DISK.
ERROR_BUSY The network provider is busy, and is possibly initializing. The caller should retry.
ERROR_NO_NETWORK The network is not present.
ERROR_NOT_ENOUGH_MEMORY There is insufficient memory to bring up the dialog box.

Remarks

The dwDevNum member of the CONNECTDLGSTRUCT structure pointed to by the lpConnectDlgStruc parameter is ignored.

The dwFlags member of the CONNECTDLGSTRUCT can be either CONNDLG_RO_PATH or 0.