Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function starts a general browsing dialog box for disconnecting from network resources. It lists all currently connected and remembered resources and lets the user select which one to disconnect.

Syntax

DWORD WNetDisconnectDialog(
  HWND 
hwnd,
  DWORD 
dwType
);

Parameters

hwnd

[in] Handle to the owning window.

dwType

[in] Ignored; set to zero.

Return Value

ERROR_SUCCESS indicates success. 0xFFFFFFFF indicates that the user canceled out of the dialog box. An error value indicates failure. To get extended error information, call GetLastError. Possible GetLastErrorerror values are described in the following table.

Value Description

ERROR_NO_NETWORK

No network is present.

ERROR_NOT_ENOUGH_MEMORY

There is insufficient memory to start the dialog box.

Remarks

If the user chooses OKin the dialog box, the requested network disconnection will have been made when WNetDisconnectDialogreturns.

Requirements

Header winnetwk.h
Library coredll.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later