⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winwlx.pas

📁 详细Windows API大全有关知识以及相关问题
💻 PAS
📖 第 1 页 / 共 3 页
字号:
{******************************************************************}
{                                                       	   }
{       Borland Delphi Runtime Library                  	   }
{       AccCtrl interface unit                                     }
{ 								   }
{ Portions created by Microsoft are 				   }
{ Copyright (C) 1995-1999 Microsoft Corporation. 		   }
{ All Rights Reserved. 						   }
{ 								   }
{ The original file is: winwlx.h, released June 2000. 	           }
{ The original Pascal code is: WinWlx.pas, released December 2000  }
{ The initial developer of the Pascal code is Marcel van Brakel    }
{ (brakelm@bart.nl).                      			   }
{ 								   }
{ Portions created by Marcel van Brakel are			   }
{ Copyright (C) 1999 Marcel van Brakel.				   }
{ 								   }
{ Obtained through:                               	           }
{ Joint Endeavour of Delphi Innovators (Project JEDI)              }
{								   }
{ You may retrieve the latest version of this file at the Project  }
{ JEDI home page, located at http://delphi-jedi.org                }
{								   }
{ The contents of this file are used with permission, subject to   }
{ the Mozilla Public License Version 1.1 (the "License"); you may  }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at                                  }
{ http://www.mozilla.org/MPL/MPL-1.1.html 	                   }
{                                                                  }
{ Software distributed under the License is distributed on an 	   }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or   }
{ implied. See the License for the specific language governing     }
{ rights and limitations under the License. 			   }
{ 								   }
{******************************************************************}

unit WinWlx;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "WinWlx.h"'}
{$HPPEMIT ''}

{$I WINDEFINES.INC}

interface

uses
  WinType, WinUser, WinNT;

//    WLX == WinLogon eXtension
//
//    This file contains definitions, data types, and routine prototypes
//    necessary to produce a replacement Graphical Identification aNd
//    Authentication (GINA) DLL for Winlogon.

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// Revisions of Winlogon API available for use by GINAs
// Version is two parts: Major revision and minor revision.
// Major revision is the upper 16-bits, minor is the lower
// 16-bits.
//

const
  WLX_VERSION_1_0     = ($00010000);
  {$EXTERNALSYM WLX_VERSION_1_0}
  WLX_VERSION_1_1     = ($00010001);
  {$EXTERNALSYM WLX_VERSION_1_1}
  WLX_VERSION_1_2     = ($00010002);
  {$EXTERNALSYM WLX_VERSION_1_2}
  WLX_VERSION_1_3     = ($00010003);
  {$EXTERNALSYM WLX_VERSION_1_3}
  WLX_CURRENT_VERSION = (WLX_VERSION_1_3);
  {$EXTERNALSYM WLX_CURRENT_VERSION}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// Secure attention sequence types
// These values are passed to routines that have a dwSasType
// parameter.
//
//  ALL VALUES FROM 0 TO 127 ARE RESERVED FOR MICROSOFT DEFINITION.
//  VALUES ABOVE 127 ARE RESERVED FOR CUSTOMER DEFINITION.
//
//      CTRL_ALT_DEL - used to indicate that the standard ctrl-alt-del
//          secure attention sequence has been entered.
//
//      SCRNSVR_TIMEOUT - used to indicate that keyboard/mouse inactivity
//          has lead to a screensaver activation.  It is up to the GINA
//          DLL whether this constitutes a workstation locking event.
//
//      SCRNSVR_ACTIVITY - used to indicate that keyboard or mouse
//          activity occured while a secure screensaver was active.
//
//      SC_INSERT - used to indicate that a smart card has been inserted
//          to a compatible device
//
//      SC_REMOVE - used to indicate that a smart card has been removed
//          from a compatible device
//

  WLX_SAS_TYPE_TIMEOUT          = (0);
  {$EXTERNALSYM WLX_SAS_TYPE_TIMEOUT}
  WLX_SAS_TYPE_CTRL_ALT_DEL     = (1);
  {$EXTERNALSYM WLX_SAS_TYPE_CTRL_ALT_DEL}
  WLX_SAS_TYPE_SCRNSVR_TIMEOUT  = (2);
  {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_TIMEOUT}
  WLX_SAS_TYPE_SCRNSVR_ACTIVITY = (3);
  {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_ACTIVITY}
  WLX_SAS_TYPE_USER_LOGOFF      = (4);
  {$EXTERNALSYM WLX_SAS_TYPE_USER_LOGOFF}
  WLX_SAS_TYPE_SC_INSERT        = (5);
  {$EXTERNALSYM WLX_SAS_TYPE_SC_INSERT}
  WLX_SAS_TYPE_SC_REMOVE        = (6);
  {$EXTERNALSYM WLX_SAS_TYPE_SC_REMOVE}
  WLX_SAS_TYPE_MAX_MSFT_VALUE   = (127);
  {$EXTERNALSYM WLX_SAS_TYPE_MAX_MSFT_VALUE}

//
// This structure is available through WlxGetOption, and is
// passed as the lParam for any S/C SAS notices sent to windows
//

type
  PWLX_SC_NOTIFICATION_INFO = ^WLX_SC_NOTIFICATION_INFO;
  {$EXTERNALSYM PWLX_SC_NOTIFICATION_INFO}
  _WLX_SC_NOTIFICATION_INFO = record
    pszCard: PWSTR;
    pszReader: PWSTR;
    pszContainer: PWSTR;
    pszCryptoProvider: PWSTR;
  end;
  {$EXTERNALSYM _WLX_SC_NOTIFICATION_INFO}
  WLX_SC_NOTIFICATION_INFO = _WLX_SC_NOTIFICATION_INFO;
  {$EXTERNALSYM WLX_SC_NOTIFICATION_INFO}
  TWlxScNotificationInfo = WLX_SC_NOTIFICATION_INFO;
  PWlxScNotificationInfo = PWLX_SC_NOTIFICATION_INFO;

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// Upon successful logon, the GINA DLL may specify any of the following
// options to Winlogon (via the dwOptions parameter of the WlxLoggedOutSas()
// api).  When set, these options specify:
//
//      NO_PROFILE - Winlogon must NOT load a profile for the logged
//                   on user.  Either the GINA DLL will take care of
//                   this activity, or the user does not need a profile.
//

const
  WLX_LOGON_OPT_NO_PROFILE = ($00000001);
  {$EXTERNALSYM WLX_LOGON_OPT_NO_PROFILE}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// GINA DLLs are expected to return account information to Winlogon
// following a successful logon.  This information allows Winlogon
// to support profile loading and supplemental network providers.
//
// To allow different sets of profile information to be returned
// by GINAs over time, the first DWORD of each profile structure
// is expected to contain a type-identifier.  The following constants
// are the defined profile type identifiers.
//

//
// Standard profile is V2_0
//

  WLX_PROFILE_TYPE_V1_0 = (1);
  {$EXTERNALSYM WLX_PROFILE_TYPE_V1_0}
  WLX_PROFILE_TYPE_V2_0 = (2);
  {$EXTERNALSYM WLX_PROFILE_TYPE_V2_0}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// WlxLoggedOnSas() and WlxWkstaLockedSas() return an action
// value to Winlogon directing Winlogon to either remain unchanged
// or to perform some action (such as force-log the user off).
// These are the values that may be returned.  Note, however, that
// not all of the values may be returned by both of these api.  See
// the description of each api to see which values are expected from
// each.
//
//  LOGON              - User has logged on
//  NONE               - Don't change the state of the window station.
//  LOCK_WKSTA         - Lock the workstation, wait for next SAS.
//  LOGOFF             - Log the user off of the workstation.
//  SHUTDOWN           - Log the user off and shutdown the machine.
//  PWD_CHANGED        - Indicates that the user changed their password.  Notify network providers.
//  TASKLIST           - Invoke the task list.
//  UNLOCK_WKSTA       - Unlock the workstation.
//  FORCE_LOGOFF       - Forcibly log the user off.
//  SHUTDOWN_POWER_OFF - Turn off machine after shutting down.
//  SHUTDOWN_REBOOT    - Reboot machine after shutting down.
//  SHUTDOWN_SLEEP     - Put the machine to sleep
//  SHUTDOWN_SLEEP2    - Put the machine to sleep and disable wakeup events
//  SHUTDOWN_HIBERNATE - Hibernate the machine
//  RECONNECTED        - Session was reconnected to an earlier session
//

  WLX_SAS_ACTION_LOGON                = (1);
  {$EXTERNALSYM WLX_SAS_ACTION_LOGON}
  WLX_SAS_ACTION_NONE                 = (2);
  {$EXTERNALSYM WLX_SAS_ACTION_NONE}
  WLX_SAS_ACTION_LOCK_WKSTA           = (3);
  {$EXTERNALSYM WLX_SAS_ACTION_LOCK_WKSTA}
  WLX_SAS_ACTION_LOGOFF               = (4);
  {$EXTERNALSYM WLX_SAS_ACTION_LOGOFF}
  WLX_SAS_ACTION_SHUTDOWN             = (5);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN}
  WLX_SAS_ACTION_PWD_CHANGED          = (6);
  {$EXTERNALSYM WLX_SAS_ACTION_PWD_CHANGED}
  WLX_SAS_ACTION_TASKLIST             = (7);
  {$EXTERNALSYM WLX_SAS_ACTION_TASKLIST}
  WLX_SAS_ACTION_UNLOCK_WKSTA         = (8);
  {$EXTERNALSYM WLX_SAS_ACTION_UNLOCK_WKSTA}
  WLX_SAS_ACTION_FORCE_LOGOFF         = (9);
  {$EXTERNALSYM WLX_SAS_ACTION_FORCE_LOGOFF}
  WLX_SAS_ACTION_SHUTDOWN_POWER_OFF   = (10);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_POWER_OFF}
  WLX_SAS_ACTION_SHUTDOWN_REBOOT      = (11);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_REBOOT}
  WLX_SAS_ACTION_SHUTDOWN_SLEEP       = (12);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP}
  WLX_SAS_ACTION_SHUTDOWN_SLEEP2      = (13);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP2}
  WLX_SAS_ACTION_SHUTDOWN_HIBERNATE   = (14);
  {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_HIBERNATE}
  WLX_SAS_ACTION_RECONNECTED          = (15);
  {$EXTERNALSYM WLX_SAS_ACTION_RECONNECTED}
  WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF = (16);
  {$EXTERNALSYM WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF}

////////////////////////////////////////////////////////////////////////
//                                                                    //
//  Window Messages                                                   //
//                                                                    //
////////////////////////////////////////////////////////////////////////

//
// The WM_SAS is defined as follows
//
//  The wParam parameter has the SAS Type (above)

  WLX_WM_SAS = (WM_USER + 601);
  {$EXTERNALSYM WLX_WM_SAS}

//
// Dialog return values
//
// These may be returned by dialogs started by a GINA dll.
//

  WLX_DLG_SAS                  = 101;
  {$EXTERNALSYM WLX_DLG_SAS}
  WLX_DLG_INPUT_TIMEOUT        = 102; // Input (keys, etc) timed out
  {$EXTERNALSYM WLX_DLG_INPUT_TIMEOUT}
  WLX_DLG_SCREEN_SAVER_TIMEOUT = 103; // Screen Saver activated
  {$EXTERNALSYM WLX_DLG_SCREEN_SAVER_TIMEOUT}
  WLX_DLG_USER_LOGOFF          = 104; // User logged off
  {$EXTERNALSYM WLX_DLG_USER_LOGOFF}

/////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// The WLX_PROFILE_* structure is returned from a GINA DLL
// following authentication.  This information is used by Winlogon
// to support supplemental Network Providers and to load the
// newly logged-on user's profile.
//
// Winlogon is responsible for freeing both the profile structure
// and the fields within the structure that are marked as separately
// deallocatable.
//

type
  PWLX_PROFILE_V1_0 = ^WLX_PROFILE_V1_0;
  {$EXTERNALSYM PWLX_PROFILE_V1_0}
  _WLX_PROFILE_V1_0 = record
    //
    // This field identifies the type of profile being returned by a
    // 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.
    //
    // The buffer pointed to by this field must be separately allocated.
    // Winlogon will free the buffer when it is no longer needed.
    //
    //
    pszProfile: PWSTR;
  end;
  {$EXTERNALSYM _WLX_PROFILE_V1_0}
  WLX_PROFILE_V1_0 = _WLX_PROFILE_V1_0;
  {$EXTERNALSYM WLX_PROFILE_V1_0}
  TWlxProfileV1_0 = WLX_PROFILE_V1_0;
  PWlxProfileV1_0 = PWLX_PROFILE_V1_0;

  PWLX_PROFILE_V2_0 = ^WLX_PROFILE_V2_0;
  {$EXTERNALSYM PWLX_PROFILE_V2_0}
  _WLX_PROFILE_V2_0 = record
    //
    // This field identifies the type of profile being returned by a

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -