WORD WNetConnectDialog(hwndParent, iType) | |||
HWND hwndParent; | |||
WORD iType; |
The WNetConnectDialog function displays a driver-specific connection dialog box.
hwndParent
Identifies the owner of the dialog box.
iType
Specifies the type of device to be connected. The type can be one of the following values.
Value | Meaning |
WNTYPE_DRIVE (0x0001) | A disk device. |
WNTYPE_FILE (0x0002) | A file. |
WNTYPE_PRINTER (0x0003) | A printer device. |
WNTYPE_COMM (0x0004) | A communications port. Reserved; do not use. |
The return value is one of the following values.
Value | Meaning |
WN_CANCEL | User canceled (no new drives). |
WN_NOT_SUPPORTED | Function not supported. |
WN_OUT_OF_MEMORY | Not enough memory to display the dialog box. |
WN_SUCCESS | Success. |
The export ordinal for this function is 25.
The network driver carries out all connection functions in this dialog box. The network driver maintains the features of the previous connection list and the permanent connection option. If this function is not supported, a default dialog box will be used. This dialog box will maintain the previous list and will remember permanent connections in a manner consistent with the default implementation of the WNetRestoreConnection function.
WNetConnectDialog (together with WNetDisconnectDialog) allows either one or two dialog boxes to be used to manage disk shares in Windows 3.1. If both WNetConnectDialog and WNetDisconnectDialog are supported, the user will have two File Manager menu commands for connecting and disconnecting. If the
driver implements only WNetConnectionDialog, a single menu command and dialog box will be presented. The default case (no hooks implemented) uses one dialog box. A single dialog box (hooked with WNetConnectionDialog) is always used to manage printer devices.
If the driver returns WN_NOT_SUPPORTED, File Manager carries out the same default operations as it would if the driver did not have the capability bit for this dialog set.
WNetConnectionDialog, WNetDisconnectDialog, WNetRestoreConnection