Share via


WNetDisconnectDialog1 (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

DWORD WNetDisconnectDialog1(
  LPDISCDLGSTRUCT lpDiscDlgStruct 
); 

Parameters

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

Return Value

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

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

See Also

Reference

Windows Networking API/Redirector Functions
DISCDLGSTRUCT