Share via


WNetDisconnectDialog1

This function attempts to disconnect from a network. If the underlying network returns ERROR_OPEN_FILES, the function prompts the user for confirmation. Users will be informed of any errors.

DWORD WNetDisconnectDialog1(
LPDISCDLGSTRUCT lpDiscDlgStruct ); 

Parameters

  • lpDiscDlgStruct
    [in] Long pointer to the DISCDLGSTRUCT data structure, which specifies the behavior for the disconnect attempt.

Return Values

ERROR_SUCCESS indicates success. An error value indicates failure. To get extended error information, call GetLastError. Possible GetLastError error values are described in the following table.

Value Description
ERROR_SUCCESS The connection is successfully disconnected.
ERROR_CANCELLED After the user was prompted for a decision to disconnect, the user elected not to disconnect.
ERROR_OPEN_FILES The function is unable to disconnect because the user is actively using the connection.
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 start the dialog box.

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.