📄 winwlx.h
字号:
//
// The name of the account logged onto (e.g. REDMOND\Joe).
// The string pointed to by this field must be separately
// allocated and will be separately deallocated by Winlogon.
//
PWSTR pszUserName;
//
// The string pointed to by this field must be separately
// allocated and will be separately deallocated by Winlogon.
//
PWSTR pszDomain;
//
// Cleartext password of the user account. If the OldPassword
// field is non-null, then this field contains the new password
// in a password change operation. The string pointed to by
// this field must be separately allocated and will be seperately
// deallocated by Winlogon.
//
PWSTR pszPassword;
//
// Cleartext old password of the user account whose password
// has just been changed. The Password field contains the new
// password. The string pointed to by this field must be
// separately allocated and will be separately deallocated by
// Winlogon.
//
PWSTR pszOldPassword;
} WLX_MPR_NOTIFY_INFO, * PWLX_MPR_NOTIFY_INFO;
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// WLX_TERMINAL_SERVICES_DATA is used by the GINA during a
// WlxQueryTerminalServicesData() callback into WinLogon from the
// WlxLoggedOutSAS() context, after the user name and domain are known.
// This structure relates to TS user configuration information which is
// retrieved from the Domain Controller and SAM database. Having WinLogon
// pass this information means the GINA does not need to do the same
// off-machines lookups again.
//
#define WLX_DIRECTORY_LENGTH 256
typedef struct _WLX_TERMINAL_SERVICES_DATA {
//
// TS profile path, overrides the standard profile path.
//
WCHAR ProfilePath[WLX_DIRECTORY_LENGTH + 1];
//
// TS home directory, overrides standard home directory.
//
WCHAR HomeDir[WLX_DIRECTORY_LENGTH + 1];
//
// TS home directory drive, overrides standard drive.
//
WCHAR HomeDirDrive[4];
} WLX_TERMINAL_SERVICES_DATA, *PWLX_TERMINAL_SERVICES_DATA;
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// The WLX_CLIENT_CREDENTIALS_INFO structure is returned
// from winlogon from the WlxQueryClientCredentials() call.
//
// This allows a network client WinStation to pass client
// credentials for automatic logon.
//
// The MSGINA DLL is responsible for freeing the memory
// and substrings with LocalFree().
//
#define WLX_CREDENTIAL_TYPE_V1_0 (1)
#define WLX_CREDENTIAL_TYPE_V2_0 (2)
typedef struct _WLX_CLIENT_CREDENTIALS_INFO {
//
// This field identifies the type of credentials structure being allocated
// by GINA DLL. Credential types are defined with the prefix
// WLX_CREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
// structure so the remainder of the structure may be referenced.
//
DWORD dwType;
PWSTR pszUserName;
PWSTR pszDomain;
PWSTR pszPassword;
//
// This field forces a prompt for the password. This
// is due to an administrator override.
//
// This allows the distinguishing of autologon
// with no password.
//
BOOL fPromptForPassword;
} WLX_CLIENT_CREDENTIALS_INFO_V1_0, * PWLX_CLIENT_CREDENTIALS_INFO_V1_0;
typedef struct _WLX_CLIENT_CREDENTIALS_INFO_2_0 {
DWORD dwType;
PWSTR pszUserName;
PWSTR pszDomain;
PWSTR pszPassword;
BOOL fPromptForPassword;
//
// This field tells winlogon to disconnect/abort the logon attempt if the
// provided password is incorrect, or if it should reprompt (current
// behavior)
//
BOOL fDisconnectOnLogonFailure;
} WLX_CLIENT_CREDENTIALS_INFO_V2_0, * PWLX_CLIENT_CREDENTIALS_INFO_V2_0;
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// The WLX_CONSOLESWITCH_CREDENTIALS_INFO structure is returned
// from gina in response to WlxGetConsoleSwitchCredentials calls.
// This structure is also returned from winlogon in response to
// to WlxQueryConsoleSwitchCredentials call
//
// This is used to implement single session Terminal Server. A remote
// session winlogon calls WlxGetConsoleSwitchCredentials to get the token
// and other info of the logged on user from msgina. This info is then passed to
// the console session winlogon to autologon the user on the console session.
// The gina on console session calls WlxQueryConsoleSwitchCredentials to get
// this info from winlogon and logs on the user.
//
// The caller is responsible for freeing the memory
// and substrings with LocalFree().
//
#define WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 (1)
typedef struct _WLX_CONSOLESWITCH_CREDENTIALS_INFO {
//
// This field identifies the type of credentials structure being allocated
// Credential types are defined with the prefix
// WLX_CONSOLESWITCHCREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
// structure so the remainder of the structure may be referenced.
//
DWORD dwType;
HANDLE UserToken;
LUID LogonId;
QUOTA_LIMITS Quotas;
PWSTR UserName;
PWSTR Domain;
LARGE_INTEGER LogonTime;
BOOL SmartCardLogon;
ULONG ProfileLength;
//
// From MSV1_0_INTERACTIVE_PROFILE
//
DWORD MessageType;
USHORT LogonCount;
USHORT BadPasswordCount;
LARGE_INTEGER ProfileLogonTime;
LARGE_INTEGER LogoffTime;
LARGE_INTEGER KickOffTime;
LARGE_INTEGER PasswordLastSet;
LARGE_INTEGER PasswordCanChange;
LARGE_INTEGER PasswordMustChange;
PWSTR LogonScript;
PWSTR HomeDirectory;
PWSTR FullName;
PWSTR ProfilePath;
PWSTR HomeDirectoryDrive;
PWSTR LogonServer;
ULONG UserFlags;
ULONG PrivateDataLen;
PBYTE PrivateData;
} WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0, * PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
////////////////////////////////////////////////////////////////////////
// //
// Services that replacement GINAs ** MUST ** provide //
// //
////////////////////////////////////////////////////////////////////////
BOOL
WINAPI
WlxNegotiate(
DWORD dwWinlogonVersion,
PDWORD pdwDllVersion
);
BOOL
WINAPI
WlxInitialize(
LPWSTR lpWinsta,
HANDLE hWlx,
PVOID pvReserved,
PVOID pWinlogonFunctions,
PVOID * pWlxContext
);
VOID
WINAPI
WlxDisplaySASNotice(
PVOID pWlxContext
);
int
WINAPI
WlxLoggedOutSAS(
PVOID pWlxContext,
DWORD dwSasType,
PLUID pAuthenticationId,
PSID pLogonSid,
PDWORD pdwOptions,
PHANDLE phToken,
PWLX_MPR_NOTIFY_INFO pNprNotifyInfo,
PVOID * pProfile
);
BOOL
WINAPI
WlxActivateUserShell(
PVOID pWlxContext,
PWSTR pszDesktopName,
PWSTR pszMprLogonScript,
PVOID pEnvironment
);
int
WINAPI
WlxLoggedOnSAS(
PVOID pWlxContext,
DWORD dwSasType,
PVOID pReserved
);
VOID
WINAPI
WlxDisplayLockedNotice(
PVOID pWlxContext
);
int
WINAPI
WlxWkstaLockedSAS(
PVOID pWlxContext,
DWORD dwSasType
);
BOOL
WINAPI
WlxIsLockOk(
PVOID pWlxContext
);
BOOL
WINAPI
WlxIsLogoffOk(
PVOID pWlxContext
);
VOID
WINAPI
WlxLogoff(
PVOID pWlxContext
);
VOID
WINAPI
WlxShutdown(
PVOID pWlxContext,
DWORD ShutdownType
);
//
// NEW for version 1.1
//
BOOL
WINAPI
WlxScreenSaverNotify(
PVOID pWlxContext,
BOOL * pSecure);
BOOL
WINAPI
WlxStartApplication(
PVOID pWlxContext,
PWSTR pszDesktopName,
PVOID pEnvironment,
PWSTR pszCmdLine
);
//
// New for 1.3
//
BOOL
WINAPI
WlxNetworkProviderLoad(
PVOID pWlxContext,
PWLX_MPR_NOTIFY_INFO pNprNotifyInfo
);
#define STATUSMSG_OPTION_NOANIMATION 0x00000001
#define STATUSMSG_OPTION_SETFOREGROUND 0x00000002
BOOL
WINAPI
WlxDisplayStatusMessage(
PVOID pWlxContext,
HDESK hDesktop,
DWORD dwOptions,
PWSTR pTitle,
PWSTR pMessage
);
BOOL
WINAPI
WlxGetStatusMessage(
PVOID pWlxContext,
DWORD * pdwOptions,
PWSTR pMessage,
DWORD dwBufferSize
);
BOOL
WINAPI
WlxRemoveStatusMessage(
PVOID pWlxContext
);
//
// New for 1.4
//
BOOL
WINAPI
WlxGetConsoleSwitchCredentials (
PVOID pWlxContext,
PVOID pCredInfo
);
VOID
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -