jwawinwlx.pas 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398
  1. {******************************************************************************}
  2. { }
  3. { WinLogon API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: winwlx.h, released June 2000. The original Pascal }
  9. { code is: WinWlx.pas, released December 2000. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. // $Id: JwaWinWlx.pas,v 1.10 2005/09/06 16:36:51 marquardt Exp $
  43. unit JwaWinWlx;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "WinWlx.h"'}
  47. {$HPPEMIT ''}
  48. {$I jediapilib.inc}
  49. interface
  50. uses
  51. JwaWindows;
  52. // WLX == WinLogon eXtension
  53. //
  54. // This file contains definitions, data types, and routine prototypes
  55. // necessary to produce a replacement Graphical Identification aNd
  56. // Authentication (GINA) DLL for Winlogon.
  57. /////////////////////////////////////////////////////////////////////////
  58. /////////////////////////////////////////////////////////////////////////
  59. //
  60. // Revisions of Winlogon API available for use by GINAs
  61. // Version is two parts: Major revision and minor revision.
  62. // Major revision is the upper 16-bits, minor is the lower
  63. // 16-bits.
  64. //
  65. const
  66. WLX_VERSION_1_0 = $00010000;
  67. {$EXTERNALSYM WLX_VERSION_1_0}
  68. WLX_VERSION_1_1 = $00010001;
  69. {$EXTERNALSYM WLX_VERSION_1_1}
  70. WLX_VERSION_1_2 = $00010002;
  71. {$EXTERNALSYM WLX_VERSION_1_2}
  72. WLX_VERSION_1_3 = $00010003;
  73. {$EXTERNALSYM WLX_VERSION_1_3}
  74. WLX_VERSION_1_4 = $00010004;
  75. {$EXTERNALSYM WLX_VERSION_1_4}
  76. WLX_CURRENT_VERSION = WLX_VERSION_1_4;
  77. {$EXTERNALSYM WLX_CURRENT_VERSION}
  78. /////////////////////////////////////////////////////////////////////////
  79. /////////////////////////////////////////////////////////////////////////
  80. //
  81. // Secure attention sequence types
  82. // These values are passed to routines that have a dwSasType
  83. // parameter.
  84. //
  85. // ALL VALUES FROM 0 TO 127 ARE RESERVED FOR MICROSOFT DEFINITION.
  86. // VALUES ABOVE 127 ARE RESERVED FOR CUSTOMER DEFINITION.
  87. //
  88. // CTRL_ALT_DEL - used to indicate that the standard ctrl-alt-del
  89. // secure attention sequence has been entered.
  90. //
  91. // SCRNSVR_TIMEOUT - used to indicate that keyboard/mouse inactivity
  92. // has lead to a screensaver activation. It is up to the GINA
  93. // DLL whether this constitutes a workstation locking event.
  94. //
  95. // SCRNSVR_ACTIVITY - used to indicate that keyboard or mouse
  96. // activity occured while a secure screensaver was active.
  97. //
  98. // SC_INSERT - used to indicate that a smart card has been inserted
  99. // to a compatible device
  100. //
  101. // SC_REMOVE - used to indicate that a smart card has been removed
  102. // from a compatible device
  103. //
  104. WLX_SAS_TYPE_TIMEOUT = 0;
  105. {$EXTERNALSYM WLX_SAS_TYPE_TIMEOUT}
  106. WLX_SAS_TYPE_CTRL_ALT_DEL = 1;
  107. {$EXTERNALSYM WLX_SAS_TYPE_CTRL_ALT_DEL}
  108. WLX_SAS_TYPE_SCRNSVR_TIMEOUT = 2;
  109. {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_TIMEOUT}
  110. WLX_SAS_TYPE_SCRNSVR_ACTIVITY = 3;
  111. {$EXTERNALSYM WLX_SAS_TYPE_SCRNSVR_ACTIVITY}
  112. WLX_SAS_TYPE_USER_LOGOFF = 4;
  113. {$EXTERNALSYM WLX_SAS_TYPE_USER_LOGOFF}
  114. WLX_SAS_TYPE_SC_INSERT = 5;
  115. {$EXTERNALSYM WLX_SAS_TYPE_SC_INSERT}
  116. WLX_SAS_TYPE_SC_REMOVE = 6;
  117. {$EXTERNALSYM WLX_SAS_TYPE_SC_REMOVE}
  118. WLX_SAS_TYPE_AUTHENTICATED = 7;
  119. {$EXTERNALSYM WLX_SAS_TYPE_AUTHENTICATED}
  120. WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED = 8;
  121. {$EXTERNALSYM WLX_SAS_TYPE_SC_FIRST_READER_ARRIVED}
  122. WLX_SAS_TYPE_SC_LAST_READER_REMOVED = 9;
  123. {$EXTERNALSYM WLX_SAS_TYPE_SC_LAST_READER_REMOVED}
  124. WLX_SAS_TYPE_SWITCHUSER = 10;
  125. {$EXTERNALSYM WLX_SAS_TYPE_SWITCHUSER}
  126. WLX_SAS_TYPE_MAX_MSFT_VALUE = 127;
  127. {$EXTERNALSYM WLX_SAS_TYPE_MAX_MSFT_VALUE}
  128. //
  129. // This structure is available through WlxGetOption, and is
  130. // passed as the lParam for any S/C SAS notices sent to windows
  131. //
  132. type
  133. PWLX_SC_NOTIFICATION_INFO = ^WLX_SC_NOTIFICATION_INFO;
  134. {$EXTERNALSYM PWLX_SC_NOTIFICATION_INFO}
  135. _WLX_SC_NOTIFICATION_INFO = record
  136. pszCard: PWSTR;
  137. pszReader: PWSTR;
  138. pszContainer: PWSTR;
  139. pszCryptoProvider: PWSTR;
  140. end;
  141. {$EXTERNALSYM _WLX_SC_NOTIFICATION_INFO}
  142. WLX_SC_NOTIFICATION_INFO = _WLX_SC_NOTIFICATION_INFO;
  143. {$EXTERNALSYM WLX_SC_NOTIFICATION_INFO}
  144. TWlxScNotificationInfo = WLX_SC_NOTIFICATION_INFO;
  145. PWlxScNotificationInfo = PWLX_SC_NOTIFICATION_INFO;
  146. /////////////////////////////////////////////////////////////////////////
  147. /////////////////////////////////////////////////////////////////////////
  148. //
  149. // Upon successful logon, the GINA DLL may specify any of the following
  150. // options to Winlogon (via the dwOptions parameter of the WlxLoggedOutSas()
  151. // api). When set, these options specify:
  152. //
  153. // NO_PROFILE - Winlogon must NOT load a profile for the logged
  154. // on user. Either the GINA DLL will take care of
  155. // this activity, or the user does not need a profile.
  156. //
  157. const
  158. WLX_LOGON_OPT_NO_PROFILE = $00000001;
  159. {$EXTERNALSYM WLX_LOGON_OPT_NO_PROFILE}
  160. /////////////////////////////////////////////////////////////////////////
  161. /////////////////////////////////////////////////////////////////////////
  162. //
  163. // GINA DLLs are expected to return account information to Winlogon
  164. // following a successful logon. This information allows Winlogon
  165. // to support profile loading and supplemental network providers.
  166. //
  167. // To allow different sets of profile information to be returned
  168. // by GINAs over time, the first DWORD of each profile structure
  169. // is expected to contain a type-identifier. The following constants
  170. // are the defined profile type identifiers.
  171. //
  172. //
  173. // Standard profile is V2_0
  174. //
  175. WLX_PROFILE_TYPE_V1_0 = 1;
  176. {$EXTERNALSYM WLX_PROFILE_TYPE_V1_0}
  177. WLX_PROFILE_TYPE_V2_0 = 2;
  178. {$EXTERNALSYM WLX_PROFILE_TYPE_V2_0}
  179. /////////////////////////////////////////////////////////////////////////
  180. /////////////////////////////////////////////////////////////////////////
  181. //
  182. // WlxLoggedOnSas() and WlxWkstaLockedSas() return an action
  183. // value to Winlogon directing Winlogon to either remain unchanged
  184. // or to perform some action (such as force-log the user off).
  185. // These are the values that may be returned. Note, however, that
  186. // not all of the values may be returned by both of these api. See
  187. // the description of each api to see which values are expected from
  188. // each.
  189. //
  190. // LOGON - User has logged on
  191. // NONE - Don't change the state of the window station.
  192. // LOCK_WKSTA - Lock the workstation, wait for next SAS.
  193. // LOGOFF - Log the user off of the workstation.
  194. // SHUTDOWN - Log the user off and shutdown the machine.
  195. // PWD_CHANGED - Indicates that the user changed their password. Notify network providers.
  196. // TASKLIST - Invoke the task list.
  197. // UNLOCK_WKSTA - Unlock the workstation.
  198. // FORCE_LOGOFF - Forcibly log the user off.
  199. // SHUTDOWN_POWER_OFF - Turn off machine after shutting down.
  200. // SHUTDOWN_REBOOT - Reboot machine after shutting down.
  201. // SHUTDOWN_SLEEP - Put the machine to sleep
  202. // SHUTDOWN_SLEEP2 - Put the machine to sleep and disable wakeup events
  203. // SHUTDOWN_HIBERNATE - Hibernate the machine
  204. // RECONNECTED - Session was reconnected to an earlier session
  205. //
  206. WLX_SAS_ACTION_LOGON = 1;
  207. {$EXTERNALSYM WLX_SAS_ACTION_LOGON}
  208. WLX_SAS_ACTION_NONE = 2;
  209. {$EXTERNALSYM WLX_SAS_ACTION_NONE}
  210. WLX_SAS_ACTION_LOCK_WKSTA = 3;
  211. {$EXTERNALSYM WLX_SAS_ACTION_LOCK_WKSTA}
  212. WLX_SAS_ACTION_LOGOFF = 4;
  213. {$EXTERNALSYM WLX_SAS_ACTION_LOGOFF}
  214. WLX_SAS_ACTION_SHUTDOWN = 5;
  215. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN}
  216. WLX_SAS_ACTION_PWD_CHANGED = 6;
  217. {$EXTERNALSYM WLX_SAS_ACTION_PWD_CHANGED}
  218. WLX_SAS_ACTION_TASKLIST = 7;
  219. {$EXTERNALSYM WLX_SAS_ACTION_TASKLIST}
  220. WLX_SAS_ACTION_UNLOCK_WKSTA = 8;
  221. {$EXTERNALSYM WLX_SAS_ACTION_UNLOCK_WKSTA}
  222. WLX_SAS_ACTION_FORCE_LOGOFF = 9;
  223. {$EXTERNALSYM WLX_SAS_ACTION_FORCE_LOGOFF}
  224. WLX_SAS_ACTION_SHUTDOWN_POWER_OFF = 10;
  225. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_POWER_OFF}
  226. WLX_SAS_ACTION_SHUTDOWN_REBOOT = 11;
  227. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_REBOOT}
  228. WLX_SAS_ACTION_SHUTDOWN_SLEEP = 12;
  229. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP}
  230. WLX_SAS_ACTION_SHUTDOWN_SLEEP2 = 13;
  231. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_SLEEP2}
  232. WLX_SAS_ACTION_SHUTDOWN_HIBERNATE = 14;
  233. {$EXTERNALSYM WLX_SAS_ACTION_SHUTDOWN_HIBERNATE}
  234. WLX_SAS_ACTION_RECONNECTED = 15;
  235. {$EXTERNALSYM WLX_SAS_ACTION_RECONNECTED}
  236. WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF = 16;
  237. {$EXTERNALSYM WLX_SAS_ACTION_DELAYED_FORCE_LOGOFF}
  238. WLX_SAS_ACTION_SWITCH_CONSOLE = 17;
  239. {$EXTERNALSYM WLX_SAS_ACTION_SWITCH_CONSOLE}
  240. ////////////////////////////////////////////////////////////////////////
  241. // //
  242. // Window Messages //
  243. // //
  244. ////////////////////////////////////////////////////////////////////////
  245. //
  246. // The WM_SAS is defined as follows
  247. //
  248. // The wParam parameter has the SAS Type (above)
  249. WLX_WM_SAS = WM_USER + 601;
  250. {$EXTERNALSYM WLX_WM_SAS}
  251. //
  252. // Dialog return values
  253. //
  254. // These may be returned by dialogs started by a GINA dll.
  255. //
  256. WLX_DLG_SAS = 101;
  257. {$EXTERNALSYM WLX_DLG_SAS}
  258. WLX_DLG_INPUT_TIMEOUT = 102; // Input (keys, etc) timed out
  259. {$EXTERNALSYM WLX_DLG_INPUT_TIMEOUT}
  260. WLX_DLG_SCREEN_SAVER_TIMEOUT = 103; // Screen Saver activated
  261. {$EXTERNALSYM WLX_DLG_SCREEN_SAVER_TIMEOUT}
  262. WLX_DLG_USER_LOGOFF = 104; // User logged off
  263. {$EXTERNALSYM WLX_DLG_USER_LOGOFF}
  264. /////////////////////////////////////////////////////////////////////////
  265. /////////////////////////////////////////////////////////////////////////
  266. //
  267. // The WLX_PROFILE_* structure is returned from a GINA DLL
  268. // following authentication. This information is used by Winlogon
  269. // to support supplemental Network Providers and to load the
  270. // newly logged-on user's profile.
  271. //
  272. // Winlogon is responsible for freeing both the profile structure
  273. // and the fields within the structure that are marked as separately
  274. // deallocatable.
  275. //
  276. type
  277. PWLX_PROFILE_V1_0 = ^WLX_PROFILE_V1_0;
  278. {$EXTERNALSYM PWLX_PROFILE_V1_0}
  279. _WLX_PROFILE_V1_0 = record
  280. //
  281. // This field identifies the type of profile being returned by a
  282. // GINA DLL. Profile types are defined with the prefix
  283. // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
  284. // structure so the remainder of the structure may be referenced.
  285. //
  286. dwType: DWORD;
  287. //
  288. // pathname of profile to load for user.
  289. //
  290. // The buffer pointed to by this field must be separately allocated.
  291. // Winlogon will free the buffer when it is no longer needed.
  292. //
  293. //
  294. pszProfile: PWSTR;
  295. end;
  296. {$EXTERNALSYM _WLX_PROFILE_V1_0}
  297. WLX_PROFILE_V1_0 = _WLX_PROFILE_V1_0;
  298. {$EXTERNALSYM WLX_PROFILE_V1_0}
  299. TWlxProfileV1_0 = WLX_PROFILE_V1_0;
  300. PWlxProfileV1_0 = PWLX_PROFILE_V1_0;
  301. PWLX_PROFILE_V2_0 = ^WLX_PROFILE_V2_0;
  302. {$EXTERNALSYM PWLX_PROFILE_V2_0}
  303. _WLX_PROFILE_V2_0 = record
  304. //
  305. // This field identifies the type of profile being returned by a
  306. // GINA DLL. Profile types are defined with the prefix
  307. // WLX_PROFILE_TYPE_xxx. It allows Winlogon to typecast the
  308. // structure so the remainder of the structure may be referenced.
  309. //
  310. dwType: DWORD;
  311. //
  312. // pathname of profile to load for user.
  313. //
  314. // This parameter can be NULL. If so, the user has a local
  315. // profile only.
  316. //
  317. // The buffer pointed to by this field must be separately allocated.
  318. // Winlogon will free the buffer when it is no longer needed.
  319. //
  320. //
  321. pszProfile: PWSTR;
  322. //
  323. // pathname of policy to load for user.
  324. //
  325. // This parameter can be NULL which prevents network wide policy
  326. // from being applied.
  327. //
  328. // The buffer pointed to by this field must be separately allocated.
  329. // Winlogon will free the buffer when it is no longer needed.
  330. //
  331. //
  332. pszPolicy: PWSTR;
  333. //
  334. // pathname of network default user profile
  335. //
  336. // This parameter can be NULL, which causes the Default User
  337. // profile on the local machine to be used.
  338. //
  339. // The buffer pointed to by this field must be separately allocated.
  340. // Winlogon will free the buffer when it is no longer needed.
  341. //
  342. //
  343. pszNetworkDefaultUserProfile: PWSTR;
  344. //
  345. // name of the server which validated the user account
  346. //
  347. // This is used to enumerate globals groups the user belongs
  348. // to for policy support. This parameter can be NULL.
  349. //
  350. // The buffer pointed to by this field must be separately allocated.
  351. // Winlogon will free the buffer when it is no longer needed.
  352. //
  353. //
  354. pszServerName: PWSTR;
  355. //
  356. // pointer to a series of null terminated environment variables
  357. //
  358. // envname=environment variable value
  359. // - or -
  360. // envname=%OtherVar%\more text
  361. //
  362. // Each environment variable is NULL terminated with the last
  363. // environment variable double NULL terminated. These variables
  364. // are set into the user's initial environment. The environment
  365. // variable value can contain other environment variables wrapped
  366. // in "%" signs. This parameter can be NULL.
  367. //
  368. // The buffer pointed to by this field must be separately allocated.
  369. // Winlogon will free the buffer when it is no longer needed.
  370. //
  371. //
  372. pszEnvironment: PWSTR;
  373. end;
  374. {$EXTERNALSYM _WLX_PROFILE_V2_0}
  375. WLX_PROFILE_V2_0 = _WLX_PROFILE_V2_0;
  376. {$EXTERNALSYM WLX_PROFILE_V2_0}
  377. TWlxProfileV2_0 = WLX_PROFILE_V2_0;
  378. PWlxProfileV2_0 = PWLX_PROFILE_V2_0;
  379. /////////////////////////////////////////////////////////////////////////
  380. /////////////////////////////////////////////////////////////////////////
  381. //
  382. // The WLX_NPR_NOTIFICATION_INFO structure is returned
  383. // from a GINA DLL following successful authentication.
  384. // This information is used by Winlogon to provide
  385. // identification and authentication information already
  386. // collected to network providers. Winlogon is
  387. // responsible for freeing both the main structure and all
  388. // string and other buffers pointed to from within the
  389. // structure.
  390. //
  391. PWLX_MPR_NOTIFY_INFO = ^WLX_MPR_NOTIFY_INFO;
  392. {$EXTERNALSYM PWLX_MPR_NOTIFY_INFO}
  393. _WLX_MPR_NOTIFY_INFO = record
  394. //
  395. // The name of the account logged onto (e.g. REDMOND\Joe).
  396. // The string pointed to by this field must be separately
  397. // allocated and will be separately deallocated by Winlogon.
  398. //
  399. pszUserName: PWSTR;
  400. //
  401. // The string pointed to by this field must be separately
  402. // allocated and will be separately deallocated by Winlogon.
  403. //
  404. pszDomain: PWSTR;
  405. //
  406. // Cleartext password of the user account. If the OldPassword
  407. // field is non-null, then this field contains the new password
  408. // in a password change operation. The string pointed to by
  409. // this field must be separately allocated and will be seperately
  410. // deallocated by Winlogon.
  411. //
  412. pszPassword: PWSTR;
  413. //
  414. // Cleartext old password of the user account whose password
  415. // has just been changed. The Password field contains the new
  416. // password. The string pointed to by this field must be
  417. // separately allocated and will be separately deallocated by
  418. // Winlogon.
  419. //
  420. pszOldPassword: PWSTR;
  421. end;
  422. {$EXTERNALSYM _WLX_MPR_NOTIFY_INFO}
  423. WLX_MPR_NOTIFY_INFO = _WLX_MPR_NOTIFY_INFO;
  424. {$EXTERNALSYM WLX_MPR_NOTIFY_INFO}
  425. TWlxMprNotifyInfo = WLX_MPR_NOTIFY_INFO;
  426. PWlxMprNotifyInfo = PWLX_MPR_NOTIFY_INFO;
  427. /////////////////////////////////////////////////////////////////////////
  428. /////////////////////////////////////////////////////////////////////////
  429. //
  430. // WLX_TERMINAL_SERVICES_DATA is used by the GINA during a
  431. // WlxQueryTerminalServicesData() callback into WinLogon from the
  432. // WlxLoggedOutSAS() context, after the user name and domain are known.
  433. // This structure relates to TS user configuration information which is
  434. // retrieved from the Domain Controller and SAM database. Having WinLogon
  435. // pass this information means the GINA does not need to do the same
  436. // off-machines lookups again.
  437. //
  438. const
  439. WLX_DIRECTORY_LENGTH = 256;
  440. {$EXTERNALSYM WLX_DIRECTORY_LENGTH}
  441. type
  442. PWLX_TERMINAL_SERVICES_DATA = ^WLX_TERMINAL_SERVICES_DATA;
  443. {$EXTERNALSYM PWLX_TERMINAL_SERVICES_DATA}
  444. _WLX_TERMINAL_SERVICES_DATA = record
  445. //
  446. // TS profile path, overrides the standard profile path.
  447. //
  448. ProfilePath: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
  449. //
  450. // TS home directory, overrides standard home directory.
  451. //
  452. HomeDir: array [0..WLX_DIRECTORY_LENGTH] of WCHAR;
  453. //
  454. // TS home directory drive, overrides standard drive.
  455. //
  456. HomeDirDrive: array [0..3] of WCHAR;
  457. end;
  458. {$EXTERNALSYM _WLX_TERMINAL_SERVICES_DATA}
  459. WLX_TERMINAL_SERVICES_DATA = _WLX_TERMINAL_SERVICES_DATA;
  460. {$EXTERNALSYM WLX_TERMINAL_SERVICES_DATA}
  461. TWlxTerminalServicesData = WLX_TERMINAL_SERVICES_DATA;
  462. PWlxTerminalServicesData = PWLX_TERMINAL_SERVICES_DATA;
  463. /////////////////////////////////////////////////////////////////////////
  464. /////////////////////////////////////////////////////////////////////////
  465. //
  466. // The WLX_CLIENT_CREDENTIALS_INFO structure is returned
  467. // from winlogon from the WlxQueryClientCredentials() call.
  468. //
  469. // This allows a network client WinStation to pass client
  470. // credentials for automatic logon.
  471. //
  472. // The MSGINA DLL is responsible for freeing the memory
  473. // and substrings with LocalFree().
  474. //
  475. const
  476. WLX_CREDENTIAL_TYPE_V1_0 = 1;
  477. {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V1_0}
  478. WLX_CREDENTIAL_TYPE_V2_0 = 2;
  479. {$EXTERNALSYM WLX_CREDENTIAL_TYPE_V2_0}
  480. type
  481. PWLX_CLIENT_CREDENTIALS_INFO_V1_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V1_0;
  482. {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V1_0}
  483. _WLX_CLIENT_CREDENTIALS_INFO = record
  484. //
  485. // This field identifies the type of credentials structure being allocated
  486. // by GINA DLL. Credential types are defined with the prefix
  487. // WLX_CREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
  488. // structure so the remainder of the structure may be referenced.
  489. //
  490. dwType: DWORD;
  491. pszUserName: PWSTR;
  492. pszDomain: PWSTR;
  493. pszPassword: PWSTR;
  494. //
  495. // This field forces a prompt for the password. This
  496. // is due to an administrator override.
  497. //
  498. // This allows the distinguishing of autologon
  499. // with no password.
  500. //
  501. fPromptForPassword: BOOL;
  502. end;
  503. {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO}
  504. WLX_CLIENT_CREDENTIALS_INFO_V1_0 = _WLX_CLIENT_CREDENTIALS_INFO;
  505. {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V1_0}
  506. TWlxClientCredentialsInfoV1_0 = WLX_CLIENT_CREDENTIALS_INFO_V1_0;
  507. PWlxClientCredentialsInfoV1_0 = PWLX_CLIENT_CREDENTIALS_INFO_V1_0;
  508. _WLX_CLIENT_CREDENTIALS_INFO_V2_0 = record
  509. dwType: DWORD;
  510. pszUserName: PWSTR;
  511. pszDomain: PWSTR;
  512. pszPassword: PWSTR;
  513. fPromptForPassword: BOOL;
  514. //
  515. // This field tells winlogon to disconnect/abort the logon attempt if the
  516. // provided password is incorrect, or if it should reprompt (current
  517. // behavior)
  518. //
  519. fDisconnectOnLogonFailure: BOOL;
  520. end;
  521. {$EXTERNALSYM _WLX_CLIENT_CREDENTIALS_INFO_V2_0}
  522. WLX_CLIENT_CREDENTIALS_INFO_V2_0 = _WLX_CLIENT_CREDENTIALS_INFO_V2_0;
  523. {$EXTERNALSYM WLX_CLIENT_CREDENTIALS_INFO_V2_0}
  524. PWLX_CLIENT_CREDENTIALS_INFO_V2_0 = ^WLX_CLIENT_CREDENTIALS_INFO_V2_0;
  525. {$EXTERNALSYM PWLX_CLIENT_CREDENTIALS_INFO_V2_0}
  526. TWlxClientCredentialsInfoV2_0 = WLX_CLIENT_CREDENTIALS_INFO_V2_0;
  527. PWlxClientCredentialsInfoV2_0 = PWLX_CLIENT_CREDENTIALS_INFO_V2_0;
  528. /////////////////////////////////////////////////////////////////////////
  529. /////////////////////////////////////////////////////////////////////////
  530. //
  531. // The WLX_CONSOLESWITCH_CREDENTIALS_INFO structure is returned
  532. // from gina in response to WlxGetConsoleSwitchCredentials calls.
  533. // This structure is also returned from winlogon in response to
  534. // to WlxQueryConsoleSwitchCredentials call
  535. //
  536. // This is used to implement single session Terminal Server. A remote
  537. // session winlogon calls WlxGetConsoleSwitchCredentials to get the token
  538. // and other info of the logged on user from msgina. This info is then passed to
  539. // the console session winlogon to autologon the user on the console session.
  540. // The gina on console session calls WlxQueryConsoleSwitchCredentials to get
  541. // this info from winlogon and logs on the user.
  542. //
  543. // The caller is responsible for freeing the memory
  544. // and substrings with LocalFree().
  545. //
  546. const
  547. WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0 = 1;
  548. {$EXTERNALSYM WLX_CONSOLESWITCHCREDENTIAL_TYPE_V1_0}
  549. type
  550. _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = record
  551. //
  552. // This field identifies the type of credentials structure being allocated
  553. // Credential types are defined with the prefix
  554. // WLX_CONSOLESWITCHCREDENTIAL_TYPE_xxx. It allows Winlogon to typecast the
  555. // structure so the remainder of the structure may be referenced.
  556. //
  557. dwType: DWORD;
  558. UserToken: HANDLE;
  559. LogonId: LUID;
  560. Quotas: QUOTA_LIMITS;
  561. UserName: PWSTR;
  562. Domain: PWSTR;
  563. LogonTime: LARGE_INTEGER;
  564. SmartCardLogon: BOOL;
  565. ProfileLength: ULONG;
  566. //
  567. // From MSV1_0_INTERACTIVE_PROFILE
  568. //
  569. MessageType: DWORD;
  570. LogonCount: USHORT;
  571. BadPasswordCount: USHORT;
  572. ProfileLogonTime: LARGE_INTEGER;
  573. LogoffTime: LARGE_INTEGER;
  574. KickOffTime: LARGE_INTEGER;
  575. PasswordLastSet: LARGE_INTEGER;
  576. PasswordCanChange: LARGE_INTEGER;
  577. PasswordMustChange: LARGE_INTEGER;
  578. LogonScript: PWSTR;
  579. HomeDirectory: PWSTR;
  580. FullName: PWSTR;
  581. ProfilePath: PWSTR;
  582. HomeDirectoryDrive: PWSTR;
  583. LogonServer: PWSTR;
  584. UserFlags: ULONG;
  585. PrivateDataLen: ULONG;
  586. PrivateData: PBYTE;
  587. end;
  588. {$EXTERNALSYM _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
  589. WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = _WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
  590. {$EXTERNALSYM WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
  591. PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0 = ^WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
  592. {$EXTERNALSYM PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0}
  593. TWlxConsoleSwitchCredentialsInfoV1_0 = WLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
  594. PWlxConsoleSwitchCredentialsInfoV1_0 = PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0;
  595. ////////////////////////////////////////////////////////////////////////
  596. // //
  597. // Services that replacement GINAs ** MUST ** provide //
  598. // //
  599. ////////////////////////////////////////////////////////////////////////
  600. {$IFDEF MSGINA_IMPORT}
  601. {$IFDEF MSGINA1_0}
  602. function WlxNegotiate(dwWinlogonVersion: DWORD; var pdwDllVersion: WORD): BOOL; stdcall;
  603. {$EXTERNALSYM WlxNegotiate}
  604. function WlxInitialize(lpWinsta: LPWSTR; hWlx: HANDLE; pvReserved: PVOID;
  605. pWinlogonFunctions: PVOID; var pWlxContext: PVOID): BOOL; stdcall;
  606. {$EXTERNALSYM WlxInitialize}
  607. procedure WlxDisplaySASNotice(pWlxContext: PVOID); stdcall;
  608. {$EXTERNALSYM WlxDisplaySASNotice}
  609. function WlxLoggedOutSAS(pWlxContext: PVOID; dwSasType: DWORD;
  610. var pAuthenticationId: LUID; var pLogonSid: SID; var pdwOptions: DWORD;
  611. var phToken: HANDLE; var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO;
  612. var pProfile: PVOID): Integer; stdcall;
  613. {$EXTERNALSYM WlxLoggedOutSAS}
  614. function WlxActivateUserShell(pWlxContext: PVOID; pszDesktopName: PWSTR;
  615. pszMprLogonScript: PWSTR; pEnvironment: PVOID): BOOL; stdcall;
  616. {$EXTERNALSYM WlxActivateUserShell}
  617. function WlxLoggedOnSAS(pWlxContext: PVOID; dwSasType: DWORD; pReserved: PVOID): Integer; stdcall;
  618. {$EXTERNALSYM WlxLoggedOnSAS}
  619. procedure WlxDisplayLockedNotice(pWlxContext: PVOID); stdcall;
  620. {$EXTERNALSYM WlxDisplayLockedNotice}
  621. function WlxWkstaLockedSAS(pWlxContext: PVOID; dwSasType: DWORD): Integer; stdcall;
  622. {$EXTERNALSYM WlxWkstaLockedSAS}
  623. function WlxIsLockOk(pWlxContext: PVOID): BOOL; stdcall;
  624. {$EXTERNALSYM WlxIsLockOk}
  625. function WlxIsLogoffOk(pWlxContext: PVOID): BOOL; stdcall;
  626. {$EXTERNALSYM WlxIsLogoffOk}
  627. procedure WlxLogoff(pWlxContext: PVOID); stdcall;
  628. {$EXTERNALSYM WlxLogoff}
  629. procedure WlxShutdown(pWlxContext: PVOID; ShutdownType: DWORD); stdcall;
  630. {$EXTERNALSYM WlxShutdown}
  631. {$ENDIF MSGINA1_0}
  632. {$IFDEF MSGINA1_1}
  633. function WlxScreenSaverNotify(pWlxContext: PVOID; var pSecure: BOOL): BOOL; stdcall;
  634. {$EXTERNALSYM WlxScreenSaverNotify}
  635. function WlxStartApplication(pWlxContext: PVOID; pszDesktopName: PWSTR;
  636. pEnvironment: PVOID; pszCmdLine: PWSTR): BOOL; stdcall;
  637. {$EXTERNALSYM WlxStartApplication}
  638. {$ENDIF MSGINA1_1}
  639. {$IFDEF MSGINA1_3}
  640. function WlxNetworkProviderLoad(pWlxContext: PVOID;
  641. var pNprNotifyInfo: WLX_MPR_NOTIFY_INFO): BOOL; stdcall;
  642. {$EXTERNALSYM WlxNetworkProviderLoad}
  643. const
  644. STATUSMSG_OPTION_NOANIMATION = $00000001;
  645. {$EXTERNALSYM STATUSMSG_OPTION_NOANIMATION}
  646. STATUSMSG_OPTION_SETFOREGROUND = $00000002;
  647. {$EXTERNALSYM STATUSMSG_OPTION_SETFOREGROUND}
  648. function WlxDisplayStatusMessage(pWlxContext: PVOID; hDesktop: HDESK;
  649. dwOptions: DWORD; pTitle: PWSTR; pMessage: PWSTR): BOOL; stdcall;
  650. {$EXTERNALSYM WlxDisplayStatusMessage}
  651. function WlxGetStatusMessage(pWlxContext: PVOID; var pdwOptions: DWORD;
  652. pMessage: PWSTR; dwBufferSize: DWORD): BOOL; stdcall;
  653. {$EXTERNALSYM WlxGetStatusMessage}
  654. function WlxRemoveStatusMessage(pWlxContext: PVOID): BOOL; stdcall;
  655. {$EXTERNALSYM WlxRemoveStatusMessage}
  656. {$ENDIF MSGINA1_3}
  657. {$IFDEF MSGINA1_4}
  658. function WlxGetConsoleSwitchCredentials(pWlxContext, pCredInfo: PVOID): BOOL; stdcall;
  659. {$EXTERNALSYM WlxGetConsoleSwitchCredentials}
  660. procedure WlxReconnectNotify(pWlxContext: PVOID); stdcall;
  661. {$EXTERNALSYM WlxReconnectNotify}
  662. procedure WlxDisconnectNotify(pWlxContext: PVOID); stdcall;
  663. {$EXTERNALSYM WlxDisconnectNotify}
  664. {$ENDIF MSGINA1_4}
  665. {$ENDIF MSGINA_IMPORT}
  666. ////////////////////////////////////////////////////////////////////////
  667. // //
  668. // Services that Winlogon provides //
  669. // //
  670. ////////////////////////////////////////////////////////////////////////
  671. type
  672. PWLX_DESKTOP = ^WLX_DESKTOP;
  673. {$EXTERNALSYM PWLX_DESKTOP}
  674. _WLX_DESKTOP = record
  675. Size: DWORD;
  676. Flags: DWORD;
  677. hDesktop: HDESK;
  678. pszDesktopName: PWSTR;
  679. end;
  680. {$EXTERNALSYM _WLX_DESKTOP}
  681. WLX_DESKTOP = _WLX_DESKTOP;
  682. {$EXTERNALSYM WLX_DESKTOP}
  683. TWlxDesktop = WLX_DESKTOP;
  684. PWlxDesktop = PWLX_DESKTOP;
  685. const
  686. WLX_DESKTOP_NAME = $00000001; // Name present
  687. {$EXTERNALSYM WLX_DESKTOP_NAME}
  688. WLX_DESKTOP_HANDLE = $00000002; // Handle present
  689. {$EXTERNALSYM WLX_DESKTOP_HANDLE}
  690. type
  691. PWLX_USE_CTRL_ALT_DEL = procedure(hWlx: HANDLE); stdcall;
  692. {$EXTERNALSYM PWLX_USE_CTRL_ALT_DEL}
  693. PWLX_SET_CONTEXT_POINTER = procedure(hWlx: HANDLE; pWlxContext: PVOID); stdcall;
  694. {$EXTERNALSYM PWLX_SET_CONTEXT_POINTER}
  695. PWLX_SAS_NOTIFY = procedure(hWlx: HANDLE; dwSasType: DWORD); stdcall;
  696. {$EXTERNALSYM PWLX_SAS_NOTIFY}
  697. PWLX_SET_TIMEOUT = function(hWlx: HANDLE; Timeout: DWORD): BOOL; stdcall;
  698. {$EXTERNALSYM PWLX_SET_TIMEOUT}
  699. PWLX_ASSIGN_SHELL_PROTECTION = function(hWlx, hToken, hProcess, hThread: HANDLE): Integer; stdcall;
  700. {$EXTERNALSYM PWLX_ASSIGN_SHELL_PROTECTION}
  701. PWLX_MESSAGE_BOX = function(hWlx: HANDLE; hwndOwner: HWND; lpszText,
  702. lpszTitle: LPWSTR; fuStyle: UINT): Integer; stdcall;
  703. {$EXTERNALSYM PWLX_MESSAGE_BOX}
  704. PWLX_DIALOG_BOX = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
  705. hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
  706. {$EXTERNALSYM PWLX_DIALOG_BOX}
  707. PWLX_DIALOG_BOX_INDIRECT = function(hWlx, hInst: HANDLE;
  708. hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC): Integer; stdcall;
  709. {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT}
  710. PWLX_DIALOG_BOX_PARAM = function(hWlx, hInst: HANDLE; lpszTemplate: LPWSTR;
  711. hwndOwner: HWND; dlgprc: DLGPROC; dwInitParam: LPARAM): Integer; stdcall;
  712. {$EXTERNALSYM PWLX_DIALOG_BOX_PARAM}
  713. PWLX_DIALOG_BOX_INDIRECT_PARAM = function(hWlx, hInst: HANDLE;
  714. hDialogTemplate: LPCDLGTEMPLATE; hwndOwner: HWND; dlgprc: DLGPROC;
  715. dwInitParam: LPARAM): Integer; stdcall;
  716. {$EXTERNALSYM PWLX_DIALOG_BOX_INDIRECT_PARAM}
  717. PWLX_SWITCH_DESKTOP_TO_USER = function(hWlx: HANDLE): Integer; stdcall;
  718. {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_USER}
  719. PWLX_SWITCH_DESKTOP_TO_WINLOGON = function(hWlx: HANDLE): Integer; stdcall;
  720. {$EXTERNALSYM PWLX_SWITCH_DESKTOP_TO_WINLOGON}
  721. PWLX_CHANGE_PASSWORD_NOTIFY = function(hWlx: HANDLE;
  722. var pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD): Integer; stdcall;
  723. {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY}
  724. PWLX_GET_SOURCE_DESKTOP = function(hWlx: HANDLE; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
  725. {$EXTERNALSYM PWLX_GET_SOURCE_DESKTOP}
  726. PWLX_SET_RETURN_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP): BOOL; stdcall;
  727. {$EXTERNALSYM PWLX_SET_RETURN_DESKTOP}
  728. PWLX_CREATE_USER_DESKTOP = function(hWlx, hToken: HANDLE; Flags: DWORD;
  729. pszDesktopName: PWSTR; var ppDesktop: PWLX_DESKTOP): BOOL; stdcall;
  730. {$EXTERNALSYM PWLX_CREATE_USER_DESKTOP}
  731. const
  732. WLX_CREATE_INSTANCE_ONLY = $00000001;
  733. {$EXTERNALSYM WLX_CREATE_INSTANCE_ONLY}
  734. WLX_CREATE_USER = $00000002;
  735. {$EXTERNALSYM WLX_CREATE_USER}
  736. type
  737. PWLX_CHANGE_PASSWORD_NOTIFY_EX = function(hWlx: HANDLE;
  738. const pMprInfo: WLX_MPR_NOTIFY_INFO; dwChangeInfo: DWORD;
  739. ProviderName: PWSTR; Reserved: PVOID): Integer; stdcall;
  740. {$EXTERNALSYM PWLX_CHANGE_PASSWORD_NOTIFY_EX}
  741. PWLX_CLOSE_USER_DESKTOP = function(hWlx: HANDLE; const pDesktop: WLX_DESKTOP;
  742. hToken: HANDLE): BOOL; stdcall;
  743. {$EXTERNALSYM PWLX_CLOSE_USER_DESKTOP}
  744. PWLX_SET_OPTION = function(hWlx: HANDLE; Option: DWORD; Value: ULONG_PTR;
  745. var OldValue: ULONG_PTR): BOOL; stdcall;
  746. {$EXTERNALSYM PWLX_SET_OPTION}
  747. PWLX_GET_OPTION = function(hWlx: HANDLE; Option: DWORD; var Value: ULONG_PTR): BOOL; stdcall;
  748. {$EXTERNALSYM PWLX_GET_OPTION}
  749. PWLX_WIN31_MIGRATE = procedure(hWlx: HANDLE); stdcall;
  750. {$EXTERNALSYM PWLX_WIN31_MIGRATE}
  751. PWLX_QUERY_CLIENT_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
  752. {$EXTERNALSYM PWLX_QUERY_CLIENT_CREDENTIALS}
  753. PWLX_QUERY_IC_CREDENTIALS = function(var pCred: WLX_CLIENT_CREDENTIALS_INFO_V1_0): BOOL; stdcall;
  754. {$EXTERNALSYM PWLX_QUERY_IC_CREDENTIALS}
  755. PWLX_QUERY_TS_LOGON_CREDENTIALS = function(pCred: PWLX_CLIENT_CREDENTIALS_INFO_V2_0): BOOL; stdcall;
  756. {$EXTERNALSYM PWLX_QUERY_TS_LOGON_CREDENTIALS}
  757. PWLX_DISCONNECT = function : BOOL; stdcall;
  758. {$EXTERNALSYM PWLX_DISCONNECT}
  759. PWLX_QUERY_TERMINAL_SERVICES_DATA = function(hWlx: HANDLE;
  760. var pTSData: WLX_TERMINAL_SERVICES_DATA; UserName, Domain: PWCHAR): DWORD; stdcall;
  761. {$EXTERNALSYM PWLX_DISCONNECT}
  762. PWLX_QUERY_CONSOLESWITCH_CREDENTIALS = function(pCred: PWLX_CONSOLESWITCH_CREDENTIALS_INFO_V1_0): DWORD; stdcall;
  763. {$EXTERNALSYM PWLX_QUERY_CONSOLESWITCH_CREDENTIALS}
  764. //
  765. // Options that can be get or set:
  766. //
  767. const
  768. WLX_OPTION_USE_CTRL_ALT_DEL = $00000001;
  769. {$EXTERNALSYM WLX_OPTION_USE_CTRL_ALT_DEL}
  770. WLX_OPTION_CONTEXT_POINTER = $00000002;
  771. {$EXTERNALSYM WLX_OPTION_CONTEXT_POINTER}
  772. WLX_OPTION_USE_SMART_CARD = $00000003;
  773. {$EXTERNALSYM WLX_OPTION_USE_SMART_CARD}
  774. WLX_OPTION_FORCE_LOGOFF_TIME = $00000004;
  775. {$EXTERNALSYM WLX_OPTION_FORCE_LOGOFF_TIME}
  776. WLX_OPTION_IGNORE_AUTO_LOGON = $00000008;
  777. {$EXTERNALSYM WLX_OPTION_IGNORE_AUTO_LOGON}
  778. WLX_OPTION_NO_SWITCH_ON_SAS = $00000009;
  779. {$EXTERNALSYM WLX_OPTION_NO_SWITCH_ON_SAS}
  780. //
  781. // Options that can be queried only:
  782. //
  783. WLX_OPTION_SMART_CARD_PRESENT = $00010001;
  784. {$EXTERNALSYM WLX_OPTION_SMART_CARD_PRESENT}
  785. WLX_OPTION_SMART_CARD_INFO = $00010002;
  786. {$EXTERNALSYM WLX_OPTION_SMART_CARD_INFO}
  787. WLX_OPTION_DISPATCH_TABLE_SIZE = $00010003;
  788. {$EXTERNALSYM WLX_OPTION_DISPATCH_TABLE_SIZE}
  789. ////////////////////////////////////////////////////////////////////////
  790. // //
  791. // Function dispatch tables. //
  792. // One of the following tables will be passed to the GINA DLL //
  793. // in the WlxInitialize() call during initialization. //
  794. // //
  795. ////////////////////////////////////////////////////////////////////////
  796. type
  797. PWLX_DISPATCH_VERSION_1_0 = ^WLX_DISPATCH_VERSION_1_0;
  798. {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_0}
  799. _WLX_DISPATCH_VERSION_1_0 = record
  800. WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
  801. WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
  802. WlxSasNotify: PWLX_SAS_NOTIFY;
  803. WlxSetTimeout: PWLX_SET_TIMEOUT;
  804. WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
  805. WlxMessageBox: PWLX_MESSAGE_BOX;
  806. WlxDialogBox: PWLX_DIALOG_BOX;
  807. WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
  808. WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
  809. WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
  810. WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
  811. WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
  812. WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
  813. end;
  814. {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_0}
  815. WLX_DISPATCH_VERSION_1_0 = _WLX_DISPATCH_VERSION_1_0;
  816. {$EXTERNALSYM WLX_DISPATCH_VERSION_1_0}
  817. TWlxDispatchVersion1_0 = WLX_DISPATCH_VERSION_1_0;
  818. PWlxDispatchVersion1_0 = PWLX_DISPATCH_VERSION_1_0;
  819. PWLX_DISPATCH_VERSION_1_1 = ^WLX_DISPATCH_VERSION_1_1;
  820. {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_1}
  821. _WLX_DISPATCH_VERSION_1_1 = record
  822. WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
  823. WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
  824. WlxSasNotify: PWLX_SAS_NOTIFY;
  825. WlxSetTimeout: PWLX_SET_TIMEOUT;
  826. WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
  827. WlxMessageBox: PWLX_MESSAGE_BOX;
  828. WlxDialogBox: PWLX_DIALOG_BOX;
  829. WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
  830. WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
  831. WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
  832. WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
  833. WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
  834. WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
  835. WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
  836. WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
  837. WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
  838. WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
  839. end;
  840. {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_1}
  841. WLX_DISPATCH_VERSION_1_1 = _WLX_DISPATCH_VERSION_1_1;
  842. {$EXTERNALSYM WLX_DISPATCH_VERSION_1_1}
  843. TWlxDispatchVersion1_1 = WLX_DISPATCH_VERSION_1_1;
  844. PWlxDispatchVersion1_1 = PWLX_DISPATCH_VERSION_1_1;
  845. PWLX_DISPATCH_VERSION_1_2 = ^WLX_DISPATCH_VERSION_1_2;
  846. {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_2}
  847. _WLX_DISPATCH_VERSION_1_2 = record
  848. WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
  849. WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
  850. WlxSasNotify: PWLX_SAS_NOTIFY;
  851. WlxSetTimeout: PWLX_SET_TIMEOUT;
  852. WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
  853. WlxMessageBox: PWLX_MESSAGE_BOX;
  854. WlxDialogBox: PWLX_DIALOG_BOX;
  855. WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
  856. WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
  857. WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
  858. WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
  859. WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
  860. WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
  861. WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
  862. WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
  863. WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
  864. WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
  865. WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
  866. end;
  867. {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_2}
  868. WLX_DISPATCH_VERSION_1_2 = _WLX_DISPATCH_VERSION_1_2;
  869. {$EXTERNALSYM WLX_DISPATCH_VERSION_1_2}
  870. TWlxDispatchVersion1_2 = WLX_DISPATCH_VERSION_1_2;
  871. PWlxDispatchVersion1_2 = PWLX_DISPATCH_VERSION_1_2;
  872. PWLX_DISPATCH_VERSION_1_3 = ^WLX_DISPATCH_VERSION_1_3;
  873. {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_3}
  874. _WLX_DISPATCH_VERSION_1_3 = record
  875. WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
  876. WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
  877. WlxSasNotify: PWLX_SAS_NOTIFY;
  878. WlxSetTimeout: PWLX_SET_TIMEOUT;
  879. WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
  880. WlxMessageBox: PWLX_MESSAGE_BOX;
  881. WlxDialogBox: PWLX_DIALOG_BOX;
  882. WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
  883. WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
  884. WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
  885. WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
  886. WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
  887. WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
  888. WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
  889. WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
  890. WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
  891. WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
  892. WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
  893. WlxSetOption: PWLX_SET_OPTION;
  894. WlxGetOption: PWLX_GET_OPTION;
  895. WlxWin31Migrate: PWLX_WIN31_MIGRATE;
  896. WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
  897. WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
  898. WlxDisconnect: PWLX_DISCONNECT;
  899. WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
  900. end;
  901. {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_3}
  902. WLX_DISPATCH_VERSION_1_3 = _WLX_DISPATCH_VERSION_1_3;
  903. {$EXTERNALSYM WLX_DISPATCH_VERSION_1_3}
  904. TWlxDispatchVersion1_3 = WLX_DISPATCH_VERSION_1_3;
  905. PWlxDispatchVersion1_3 = PWLX_DISPATCH_VERSION_1_3;
  906. PWLX_DISPATCH_VERSION_1_4 = ^WLX_DISPATCH_VERSION_1_4;
  907. {$EXTERNALSYM PWLX_DISPATCH_VERSION_1_4}
  908. _WLX_DISPATCH_VERSION_1_4 = record
  909. WlxUseCtrlAltDel: PWLX_USE_CTRL_ALT_DEL;
  910. WlxSetContextPointer: PWLX_SET_CONTEXT_POINTER;
  911. WlxSasNotify: PWLX_SAS_NOTIFY;
  912. WlxSetTimeout: PWLX_SET_TIMEOUT;
  913. WlxAssignShellProtection: PWLX_ASSIGN_SHELL_PROTECTION;
  914. WlxMessageBox: PWLX_MESSAGE_BOX;
  915. WlxDialogBox: PWLX_DIALOG_BOX;
  916. WlxDialogBoxParam: PWLX_DIALOG_BOX_PARAM;
  917. WlxDialogBoxIndirect: PWLX_DIALOG_BOX_INDIRECT;
  918. WlxDialogBoxIndirectParam: PWLX_DIALOG_BOX_INDIRECT_PARAM;
  919. WlxSwitchDesktopToUser: PWLX_SWITCH_DESKTOP_TO_USER;
  920. WlxSwitchDesktopToWinlogon: PWLX_SWITCH_DESKTOP_TO_WINLOGON;
  921. WlxChangePasswordNotify: PWLX_CHANGE_PASSWORD_NOTIFY;
  922. WlxGetSourceDesktop: PWLX_GET_SOURCE_DESKTOP;
  923. WlxSetReturnDesktop: PWLX_SET_RETURN_DESKTOP;
  924. WlxCreateUserDesktop: PWLX_CREATE_USER_DESKTOP;
  925. WlxChangePasswordNotifyEx: PWLX_CHANGE_PASSWORD_NOTIFY_EX;
  926. WlxCloseUserDesktop : PWLX_CLOSE_USER_DESKTOP;
  927. WlxSetOption: PWLX_SET_OPTION;
  928. WlxGetOption: PWLX_GET_OPTION;
  929. WlxWin31Migrate: PWLX_WIN31_MIGRATE;
  930. WlxQueryClientCredentials: PWLX_QUERY_CLIENT_CREDENTIALS;
  931. WlxQueryInetConnectorCredentials: PWLX_QUERY_IC_CREDENTIALS;
  932. WlxDisconnect: PWLX_DISCONNECT;
  933. WlxQueryTerminalServicesData: PWLX_QUERY_TERMINAL_SERVICES_DATA;
  934. WlxQueryConsoleSwitchCredentials: PWLX_QUERY_CONSOLESWITCH_CREDENTIALS;
  935. WlxQueryTsLogonCredentials: PWLX_QUERY_TS_LOGON_CREDENTIALS;
  936. end;
  937. {$EXTERNALSYM _WLX_DISPATCH_VERSION_1_4}
  938. WLX_DISPATCH_VERSION_1_4 = _WLX_DISPATCH_VERSION_1_4;
  939. {$EXTERNALSYM WLX_DISPATCH_VERSION_1_4}
  940. TWlxDispatchVersion1_4 = WLX_DISPATCH_VERSION_1_4;
  941. PWlxDispatchVersion1_4 = PWLX_DISPATCH_VERSION_1_4;
  942. //
  943. // Non-GINA notification DLLs
  944. //
  945. PFNMSGECALLBACK = function(bVerbose: BOOL; lpMessage: LPWSTR): DWORD; stdcall;
  946. {$EXTERNALSYM PFNMSGECALLBACK}
  947. TFnMsgeCallback = PFNMSGECALLBACK;
  948. PWLX_NOTIFICATION_INFO = ^WLX_NOTIFICATION_INFO;
  949. {$EXTERNALSYM PWLX_NOTIFICATION_INFO}
  950. _WLX_NOTIFICATION_INFO = record
  951. Size: ULONG;
  952. Flags: ULONG;
  953. UserName: PWSTR;
  954. Domain: PWSTR;
  955. WindowStation: PWSTR;
  956. hToken: HANDLE;
  957. hDesktop: HDESK;
  958. pStatusCallback: PFNMSGECALLBACK;
  959. end;
  960. {$EXTERNALSYM _WLX_NOTIFICATION_INFO}
  961. WLX_NOTIFICATION_INFO = _WLX_NOTIFICATION_INFO;
  962. {$EXTERNALSYM WLX_NOTIFICATION_INFO}
  963. TWlxNotificationInfo = WLX_NOTIFICATION_INFO;
  964. PWlxNotificationInfo = PWLX_NOTIFICATION_INFO;
  965. implementation
  966. {$IFDEF MSGINA_IMPORT}
  967. uses
  968. JwaWinDLLNames;
  969. {$IFDEF DYNAMIC_LINK}
  970. {$IFDEF MSGINA1_0}
  971. var
  972. _WlxNegotiate: Pointer;
  973. function WlxNegotiate;
  974. begin
  975. GetProcedureAddress(_WlxNegotiate, msgina, 'WlxNegotiate');
  976. asm
  977. MOV ESP, EBP
  978. POP EBP
  979. JMP [_WlxNegotiate]
  980. end;
  981. end;
  982. var
  983. _WlxInitialize: Pointer;
  984. function WlxInitialize;
  985. begin
  986. GetProcedureAddress(_WlxInitialize, msgina, 'WlxInitialize');
  987. asm
  988. MOV ESP, EBP
  989. POP EBP
  990. JMP [_WlxInitialize]
  991. end;
  992. end;
  993. var
  994. _WlxDisplaySASNotice: Pointer;
  995. procedure WlxDisplaySASNotice;
  996. begin
  997. GetProcedureAddress(_WlxDisplaySASNotice, msgina, 'WlxDisplaySASNotice');
  998. asm
  999. MOV ESP, EBP
  1000. POP EBP
  1001. JMP [_WlxDisplaySASNotice]
  1002. end;
  1003. end;
  1004. var
  1005. _WlxLoggedOutSAS: Pointer;
  1006. function WlxLoggedOutSAS;
  1007. begin
  1008. GetProcedureAddress(_WlxLoggedOutSAS, msgina, 'WlxLoggedOutSAS');
  1009. asm
  1010. MOV ESP, EBP
  1011. POP EBP
  1012. JMP [_WlxLoggedOutSAS]
  1013. end;
  1014. end;
  1015. var
  1016. _WlxActivateUserShell: Pointer;
  1017. function WlxActivateUserShell;
  1018. begin
  1019. GetProcedureAddress(_WlxActivateUserShell, msgina, 'WlxActivateUserShell');
  1020. asm
  1021. MOV ESP, EBP
  1022. POP EBP
  1023. JMP [_WlxActivateUserShell]
  1024. end;
  1025. end;
  1026. var
  1027. _WlxLoggedOnSAS: Pointer;
  1028. function WlxLoggedOnSAS;
  1029. begin
  1030. GetProcedureAddress(_WlxLoggedOnSAS, msgina, 'WlxLoggedOnSAS');
  1031. asm
  1032. MOV ESP, EBP
  1033. POP EBP
  1034. JMP [_WlxLoggedOnSAS]
  1035. end;
  1036. end;
  1037. var
  1038. _WlxDisplayLockedNotice: Pointer;
  1039. procedure WlxDisplayLockedNotice;
  1040. begin
  1041. GetProcedureAddress(_WlxDisplayLockedNotice, msgina, 'WlxDisplayLockedNotice');
  1042. asm
  1043. MOV ESP, EBP
  1044. POP EBP
  1045. JMP [_WlxDisplayLockedNotice]
  1046. end;
  1047. end;
  1048. var
  1049. _WlxWkstaLockedSAS: Pointer;
  1050. function WlxWkstaLockedSAS;
  1051. begin
  1052. GetProcedureAddress(_WlxWkstaLockedSAS, msgina, 'WlxWkstaLockedSAS');
  1053. asm
  1054. MOV ESP, EBP
  1055. POP EBP
  1056. JMP [_WlxWkstaLockedSAS]
  1057. end;
  1058. end;
  1059. var
  1060. _WlxIsLockOk: Pointer;
  1061. function WlxIsLockOk;
  1062. begin
  1063. GetProcedureAddress(_WlxIsLockOk, msgina, 'WlxIsLockOk');
  1064. asm
  1065. MOV ESP, EBP
  1066. POP EBP
  1067. JMP [_WlxIsLockOk]
  1068. end;
  1069. end;
  1070. var
  1071. _WlxIsLogoffOk: Pointer;
  1072. function WlxIsLogoffOk;
  1073. begin
  1074. GetProcedureAddress(_WlxIsLogoffOk, msgina, 'WlxIsLogoffOk');
  1075. asm
  1076. MOV ESP, EBP
  1077. POP EBP
  1078. JMP [_WlxIsLogoffOk]
  1079. end;
  1080. end;
  1081. var
  1082. _WlxLogoff: Pointer;
  1083. procedure WlxLogoff;
  1084. begin
  1085. GetProcedureAddress(_WlxLogoff, msgina, 'WlxLogoff');
  1086. asm
  1087. MOV ESP, EBP
  1088. POP EBP
  1089. JMP [_WlxLogoff]
  1090. end;
  1091. end;
  1092. var
  1093. _WlxShutdown: Pointer;
  1094. procedure WlxShutdown;
  1095. begin
  1096. GetProcedureAddress(_WlxShutdown, msgina, 'WlxShutdown');
  1097. asm
  1098. MOV ESP, EBP
  1099. POP EBP
  1100. JMP [_WlxShutdown]
  1101. end;
  1102. end;
  1103. {$ENDIF MSGINA1_0}
  1104. {$IFDEF MSGINA1_1}
  1105. var
  1106. _WlxScreenSaverNotify: Pointer;
  1107. function WlxScreenSaverNotify;
  1108. begin
  1109. GetProcedureAddress(_WlxScreenSaverNotify, msgina, 'WlxScreenSaverNotify');
  1110. asm
  1111. MOV ESP, EBP
  1112. POP EBP
  1113. JMP [_WlxScreenSaverNotify]
  1114. end;
  1115. end;
  1116. var
  1117. _WlxStartApplication: Pointer;
  1118. function WlxStartApplication;
  1119. begin
  1120. GetProcedureAddress(_WlxStartApplication, msgina, 'WlxStartApplication');
  1121. asm
  1122. MOV ESP, EBP
  1123. POP EBP
  1124. JMP [_WlxStartApplication]
  1125. end;
  1126. end;
  1127. {$ENDIF MSGINA1_1}
  1128. {$IFDEF MSGINA1_3}
  1129. var
  1130. _WlxNetworkProviderLoad: Pointer;
  1131. function WlxNetworkProviderLoad;
  1132. begin
  1133. GetProcedureAddress(_WlxNetworkProviderLoad, msgina, 'WlxNetworkProviderLoad');
  1134. asm
  1135. MOV ESP, EBP
  1136. POP EBP
  1137. JMP [_WlxNetworkProviderLoad]
  1138. end;
  1139. end;
  1140. var
  1141. _WlxDisplayStatusMessage: Pointer;
  1142. function WlxDisplayStatusMessage;
  1143. begin
  1144. GetProcedureAddress(_WlxDisplayStatusMessage, msgina, 'WlxDisplayStatusMessage');
  1145. asm
  1146. MOV ESP, EBP
  1147. POP EBP
  1148. JMP [_WlxDisplayStatusMessage]
  1149. end;
  1150. end;
  1151. var
  1152. _WlxGetStatusMessage: Pointer;
  1153. function WlxGetStatusMessage;
  1154. begin
  1155. GetProcedureAddress(_WlxGetStatusMessage, msgina, 'WlxGetStatusMessage');
  1156. asm
  1157. MOV ESP, EBP
  1158. POP EBP
  1159. JMP [_WlxGetStatusMessage]
  1160. end;
  1161. end;
  1162. var
  1163. _WlxRemoveStatusMessage: Pointer;
  1164. function WlxRemoveStatusMessage;
  1165. begin
  1166. GetProcedureAddress(_WlxRemoveStatusMessage, msgina, 'WlxRemoveStatusMessage');
  1167. asm
  1168. MOV ESP, EBP
  1169. POP EBP
  1170. JMP [_WlxRemoveStatusMessage]
  1171. end;
  1172. end;
  1173. {$ENDIF MSGINA1_3}
  1174. {$IFDEF MSGINA1_4}
  1175. var
  1176. _WlxGetConsoleSwitchCredentials: Pointer;
  1177. function WlxGetConsoleSwitchCredentials;
  1178. begin
  1179. GetProcedureAddress(_WlxGetConsoleSwitchCredentials, msgina, 'WlxGetConsoleSwitchCredentials');
  1180. asm
  1181. MOV ESP, EBP
  1182. POP EBP
  1183. JMP [_WlxGetConsoleSwitchCredentials]
  1184. end;
  1185. end;
  1186. var
  1187. _WlxReconnectNotify: Pointer;
  1188. procedure WlxReconnectNotify;
  1189. begin
  1190. GetProcedureAddress(_WlxReconnectNotify, msgina, 'WlxReconnectNotify');
  1191. asm
  1192. MOV ESP, EBP
  1193. POP EBP
  1194. JMP [_WlxReconnectNotify]
  1195. end;
  1196. end;
  1197. var
  1198. _WlxDisconnectNotify: Pointer;
  1199. procedure WlxDisconnectNotify;
  1200. begin
  1201. GetProcedureAddress(_WlxDisconnectNotify, msgina, 'WlxDisconnectNotify');
  1202. asm
  1203. MOV ESP, EBP
  1204. POP EBP
  1205. JMP [_WlxDisconnectNotify]
  1206. end;
  1207. end;
  1208. {$ENDIF MSGINA1_4}
  1209. {$ELSE}
  1210. {$IFDEF MSGINA1_0}
  1211. function WlxNegotiate; external msgina name 'WlxNegotiate';
  1212. function WlxInitialize; external msgina name 'WlxInitialize';
  1213. procedure WlxDisplaySASNotice; external msgina name 'WlxDisplaySASNotice';
  1214. function WlxLoggedOutSAS; external msgina name 'WlxLoggedOutSAS';
  1215. function WlxActivateUserShell; external msgina name 'WlxActivateUserShell';
  1216. function WlxLoggedOnSAS; external msgina name 'WlxLoggedOnSAS';
  1217. procedure WlxDisplayLockedNotice; external msgina name 'WlxDisplayLockedNotice';
  1218. function WlxWkstaLockedSAS; external msgina name 'WlxWkstaLockedSAS';
  1219. function WlxIsLockOk; external msgina name 'WlxIsLockOk';
  1220. function WlxIsLogoffOk; external msgina name 'WlxIsLogoffOk';
  1221. procedure WlxLogoff; external msgina name 'WlxLogoff';
  1222. procedure WlxShutdown; external msgina name 'WlxShutdown';
  1223. {$ENDIF MSGINA1_0}
  1224. {$IFDEF MSGINA1_1}
  1225. function WlxScreenSaverNotify; external msgina name 'WlxScreenSaverNotify';
  1226. function WlxStartApplication; external msgina name 'WlxStartApplication';
  1227. {$ENDIF MSGINA1_1}
  1228. {$IFDEF MSGINA1_3}
  1229. function WlxNetworkProviderLoad; external msgina name 'WlxNetworkProviderLoad';
  1230. function WlxDisplayStatusMessage; external msgina name 'WlxDisplayStatusMessage';
  1231. function WlxGetStatusMessage; external msgina name 'WlxGetStatusMessage';
  1232. function WlxRemoveStatusMessage; external msgina name 'WlxRemoveStatusMessage';
  1233. {$ENDIF MSGINA1_3}
  1234. {$IFDEF MSGINA1_4}
  1235. function WlxGetConsoleSwitchCredentials; external msgina name 'WlxGetConsoleSwitchCredentials';
  1236. procedure WlxReconnectNotify; external msgina name 'WlxReconnectNotify';
  1237. procedure WlxDisconnectNotify; external msgina name 'WlxDisconnectNotify';
  1238. {$ENDIF MSGINA1_4}
  1239. {$ENDIF DYNAMIC_LINK}
  1240. {$ENDIF MSGINA_IMPORT}
  1241. end.