jwawinwlx.pas 49 KB

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