AUTHDLGSTRUCT


typedef struct _AUTHDLGSTRUCT{ 
    DWORD cbStructure;      
    HWND hwndOwner;       
    LPCSTR lpResource; 
    LPTSTR lpUsername;  
    DWORD cbUsername;   
    LPTSTR lpPassword;    
    DWORD cbPassword;      
    LPTSTR lpOrgUnit;    
    DWORD cbOrgUnit; 
    LPCSTR lpOUTitle;      
    LPCSTR lpExplainText;
    LPCSTR lpDefaultUserName;
    DWORD dwFlags;       
} AUTHDLGSTRUCT. *LPAUTHDLGSTRUCT;

cbStructure

The size of the AUTHDLGSTRUCT structure in bytes. This is filled in by the caller to indicate the size of the structure passed in. Upon return, it has the size of the structure filled in.

hwndOwner

A handle to a window which should be the owner of the dialog box.

lpResource

The name of the resource being accessed, to be presented to the user.

lpUsername

On entry, the default user name to be displayed in the dialog box. On exit, this parameter is filled with the user name supplied. If this parameter is NULL, no user name field is displayed in the dialog box.

cbUserName

Specifies the size of the lpUsername buffer passed in, in bytes. If the call fails because the buffer is not big enough, this location will return the required buffer size.

lpPassword

On entry, the default password to be displayed in the dialog box. On exit, this parameter is filled with the password supplied.

cbPassword

Specifies the size of the lpPassword buffer passed in, in bytes. If the call fails because the buffer is not big enough, this location will return the required buffer size.

lpOrgUnit

On entry, the default organizational unit name (for example, a Windows NT domain) to be displayed in the dialog box. On exit, this parameter is filled with the organizational unit supplied. If this parameter is NULL, no organizational unit field is displayed in the dialog box.

cbOrgUnit

Specifies the size of the lpOrgUnit buffer passed in, in bytes. If the call fails because the buffer is not big enough, this location will return the required buffer size.

lpOUTitle

Specifies the label for the organizational unit field. If this parameter is NULL, a default title of "Domain:" is used. If the lpOrgUnit parameter is NULL, this parameter is ignored.

lpExplainText

Explanatory text at the top of the dialog box, NULL for default text.

lpDefaultUserName

The guest user name to be used if AUTHDLG_USE_DEFAULT_NAME is specified and the user checks that checkbox.

dwFlags

Contains any combination of the following values:

AUTHDLG_ENABLECACHE

Display and enable the check box which allows the user to choose whether or not to save the password in the password cache.

AUTHDLG_CHECKCACHE

If set, causes the password caching checkbox to be checked by default. On exit, this bit reflects the state of the checkbox as left by the user. This bit is ignored if AUTHDLG_ENABLECACHE is not set.

AUTHDLG_CACHEINVALID

If set, a specific dialog box is produced if the cached password was invalid.

AUTHDLG_USE_DEFAULT_NAME

If set, display and enable a check box which the user can check to use a default or "guest" logon.

AUTHDLG_CHECKDEFAULT_NAME

On entry, specifies the initial state of the "guest logon" check box. On exit, specified the final state of the check box.

AUTHDLG_LOGON

If set, causes the dialog box to appear as a logon dialog box instead of a password prompt dialog box. The chief difference is that a network icon is displayed in the logon dialog box. An NP should specify this flag when displaying a logon dialog box for its NPLogon entrypoint.


WN_CANCEL

The user chose the Cancel button in the dialog box.