Platform SDK: Windows Networking

DISCDLGSTRUCT

The DISCDLGSTRUCT structure is used in the WNetDisconnectDialog1 function. The structure contains required information for the disconnect attempt.

typedef struct _DISCDLGSTRUCT{ 
    DWORD cbStructure;
    HWND hwndOwner;
    LPTSTR lpLocalName;
    LPTSTR lpRemoteName;
    DWORD dwFlags;
} DISCDLGSTRUCT, *LPDISCDLGSTRUCT;

Members

cbStructure
Specifies the size, in bytes, of the DISCDLGSTRUCT structure. The caller must supply this value.
hwndOwner
Specifies a handle to the owner window of the dialog box.
lpLocalName
Pointer to a null-terminated character string that specifies the local device name that is redirected to the network resource, such as "F:" or "LPT1".
lpRemoteName
Pointer to a null-terminated character string that specifies the name of the network resource to disconnect. This member can be NULL if the lpLocalName member is specified. When lpLocalName is specified, the connection to the network resource redirected from lpLocalName is disconnected.
dwFlags
Specifies a DWORD value that contains a set of bit flags describing the connection. This member can be a combination of the following values.
Value Meaning
DISC_UPDATE_PROFILE If this value is set, the specified connection is no longer a persistent one (automatically restored every time the user logs on). This flag is valid only if the lpLocalName member specifies a local device.
DISC_NO_FORCE If this value is not set, the system applies force when attempting to disconnect from the network resource.

This situation typically occurs when the user has files open over the connection. This value means that the user will be informed if there are open files on the connection, and asked if he or she still wants to disconnect. If the user wants to proceed, the disconnect procedure re-attempts with additional force.


Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Winnetwk.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Windows Networking (WNet) Overview, Windows Networking Structures, WNetDisconnectDialog1