📄 winwlx.pas
字号:
// GINA DLL. Profile types are defined with the prefix
// WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
// structure so the remainder of the structure may be referenced.
//
dwType: DWORD;
//
// pathname of profile to load for user.
//
// This parameter can be NULL. If so, the user has a local
// profile only.
//
// The buffer pointed to by this field must be separately allocated.
// Winlogon will free the buffer when it is no longer needed.
//
//
pszProfile: PWSTR;
//
// pathname of policy to load for user.
//
// This parameter can be NULL which prevents network wide policy
// from being applied.
//
// The buffer pointed to by this field must be separately allocated.
// Winlogon will free the buffer when it is no longer needed.
//
//
pszPolicy: PWSTR;
//
// pathname of network default user profile
//
// This parameter can be NULL, which causes the Default User
// profile on the local machine to be used.
//
// The buffer pointed to by this field must be separately allocated.
// Winlogon will free the buffer when it is no longer needed.
//
//
pszNetworkDefaultUserProfile: PWSTR;
//
// name of the server which validated the user account
//
// This is used to enumerate globals groups the user belongs
// to for policy support. This parameter can be NULL.
//
// The buffer pointed to by this field must be separately allocated.
// Winlogon will free the buffer when it is no longer needed.
//
//
pszServerName: PWSTR;
//
// pointer to a series of null terminated environment variables
//
// envname=environment variable value
// - or -
// envname=%OtherVar%\more text
//
// Each environment variable is NULL terminated with the last
// environment variable double NULL terminated. These variables
// are set into the user's initial environment. The environment
// variable value can contain other environment variables wrapped
// in "%" signs. This parameter can be NULL.
//
// The buffer pointed to by this field must be separately allocated.
// Winlogon will free the buffer when it is no longer needed.
//
//
pszEnvironment: PWSTR;
end;
{$EXTERNALSYM _WLX_PROFILE_V2_0}
WLX_PROFILE_V2_0 = _WLX_PROFILE_V2_0;
{$EXTERNALSYM WLX_PROFILE_V2_0}
TWlxProfileV2_0 = WLX_PROFILE_V2_0;
PWlxProfileV2_0 = PWLX_PROFILE_V2_0;
/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// The WLX_NPR_NOTIFICATION_INFO structure is returned
// from a GINA DLL following successful authentication.
// This information is used by Winlogon to provide
// identification and authentication information already
// collected to network providers. Winlogon is
// responsible for freeing both the main structure and all
// string and other buffers pointed to from within the
// structure.
//
PWLX_MPR_NOTIFY_INFO = ^WLX_MPR_NOTIFY_INFO;
{$EXTERNALSYM PWLX_MPR_NOTIFY_INFO}
_WLX_MPR_NOTIFY_INFO = record
//
// 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.
//
pszUserName: PWSTR;
//
// The string pointed to by this field must be separately
// allocated and will be separately deallocated by Winlogon.
//
pszDomain: PWSTR;
//
// 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.
//
pszPassword: PWSTR;
//
// 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.
//
pszOldPassword: PWSTR;
end;
{$EXTERNALSYM _WLX_MPR_NOTIFY_INFO}
WLX_MPR_NOTIFY_INFO = _WLX_MPR_NOTIFY_INFO;
{$EXTERNALSYM WLX_MPR_NOTIFY_INFO}
TWlxMprNotifyInfo = WLX_MPR_NOTIFY_INFO;
PWlxMprNotifyInfo = 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.
//
const
WLX_DIRECTORY_LENGTH = 256;
{$EXTERNALSYM WLX_DIRECTORY_LENGTH}
type
PWLX_TERMINAL_SERVICES_DATA = ^WLX_TERMINAL_SERVICES_DATA;
{$EXTERNALSYM PWLX_TERMINAL_SERVICES_DATA}
_WLX_TERMINAL_SERVICES_DATA = record
//
// TS profile path, overrides the standard profile path.
//
ProfilePath: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
//
// TS home directory, overrides standard home directory.
//
HomeDir: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
//
// TS home directory drive, overrides standard drive.
//
HomeDirDrive: array [0..3] of WCHAR;
end;
{$EXTERNALSYM _WLX_TERMINAL_SERVICES_DATA}
WLX_TERMINAL_SERVICES_DATA = _WLX_TERMINAL_SERVICES_DATA;
{$EXTERNALSYM WLX_TERMINAL_SERVICES_DATA}
TWlxTerminalServicesData = WLX_TERMINAL_SERVICES_DATA;
PWlxTerminalServicesData = 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().
//
const
WLX_CREDENTIAL_TYPE_V1_0 = (1);
{$EXTERNALSYM WLX_CREDENTIAL_TYPE_V1_0}
type
PWLX_CLIENT_CREDENTIALS_INFO_V1_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V1_0;
{$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V1_0}
_WLX_CLIENT_CREDENTIALS_INFO = record
//
// 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.
//
dwType: DWORD;
pszUserName: PWSTR;
pszDomain: PWSTR;
pszPassword: PWSTR;
//
// This field forces a prompt for the password. This
// is due to an administrator override.
//
// This allows the distinguishing of autologon
// with no password.
//
fPromptForPassword: BOOL;
end;
{$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO}
WLX_CLIENT_CREDENTIALS_INFO_V1_0 = _WLX_CLIENT_CREDENTIALS_INFO;
{$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V1_0}
TWlxClientCredentialsInfoV1_0 = WLX_CLIENT_CREDENTIALS_INFO_V1_0;
PWlxClientCredentialsInfoV1_0 = PWLX_CLIENT_CREDENTIALS_INFO_V1_0;
////////////////////////////////////////////////////////////////////////
// //
// Services that replacement GINAs ** MUST ** provide //
// //
////////////////////////////////////////////////////////////////////////
{$IFDEF IMPORT_MS_GINA}
{$IFDEF MSGINA1_0}
function WlxNegotiate(dwWinlogonVersion: DWORD; var pdwDllVersion: WORD): BOOL; stdcall;
{$EXTERNALSYM WlxNegotiate}
function WlxInitialize(lpWinsta: LPWSTR; hWlx: HANDLE; pvReserved: PVOID;
pWinlogonFunctions: PVOID; var pWlxContext: PVOID): BOOL; stdcall;
{$EXTERNALSYM WlxInitialize}
procedure WlxDisplaySASNotice(pWlxContext: PVOID); stdcall;
{$EXTERNALSYM WlxDisplaySASNotice}
function WlxLoggedOutSAS(pWlxContext: PVOID; dwSasType: DWORD;
var pAuthenticationId: LUID; var pLogonSid: SID; var pdwOptions: DWORD;
var phToken: HANDLE; var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO;
var pProfile: PVOID): Integer; stdcall;
{$EXTERNALSYM WlxLoggedOutSAS}
function WlxActivateUserShell(pWlxContext: PVOID; pszDesktopName: PWSTR;
pszMprLogonScript: PWSTR; pEnvironment: PVOID): BOOL; stdcall;
{$EXTERNALSYM WlxActivateUserShell}
function WlxLoggedOnSAS(pWlxContext: PVOID; dwSasType: DWORD; pReserved: PVOID): Integer; stdcall;
{$EXTERNALSYM WlxLoggedOnSAS}
procedure WlxDisplayLockedNotice(pWlxContext: PVOID); stdcall;
{$EXTERNALSYM WlxDisplayLockedNotice}
function WlxWkstaLockedSAS(pWlxContext: PVOID; dwSasType: DWORD): Integer; stdcall;
{$EXTERNALSYM WlxWkstaLockedSAS}
function WlxIsLockOk(pWlxContext: PVOID): BOOL; stdcall;
{$EXTERNALSYM WlxIsLockOk}
function WlxIsLogoffOk(pWlxContext: PVOID): BOOL; stdcall;
{$EXTERNALSYM WlxIsLogoffOk}
procedure WlxLogoff(pWlxContext: PVOID); stdcall;
{$EXTERNALSYM WlxLogoff}
procedure WlxShutdown(pWlxContext: PVOID; ShutdownType: DWORD); stdcall;
{$EXTERNALSYM WlxShutdown}
{$ENDIF}
//
// NEW for version 1.1
//
{$IFDEF MSGINA1_1}
function WlxScreenSaverNotify(pWlxContext: PVOID; var pSecure: BOOL): BOOL; stdcall;
{$EXTERNALSYM WlxScreenSaverNotify}
function WlxStartApplication(pWlxContext: PVOID; pszDesktopName: PWSTR;
pEnvironment: PVOID; pszCmdLine: PWSTR): BOOL; stdcall;
{$EXTERNALSYM WlxStartApplication}
{$ENDIF}
//
// New for 1.3
//
{$IFDEF MSGINA1_3}
function WlxNetworkProviderLoad(pWlxContext: PVOID;
var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO): BOOL; stdcall;
{$EXTERNALSYM WlxNetworkProviderLoad}
const
STATUSMSG_OPTION_NOANIMATION = $00000001;
{$EXTERNALSYM STATUSMSG_OPTION_NOANIMATION}
STATUSMSG_OPTION_SETFOREGROUND = $00000002;
{$EXTERNALSYM STATUSMSG_OPTION_SETFOREGROUND}
function WlxDisplayStatusMessage(pWlxContext: PVOID; hDesktop: HDESK;
dwOptions: DWORD; pTitle: PWSTR; pMessage: PWSTR): BOOL; stdcall;
{$EXTERNALSYM WlxDisplayStatusMessage}
function WlxGetStatusMessage(pWlxContext: PVOID; var pdwOptions: DWORD;
pMessage: PWSTR; dwBufferSize: DWORD): BOOL; stdcall;
{$EXTERNALSYM WlxGetStatusMessage}
function WlxRemoveStatusMessage(pWlxContext: PVOID): BOOL; stdcall;
{$EXTERNALSYM WlxRemoveStatusMessage}
{$ENDIF}
{$ENDIF IMPORT_MS_GINA}
////////////////////////////////////////////////////////////////////////
// //
// Services that Winlogon provides //
// //
////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -