Share via


WNetDisconnectDialog

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.

DWORD WNetDisconnectDialog( 
HWND hwnd 
DWORD dwType );

Parameters

  • hwnd
    [in] Handle to the owning window.
  • dwType
    [in] Ignored; set to zero.

Return Values

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 GetLastError error values are described in the following table.

Value Meaning
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 OK in the dialog box, the requested network disconnection will have been made when WNetDisconnectDialog returns.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Winnetwk.h   Redir.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.