Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
DISCDLGSTRUCTA structure (winnetwk.h)
The DISCDLGSTRUCT structure is used in the WNetDisconnectDialog1 function. The structure contains required information for the disconnect attempt.
Syntax
typedef struct _DISCDLGSTRUCTA {
DWORD cbStructure;
HWND hwndOwner;
LPSTR lpLocalName;
LPSTR lpRemoteName;
DWORD dwFlags;
} DISCDLGSTRUCTA, *LPDISCDLGSTRUCTA;
Members
cbStructure
Type: DWORD
The size, in bytes, of the DISCDLGSTRUCT structure. The caller must supply this value.
hwndOwner
Type: HWND
A handle to the owner window of the dialog box.
lpLocalName
Type: LPTSTR
A pointer to a NULL-terminated string that specifies the local device name that is redirected to the network resource, such as "F:" or "LPT1".
lpRemoteName
Type: LPTSTR
A pointer to a NULL-terminated 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
Type: DWORD
A set of bit flags describing the connection. This member can be a combination of the following values.
| Value | Meaning |
|---|---|
|
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. |
|
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. |
Remarks
Note
The winnetwk.h header defines DISCDLGSTRUCT as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 2000 Professional [desktop apps only] |
| Minimum supported server | Windows 2000 Server [desktop apps only] |
| Header | winnetwk.h |
See also
Feedback
Was this page helpful?
