jwawinreg.pas 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737
  1. {******************************************************************************}
  2. { }
  3. { Windows Registry 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: winreg.h, released June 2000. The original Pascal }
  9. { code is: WinReg.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 JwaWinReg;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "WinReg.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaReason, JwaWinBase, JwaWinNT, JwaWinType;
  51. //
  52. // Requested Key access mask type.
  53. //
  54. type
  55. REGSAM = ACCESS_MASK;
  56. {$EXTERNALSYM REGSAM}
  57. //
  58. // Reserved Key Handles.
  59. //
  60. const
  61. HKEY_CLASSES_ROOT = HKEY(ULONG_PTR(LONG($80000000)));
  62. {$EXTERNALSYM HKEY_CLASSES_ROOT}
  63. HKEY_CURRENT_USER = HKEY(ULONG_PTR(LONG($80000001)));
  64. {$EXTERNALSYM HKEY_CURRENT_USER}
  65. HKEY_LOCAL_MACHINE = HKEY(ULONG_PTR(LONG($80000002)));
  66. {$EXTERNALSYM HKEY_LOCAL_MACHINE}
  67. HKEY_USERS = HKEY(ULONG_PTR(LONG($80000003)));
  68. {$EXTERNALSYM HKEY_USERS}
  69. HKEY_PERFORMANCE_DATA = HKEY(ULONG_PTR(LONG($80000004)));
  70. {$EXTERNALSYM HKEY_PERFORMANCE_DATA}
  71. HKEY_PERFORMANCE_TEXT = HKEY(ULONG_PTR(LONG($80000050)));
  72. {$EXTERNALSYM HKEY_PERFORMANCE_TEXT}
  73. HKEY_PERFORMANCE_NLSTEXT = HKEY(ULONG_PTR(LONG($80000060)));
  74. {$EXTERNALSYM HKEY_PERFORMANCE_NLSTEXT}
  75. HKEY_CURRENT_CONFIG = HKEY(ULONG_PTR(LONG($80000005)));
  76. {$EXTERNALSYM HKEY_CURRENT_CONFIG}
  77. HKEY_DYN_DATA = HKEY(ULONG_PTR(LONG($80000006)));
  78. {$EXTERNALSYM HKEY_DYN_DATA}
  79. PROVIDER_KEEPS_VALUE_LENGTH = $1;
  80. {$EXTERNALSYM PROVIDER_KEEPS_VALUE_LENGTH}
  81. type
  82. val_context = record
  83. valuelen: Integer; // the total length of this value
  84. value_context: LPVOID; // provider's context
  85. val_buff_ptr: LPVOID; // where in the ouput buffer the value is.
  86. end;
  87. {$EXTERNALSYM val_context}
  88. PVALCONTEXT = ^val_context;
  89. {$EXTERNALSYM PVALCONTEXT}
  90. TValContext = val_context;
  91. PVALUEA = record // Provider supplied value/context.
  92. pv_valuename: LPSTR; // The value name pointer
  93. pv_valuelen: Integer;
  94. pv_value_context: LPVOID;
  95. pv_type: DWORD;
  96. end;
  97. {$EXTERNALSYM PVALUEA}
  98. PPVALUEA = ^PVALUEA;
  99. {$EXTERNALSYM PPVALUEA}
  100. TPValueA = PVALUEA;
  101. PVALUEW = record // Provider supplied value/context.
  102. pv_valuename: LPWSTR; // The value name pointer
  103. pv_valuelen: Integer;
  104. pv_value_context: LPVOID;
  105. pv_type: DWORD;
  106. end;
  107. {$EXTERNALSYM PVALUEW}
  108. PPVALUEW = ^PVALUEW;
  109. {$EXTERNALSYM PPVALUEW}
  110. TPValueW = PVALUEW;
  111. {$IFDEF UNICODE}
  112. PVALUE = PVALUEW;
  113. {$EXTERNALSYM PVALUE}
  114. PPVALUE = PPVALUEW;
  115. {$EXTERNALSYM PPVALUE}
  116. TPValue = TPValueW;
  117. {$ELSE}
  118. PVALUE = PVALUEA;
  119. {$EXTERNALSYM PVALUE}
  120. PPVALUE = PPVALUEA;
  121. {$EXTERNALSYM PPVALUE}
  122. TPValue = TPValueA;
  123. {$ENDIF UNICODE}
  124. QUERYHANDLER = function(keycontext: LPVOID; val_list: PVALCONTEXT;
  125. num_vals: DWORD; outputbuffer: LPVOID; total_outlen: LPDWORD;
  126. input_blen: DWORD): DWORD; cdecl;
  127. {$EXTERNALSYM QUERYHANDLER}
  128. PQUERYHANDLER = ^QUERYHANDLER;
  129. {$EXTERNALSYM PQUERYHANDLER}
  130. TQueryHandler = QUERYHANDLER;
  131. provider_info = record
  132. pi_R0_1val: PQUERYHANDLER;
  133. pi_R0_allvals: PQUERYHANDLER;
  134. pi_R3_1val: PQUERYHANDLER;
  135. pi_R3_allvals: PQUERYHANDLER;
  136. pi_flags: DWORD; // capability flags (none defined yet).
  137. pi_key_context: LPVOID;
  138. end;
  139. {$EXTERNALSYM provider_info}
  140. REG_PROVIDER = provider_info;
  141. {$EXTERNALSYM REG_PROVIDER}
  142. PPROVIDER = ^provider_info;
  143. {$EXTERNALSYM PPROVIDER}
  144. TProviderInfo = provider_info;
  145. PProviderInfo = ^provider_info;
  146. value_entA = record
  147. ve_valuename: LPSTR;
  148. ve_valuelen: DWORD;
  149. ve_valueptr: DWORD_PTR;
  150. ve_type: DWORD;
  151. end;
  152. {$EXTERNALSYM value_entA}
  153. VALENTA = value_entA;
  154. {$EXTERNALSYM VALENTA}
  155. PVALENTA = ^VALENTA;
  156. {$EXTERNALSYM PVALENTA}
  157. TValueEntA = value_entA;
  158. PValueEntA = ^value_entA;
  159. value_entW = record
  160. ve_valuename: LPWSTR;
  161. ve_valuelen: DWORD;
  162. ve_valueptr: DWORD_PTR;
  163. ve_type: DWORD;
  164. end;
  165. {$EXTERNALSYM value_entW}
  166. VALENTW = value_entW;
  167. {$EXTERNALSYM VALENTW}
  168. PVALENTW = ^VALENTW;
  169. {$EXTERNALSYM PVALENTW}
  170. TValueEntW = value_entW;
  171. PValueEntW = ^value_entW;
  172. {$IFDEF UNICODE}
  173. VALENT = VALENTW;
  174. {$EXTERNALSYM VALENT}
  175. PVALENT = PVALENTW;
  176. {$EXTERNALSYM PVALENT}
  177. TValueEnt = TValueEntW;
  178. PValueEnt = PValueEntW;
  179. {$ELSE}
  180. VALENT = VALENTA;
  181. {$EXTERNALSYM VALENT}
  182. PVALENT = PVALENTA;
  183. {$EXTERNALSYM PVALENT}
  184. TValueEnt = TValueEntA;
  185. PValueEnt = PValueEntA;
  186. {$ENDIF UNICODE}
  187. //
  188. // Default values for parameters that do not exist in the Win 3.1
  189. // compatible APIs.
  190. //
  191. const
  192. WIN31_CLASS = nil;
  193. {$EXTERNALSYM WIN31_CLASS}
  194. //
  195. // API Prototypes.
  196. //
  197. function RegCloseKey(hKey: HKEY): LONG; stdcall;
  198. {$EXTERNALSYM RegCloseKey}
  199. function RegOverridePredefKey(hKey: HKEY; hNewHKey: HKEY): LONG; stdcall;
  200. {$EXTERNALSYM RegOverridePredefKey}
  201. function RegOpenUserClassesRoot(hToken: HANDLE; dwOptions: DWORD;
  202. samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
  203. {$EXTERNALSYM RegOpenUserClassesRoot}
  204. function RegOpenCurrentUser(samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
  205. {$EXTERNALSYM RegOpenCurrentUser}
  206. function RegDisablePredefinedCache: LONG; stdcall;
  207. {$EXTERNALSYM RegDisablePredefinedCache}
  208. function RegConnectRegistryA(lpMachineName: LPCSTR; hKey: HKEY;
  209. var phkResult: HKEY): LONG; stdcall;
  210. {$EXTERNALSYM RegConnectRegistryA}
  211. function RegConnectRegistryW(lpMachineName: LPCWSTR; hKey: HKEY;
  212. var phkResult: HKEY): LONG; stdcall;
  213. {$EXTERNALSYM RegConnectRegistryW}
  214. function RegConnectRegistry(lpMachineName: LPCTSTR; hKey: HKEY;
  215. var phkResult: HKEY): LONG; stdcall;
  216. {$EXTERNALSYM RegConnectRegistry}
  217. function RegCreateKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
  218. {$EXTERNALSYM RegCreateKeyA}
  219. function RegCreateKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
  220. {$EXTERNALSYM RegCreateKeyW}
  221. function RegCreateKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
  222. {$EXTERNALSYM RegCreateKey}
  223. function RegCreateKeyExA(hKey: HKEY; lpSubKey: LPCSTR; Reserved: DWORD;
  224. lpClass: LPSTR; dwOptions: DWORD; samDesired: REGSAM;
  225. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
  226. lpdwDisposition: LPDWORD): LONG; stdcall;
  227. {$EXTERNALSYM RegCreateKeyExA}
  228. function RegCreateKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; Reserved: DWORD;
  229. lpClass: LPWSTR; dwOptions: DWORD; samDesired: REGSAM;
  230. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
  231. lpdwDisposition: LPDWORD): LONG; stdcall;
  232. {$EXTERNALSYM RegCreateKeyExW}
  233. function RegCreateKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; Reserved: DWORD;
  234. lpClass: LPTSTR; dwOptions: DWORD; samDesired: REGSAM;
  235. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; var phkResult: HKEY;
  236. lpdwDisposition: LPDWORD): LONG; stdcall;
  237. {$EXTERNALSYM RegCreateKeyEx}
  238. function RegDeleteKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
  239. {$EXTERNALSYM RegDeleteKeyA}
  240. function RegDeleteKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
  241. {$EXTERNALSYM RegDeleteKeyW}
  242. function RegDeleteKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
  243. {$EXTERNALSYM RegDeleteKey}
  244. function RegDeleteValueA(hKey: HKEY; lpValueName: LPCSTR): LONG; stdcall;
  245. {$EXTERNALSYM RegDeleteValueA}
  246. function RegDeleteValueW(hKey: HKEY; lpValueName: LPCWSTR): LONG; stdcall;
  247. {$EXTERNALSYM RegDeleteValueW}
  248. function RegDeleteValue(hKey: HKEY; lpValueName: LPCTSTR): LONG; stdcall;
  249. {$EXTERNALSYM RegDeleteValue}
  250. function RegEnumKeyA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR; cbName: DWORD): LONG; stdcall;
  251. {$EXTERNALSYM RegEnumKeyA}
  252. function RegEnumKeyW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR; cbName: DWORD): LONG; stdcall;
  253. {$EXTERNALSYM RegEnumKeyW}
  254. function RegEnumKey(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR; cbName: DWORD): LONG; stdcall;
  255. {$EXTERNALSYM RegEnumKey}
  256. function RegEnumKeyExA(hKey: HKEY; dwIndex: DWORD; lpName: LPSTR;
  257. var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPSTR; lpcbClass: LPDWORD;
  258. lpftLastWriteTime: PFILETIME): LONG; stdcall;
  259. {$EXTERNALSYM RegEnumKeyExA}
  260. function RegEnumKeyExW(hKey: HKEY; dwIndex: DWORD; lpName: LPWSTR;
  261. var lpcbName: DWORD; lpReserved: LPDWORD; lpClass: LPWSTR; lpcbClass: LPDWORD;
  262. lpftLastWriteTime: PFILETIME): LONG; stdcall;
  263. {$EXTERNALSYM RegEnumKeyExW}
  264. function RegEnumKeyEx(hKey: HKEY; dwIndex: DWORD; lpName: LPTSTR;
  265. var lpcbName: LPDWORD; lpReserved: LPDWORD; lpClass: LPTSTR; lpcbClass: LPDWORD;
  266. lpftLastWriteTime: PFILETIME): LONG; stdcall;
  267. {$EXTERNALSYM RegEnumKeyEx}
  268. function RegEnumValueA(hKey: HKEY; dwIndex: DWORD; lpValueName: LPSTR;
  269. var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
  270. lpcbData: LPDWORD): LONG; stdcall;
  271. {$EXTERNALSYM RegEnumValueA}
  272. function RegEnumValueW(hKey: HKEY; dwIndex: DWORD; lpValueName: LPWSTR;
  273. var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
  274. lpcbData: LPDWORD): LONG; stdcall;
  275. {$EXTERNALSYM RegEnumValueW}
  276. function RegEnumValue(hKey: HKEY; dwIndex: DWORD; lpValueName: LPTSTR;
  277. var lpcbValueName: DWORD; lpReserved, lpType: LPDWORD; lpData: LPBYTE;
  278. lpcbData: LPDWORD): LONG; stdcall;
  279. {$EXTERNALSYM RegEnumValue}
  280. function RegFlushKey(hKey: HKEY): LONG; stdcall;
  281. {$EXTERNALSYM RegFlushKey}
  282. function RegGetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
  283. pSecurityDescriptor: PSECURITY_DESCRIPTOR; var lpcbSecurityDescriptor: DWORD): LONG; stdcall;
  284. {$EXTERNALSYM RegGetKeySecurity}
  285. function RegLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpFile: LPCSTR): LONG; stdcall;
  286. {$EXTERNALSYM RegLoadKeyA}
  287. function RegLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpFile: LPCWSTR): LONG; stdcall;
  288. {$EXTERNALSYM RegLoadKeyW}
  289. function RegLoadKey(hKey: HKEY; lpSubKey: LPCTSTR; lpFile: LPCTSTR): LONG; stdcall;
  290. {$EXTERNALSYM RegLoadKey}
  291. function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: BOOL;
  292. dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: BOOL): LONG;
  293. {$EXTERNALSYM RegNotifyChangeKeyValue}
  294. function RegOpenKeyA(hKey: HKEY; lpSubKey: LPCSTR; var phkResult: HKEY): LONG; stdcall;
  295. {$EXTERNALSYM RegOpenKeyA}
  296. function RegOpenKeyW(hKey: HKEY; lpSubKey: LPCWSTR; var phkResult: HKEY): LONG; stdcall;
  297. {$EXTERNALSYM RegOpenKeyW}
  298. function RegOpenKey(hKey: HKEY; lpSubKey: LPCTSTR; var phkResult: HKEY): LONG; stdcall;
  299. {$EXTERNALSYM RegOpenKey}
  300. function RegOpenKeyExA(hKey: HKEY; lpSubKey: LPCSTR; ulOptions: DWORD;
  301. samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
  302. {$EXTERNALSYM RegOpenKeyExA}
  303. function RegOpenKeyExW(hKey: HKEY; lpSubKey: LPCWSTR; ulOptions: DWORD;
  304. samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
  305. {$EXTERNALSYM RegOpenKeyExW}
  306. function RegOpenKeyEx(hKey: HKEY; lpSubKey: LPCTSTR; ulOptions: DWORD;
  307. samDesired: REGSAM; var phkResult: HKEY): LONG; stdcall;
  308. {$EXTERNALSYM RegOpenKeyEx}
  309. function RegQueryInfoKeyA(hKey: HKEY; lpClass: LPSTR; lpcbClass, lpReserved,
  310. lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
  311. lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
  312. {$EXTERNALSYM RegQueryInfoKeyA}
  313. function RegQueryInfoKeyW(hKey: HKEY; lpClass: LPWSTR; lpcbClass, lpReserved,
  314. lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
  315. lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
  316. {$EXTERNALSYM RegQueryInfoKeyW}
  317. function RegQueryInfoKey(hKey: HKEY; lpClass: LPTSTR; lpcbClass, lpReserved,
  318. lpcSubKeys, lpcbMaxSubKeyLen, lpcbMaxClassLen, lpcValues, lpcbMaxValueNameLen,
  319. lpcbMaxValueLen, lpcbSecurityDescriptor: LPDWORD; lpftLastWriteTime: PFILETIME): LONG; stdcall;
  320. {$EXTERNALSYM RegQueryInfoKey}
  321. function RegQueryValueA(hKey: HKEY; lpSubKey: LPCSTR; lpValue: LPSTR;
  322. var lpcbValue: LONG): LONG; stdcall;
  323. {$EXTERNALSYM RegQueryValueA}
  324. function RegQueryValueW(hKey: HKEY; lpSubKey: LPCWSTR; lpValue: LPWSTR;
  325. var lpcbValue: LONG): LONG; stdcall;
  326. {$EXTERNALSYM RegQueryValueW}
  327. function RegQueryValue(hKey: HKEY; lpSubKey: LPCTSTR; lpValue: LPTSTR;
  328. var lpcbValue: LONG): LONG; stdcall;
  329. {$EXTERNALSYM RegQueryValue}
  330. function RegQueryMultipleValuesA(hKey: HKEY; val_list: PVALENTA; num_vals: DWORD;
  331. lpValueBuf: LPSTR; var ldwTotsize: DWORD): LONG; stdcall;
  332. {$EXTERNALSYM RegQueryMultipleValuesA}
  333. function RegQueryMultipleValuesW(hKey: HKEY; val_list: PVALENTW; num_vals: DWORD;
  334. lpValueBuf: LPWSTR; var ldwTotsize: DWORD): LONG; stdcall;
  335. {$EXTERNALSYM RegQueryMultipleValuesW}
  336. function RegQueryMultipleValues(hKey: HKEY; val_list: PVALENT; num_vals: DWORD;
  337. lpValueBuf: LPTSTR; var ldwTotsize: DWORD): LONG; stdcall;
  338. {$EXTERNALSYM RegQueryMultipleValues}
  339. function RegQueryValueExA(hKey: HKEY; lpValueName: LPCSTR; lpReserved: LPDWORD;
  340. lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
  341. {$EXTERNALSYM RegQueryValueExA}
  342. function RegQueryValueExW(hKey: HKEY; lpValueName: LPCWSTR; lpReserved: LPDWORD;
  343. lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
  344. {$EXTERNALSYM RegQueryValueExW}
  345. function RegQueryValueEx(hKey: HKEY; lpValueName: LPCTSTR; lpReserved: LPDWORD;
  346. lpType: LPDWORD; lpData: LPBYTE; lpcbData: LPDWORD): LONG; stdcall;
  347. {$EXTERNALSYM RegQueryValueEx}
  348. function RegReplaceKeyA(hKey: HKEY; lpSubKey: LPCSTR; lpNewFile: LPCSTR;
  349. lpOldFile: LPCSTR): LONG; stdcall;
  350. {$EXTERNALSYM RegReplaceKeyA}
  351. function RegReplaceKeyW(hKey: HKEY; lpSubKey: LPCWSTR; lpNewFile: LPCWSTR;
  352. lpOldFile: LPCWSTR): LONG; stdcall;
  353. {$EXTERNALSYM RegReplaceKeyW}
  354. function RegReplaceKey(hKey: HKEY; lpSubKey: LPCTSTR; lpNewFile: LPCTSTR;
  355. lpOldFile: LPCTSTR): LONG; stdcall;
  356. {$EXTERNALSYM RegReplaceKey}
  357. function RegRestoreKeyA(hKey: HKEY; lpFile: LPCSTR; dwFlags: DWORD): LONG; stdcall;
  358. {$EXTERNALSYM RegRestoreKeyA}
  359. function RegRestoreKeyW(hKey: HKEY; lpFile: LPCWSTR; dwFlags: DWORD): LONG; stdcall;
  360. {$EXTERNALSYM RegRestoreKeyW}
  361. function RegRestoreKey(hKey: HKEY; lpFile: LPCTSTR; dwFlags: DWORD): LONG; stdcall;
  362. {$EXTERNALSYM RegRestoreKey}
  363. function RegSaveKeyA(hKey: HKEY; lpFile: LPCSTR;
  364. lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
  365. {$EXTERNALSYM RegSaveKeyA}
  366. function RegSaveKeyW(hKey: HKEY; lpFile: LPCWSTR;
  367. lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
  368. {$EXTERNALSYM RegSaveKeyW}
  369. function RegSaveKey(hKey: HKEY; lpFile: LPCTSTR;
  370. lpSecurityAttributes: LPSECURITY_ATTRIBUTES): LONG; stdcall;
  371. {$EXTERNALSYM RegSaveKey}
  372. function RegSetKeySecurity(hKey: HKEY; SecurityInformation: SECURITY_INFORMATION;
  373. pSecurityDescriptor: PSECURITY_DESCRIPTOR): LONG; stdcall;
  374. {$EXTERNALSYM RegSetKeySecurity}
  375. function RegSetValueA(hKey: HKEY; lpSubKey: LPCSTR; dwType: DWORD;
  376. lpData: LPCSTR; cbData: DWORD): LONG; stdcall;
  377. {$EXTERNALSYM RegSetValueA}
  378. function RegSetValueW(hKey: HKEY; lpSubKey: LPCWSTR; dwType: DWORD;
  379. lpData: LPCWSTR; cbData: DWORD): LONG; stdcall;
  380. {$EXTERNALSYM RegSetValueW}
  381. function RegSetValue(hKey: HKEY; lpSubKey: LPCTSTR; dwType: DWORD;
  382. lpData: LPCTSTR; cbData: DWORD): LONG; stdcall;
  383. {$EXTERNALSYM RegSetValue}
  384. function RegSetValueExA(hKey: HKEY; lpValueName: LPCSTR; Reserved: DWORD;
  385. dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
  386. {$EXTERNALSYM RegSetValueExA}
  387. function RegSetValueExW(hKey: HKEY; lpValueName: LPCWSTR; Reserved: DWORD;
  388. dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
  389. {$EXTERNALSYM RegSetValueExW}
  390. function RegSetValueEx(hKey: HKEY; lpValueName: LPCTSTR; Reserved: DWORD;
  391. dwType: DWORD; lpData: LPBYTE; cbData: DWORD): LONG; stdcall;
  392. {$EXTERNALSYM RegSetValueEx}
  393. function RegUnLoadKeyA(hKey: HKEY; lpSubKey: LPCSTR): LONG; stdcall;
  394. {$EXTERNALSYM RegUnLoadKeyA}
  395. function RegUnLoadKeyW(hKey: HKEY; lpSubKey: LPCWSTR): LONG; stdcall;
  396. {$EXTERNALSYM RegUnLoadKeyW}
  397. function RegUnLoadKey(hKey: HKEY; lpSubKey: LPCTSTR): LONG; stdcall;
  398. {$EXTERNALSYM RegUnLoadKey}
  399. //
  400. // Remoteable System Shutdown APIs
  401. //
  402. function InitiateSystemShutdownA(lpMachineName: LPSTR; lpMessage: LPSTR;
  403. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
  404. {$EXTERNALSYM InitiateSystemShutdownA}
  405. function InitiateSystemShutdownW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
  406. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
  407. {$EXTERNALSYM InitiateSystemShutdownW}
  408. function InitiateSystemShutdown(lpMachineName: LPTSTR; lpMessage: LPTSTR;
  409. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL): BOOL; stdcall;
  410. {$EXTERNALSYM InitiateSystemShutdown}
  411. function AbortSystemShutdownA(lpMachineName: LPSTR): BOOL; stdcall;
  412. {$EXTERNALSYM AbortSystemShutdownA}
  413. function AbortSystemShutdownW(lpMachineName: LPWSTR): BOOL; stdcall;
  414. {$EXTERNALSYM AbortSystemShutdownW}
  415. function AbortSystemShutdown(lpMachineName: LPTSTR): BOOL; stdcall;
  416. {$EXTERNALSYM AbortSystemShutdown}
  417. //
  418. // defines for InitiateSystemShutdownEx reason codes
  419. //
  420. const
  421. REASON_SWINSTALL = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_INSTALLATION;
  422. {$EXTERNALSYM REASON_SWINSTALL}
  423. REASON_HWINSTALL = SHTDN_REASON_MAJOR_HARDWARE or SHTDN_REASON_MINOR_INSTALLATION;
  424. {$EXTERNALSYM REASON_HWINSTALL}
  425. REASON_SERVICEHANG = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_HUNG;
  426. {$EXTERNALSYM REASON_SERVICEHANG}
  427. REASON_UNSTABLE = SHTDN_REASON_MAJOR_SYSTEM or SHTDN_REASON_MINOR_UNSTABLE;
  428. {$EXTERNALSYM REASON_UNSTABLE}
  429. REASON_SWHWRECONF = SHTDN_REASON_MAJOR_SOFTWARE or SHTDN_REASON_MINOR_RECONFIG;
  430. {$EXTERNALSYM REASON_SWHWRECONF}
  431. REASON_OTHER = SHTDN_REASON_MAJOR_OTHER or SHTDN_REASON_MINOR_OTHER;
  432. {$EXTERNALSYM REASON_OTHER}
  433. REASON_UNKNOWN = SHTDN_REASON_UNKNOWN;
  434. {$EXTERNALSYM REASON_UNKNOWN}
  435. REASON_LEGACY_API = SHTDN_REASON_LEGACY_API;
  436. {$EXTERNALSYM REASON_LEGACY_API}
  437. REASON_PLANNED_FLAG = SHTDN_REASON_FLAG_PLANNED;
  438. {$EXTERNALSYM REASON_PLANNED_FLAG}
  439. //
  440. // MAX Shutdown TimeOut == 10 Years in seconds
  441. //
  442. MAX_SHUTDOWN_TIMEOUT = 10 * 365 * 24 * 60 * 60;
  443. {$EXTERNALSYM MAX_SHUTDOWN_TIMEOUT}
  444. function InitiateSystemShutdownExA(lpMachineName: LPSTR; lpMessage: LPSTR;
  445. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
  446. {$EXTERNALSYM InitiateSystemShutdownExA}
  447. function InitiateSystemShutdownExW(lpMachineName: LPWSTR; lpMessage: LPWSTR;
  448. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
  449. {$EXTERNALSYM InitiateSystemShutdownExW}
  450. function InitiateSystemShutdownEx(lpMachineName: LPTSTR; lpMessage: LPTSTR;
  451. dwTimeout: DWORD; bForceAppsClosed, bRebootAfterShutdown: BOOL; dwReason: DWORD): BOOL; stdcall;
  452. {$EXTERNALSYM InitiateSystemShutdownEx}
  453. function RegSaveKeyExA(hKey: HKEY; lpFile: LPCSTR;
  454. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
  455. {$EXTERNALSYM RegSaveKeyExA}
  456. function RegSaveKeyExW(hKey: HKEY; lpFile: LPCWSTR;
  457. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
  458. {$EXTERNALSYM RegSaveKeyExW}
  459. function RegSaveKeyEx(hKey: HKEY; lpFile: LPCTSTR;
  460. lpSecurityAttributes: LPSECURITY_ATTRIBUTES; Flags: DWORD): LONG; stdcall;
  461. {$EXTERNALSYM RegSaveKeyEx}
  462. function Wow64Win32ApiEntry(dwFuncNumber, dwFlag, dwRes: DWORD): LONG; stdcall;
  463. {$EXTERNALSYM Wow64Win32ApiEntry}
  464. implementation
  465. const
  466. advapi32 = 'advapi32.dll';
  467. {$IFDEF UNICODE}
  468. AWSuffix = 'W';
  469. {$ELSE}
  470. AWSuffix = 'A';
  471. {$ENDIF UNICODE}
  472. type
  473. TRegNotifyChangeKeyValue = function(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG; stdcall;
  474. var
  475. _RegNotifyChangeKeyValue: Pointer;
  476. function RegNotifyChangeKeyValue(hKey: HKEY; bWatchSubtree: LongBool; dwNotifyFilter: DWORD; hEvent: HANDLE; fAsynchronus: LongBool): LONG;
  477. begin
  478. GetProcedureAddress(_RegNotifyChangeKeyValue, advapi32, 'RegNotifyChangeKeyValue');
  479. if bWatchSubTree then
  480. Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(1), dwNotifyFilter, hEvent, fAsynchronus)
  481. else
  482. Result := TRegNotifyChangeKeyValue(_RegNotifyChangeKeyValue)(hKey, LongBool(0), dwNotifyFilter, hEvent, fAsynchronus);
  483. end;
  484. {$IFDEF DYNAMIC_LINK}
  485. var
  486. _RegCloseKey: Pointer;
  487. function RegCloseKey;
  488. begin
  489. GetProcedureAddress(_RegCloseKey, advapi32, 'RegCloseKey');
  490. asm
  491. MOV ESP, EBP
  492. POP EBP
  493. JMP [_RegCloseKey]
  494. end;
  495. end;
  496. var
  497. _RegOverridePredefKey: Pointer;
  498. function RegOverridePredefKey;
  499. begin
  500. GetProcedureAddress(_RegOverridePredefKey, advapi32, 'RegOverridePredefKey');
  501. asm
  502. MOV ESP, EBP
  503. POP EBP
  504. JMP [_RegOverridePredefKey]
  505. end;
  506. end;
  507. var
  508. _RegOpenUserClassesRoot: Pointer;
  509. function RegOpenUserClassesRoot;
  510. begin
  511. GetProcedureAddress(_RegOpenUserClassesRoot, advapi32, 'RegOpenUserClassesRoot');
  512. asm
  513. MOV ESP, EBP
  514. POP EBP
  515. JMP [_RegOpenUserClassesRoot]
  516. end;
  517. end;
  518. var
  519. _RegOpenCurrentUser: Pointer;
  520. function RegOpenCurrentUser;
  521. begin
  522. GetProcedureAddress(_RegOpenCurrentUser, advapi32, 'RegOpenCurrentUser');
  523. asm
  524. MOV ESP, EBP
  525. POP EBP
  526. JMP [_RegOpenCurrentUser]
  527. end;
  528. end;
  529. var
  530. _RegDisablePredefinedCache: Pointer;
  531. function RegDisablePredefinedCache;
  532. begin
  533. GetProcedureAddress(_RegDisablePredefinedCache, advapi32, 'RegDisablePredefinedCache');
  534. asm
  535. MOV ESP, EBP
  536. POP EBP
  537. JMP [_RegDisablePredefinedCache]
  538. end;
  539. end;
  540. var
  541. _RegConnectRegistryA: Pointer;
  542. function RegConnectRegistryA;
  543. begin
  544. GetProcedureAddress(_RegConnectRegistryA, advapi32, 'RegConnectRegistryA');
  545. asm
  546. MOV ESP, EBP
  547. POP EBP
  548. JMP [_RegConnectRegistryA]
  549. end;
  550. end;
  551. var
  552. _RegConnectRegistryW: Pointer;
  553. function RegConnectRegistryW;
  554. begin
  555. GetProcedureAddress(_RegConnectRegistryW, advapi32, 'RegConnectRegistryW');
  556. asm
  557. MOV ESP, EBP
  558. POP EBP
  559. JMP [_RegConnectRegistryW]
  560. end;
  561. end;
  562. var
  563. _RegConnectRegistry: Pointer;
  564. function RegConnectRegistry;
  565. begin
  566. GetProcedureAddress(_RegConnectRegistry, advapi32, 'RegConnectRegistry' + AWSuffix);
  567. asm
  568. MOV ESP, EBP
  569. POP EBP
  570. JMP [_RegConnectRegistry]
  571. end;
  572. end;
  573. var
  574. _RegCreateKeyA: Pointer;
  575. function RegCreateKeyA;
  576. begin
  577. GetProcedureAddress(_RegCreateKeyA, advapi32, 'RegCreateKeyA');
  578. asm
  579. MOV ESP, EBP
  580. POP EBP
  581. JMP [_RegCreateKeyA]
  582. end;
  583. end;
  584. var
  585. _RegCreateKeyW: Pointer;
  586. function RegCreateKeyW;
  587. begin
  588. GetProcedureAddress(_RegCreateKeyW, advapi32, 'RegCreateKeyW');
  589. asm
  590. MOV ESP, EBP
  591. POP EBP
  592. JMP [_RegCreateKeyW]
  593. end;
  594. end;
  595. var
  596. _RegCreateKey: Pointer;
  597. function RegCreateKey;
  598. begin
  599. GetProcedureAddress(_RegCreateKey, advapi32, 'RegCreateKey' + AWSuffix);
  600. asm
  601. MOV ESP, EBP
  602. POP EBP
  603. JMP [_RegCreateKey]
  604. end;
  605. end;
  606. var
  607. _RegCreateKeyExA: Pointer;
  608. function RegCreateKeyExA;
  609. begin
  610. GetProcedureAddress(_RegCreateKeyExA, advapi32, 'RegCreateKeyExA');
  611. asm
  612. MOV ESP, EBP
  613. POP EBP
  614. JMP [_RegCreateKeyExA]
  615. end;
  616. end;
  617. var
  618. _RegCreateKeyExW: Pointer;
  619. function RegCreateKeyExW;
  620. begin
  621. GetProcedureAddress(_RegCreateKeyExW, advapi32, 'RegCreateKeyExW');
  622. asm
  623. MOV ESP, EBP
  624. POP EBP
  625. JMP [_RegCreateKeyExW]
  626. end;
  627. end;
  628. var
  629. _RegCreateKeyEx: Pointer;
  630. function RegCreateKeyEx;
  631. begin
  632. GetProcedureAddress(_RegCreateKeyEx, advapi32, 'RegCreateKeyEx' + AWSuffix);
  633. asm
  634. MOV ESP, EBP
  635. POP EBP
  636. JMP [_RegCreateKeyEx]
  637. end;
  638. end;
  639. var
  640. _RegDeleteKeyA: Pointer;
  641. function RegDeleteKeyA;
  642. begin
  643. GetProcedureAddress(_RegDeleteKeyA, advapi32, 'RegDeleteKeyA');
  644. asm
  645. MOV ESP, EBP
  646. POP EBP
  647. JMP [_RegDeleteKeyA]
  648. end;
  649. end;
  650. var
  651. _RegDeleteKeyW: Pointer;
  652. function RegDeleteKeyW;
  653. begin
  654. GetProcedureAddress(_RegDeleteKeyW, advapi32, 'RegDeleteKeyW');
  655. asm
  656. MOV ESP, EBP
  657. POP EBP
  658. JMP [_RegDeleteKeyW]
  659. end;
  660. end;
  661. var
  662. _RegDeleteKey: Pointer;
  663. function RegDeleteKey;
  664. begin
  665. GetProcedureAddress(_RegDeleteKey, advapi32, 'RegDeleteKey' + AWSuffix);
  666. asm
  667. MOV ESP, EBP
  668. POP EBP
  669. JMP [_RegDeleteKey]
  670. end;
  671. end;
  672. var
  673. _RegDeleteValueA: Pointer;
  674. function RegDeleteValueA;
  675. begin
  676. GetProcedureAddress(_RegDeleteValueA, advapi32, 'RegDeleteValueA');
  677. asm
  678. MOV ESP, EBP
  679. POP EBP
  680. JMP [_RegDeleteValueA]
  681. end;
  682. end;
  683. var
  684. _RegDeleteValueW: Pointer;
  685. function RegDeleteValueW;
  686. begin
  687. GetProcedureAddress(_RegDeleteValueW, advapi32, 'RegDeleteValueW');
  688. asm
  689. MOV ESP, EBP
  690. POP EBP
  691. JMP [_RegDeleteValueW]
  692. end;
  693. end;
  694. var
  695. _RegDeleteValue: Pointer;
  696. function RegDeleteValue;
  697. begin
  698. GetProcedureAddress(_RegDeleteValue, advapi32, 'RegDeleteValue' + AWSuffix);
  699. asm
  700. MOV ESP, EBP
  701. POP EBP
  702. JMP [_RegDeleteValue]
  703. end;
  704. end;
  705. var
  706. _RegEnumKeyA: Pointer;
  707. function RegEnumKeyA;
  708. begin
  709. GetProcedureAddress(_RegEnumKeyA, advapi32, 'RegEnumKeyA');
  710. asm
  711. MOV ESP, EBP
  712. POP EBP
  713. JMP [_RegEnumKeyA]
  714. end;
  715. end;
  716. var
  717. _RegEnumKeyW: Pointer;
  718. function RegEnumKeyW;
  719. begin
  720. GetProcedureAddress(_RegEnumKeyW, advapi32, 'RegEnumKeyW');
  721. asm
  722. MOV ESP, EBP
  723. POP EBP
  724. JMP [_RegEnumKeyW]
  725. end;
  726. end;
  727. var
  728. _RegEnumKey: Pointer;
  729. function RegEnumKey;
  730. begin
  731. GetProcedureAddress(_RegEnumKey, advapi32, 'RegEnumKey' + AWSuffix);
  732. asm
  733. MOV ESP, EBP
  734. POP EBP
  735. JMP [_RegEnumKey]
  736. end;
  737. end;
  738. var
  739. _RegEnumKeyExA: Pointer;
  740. function RegEnumKeyExA;
  741. begin
  742. GetProcedureAddress(_RegEnumKeyExA, advapi32, 'RegEnumKeyExA');
  743. asm
  744. MOV ESP, EBP
  745. POP EBP
  746. JMP [_RegEnumKeyExA]
  747. end;
  748. end;
  749. var
  750. _RegEnumKeyExW: Pointer;
  751. function RegEnumKeyExW;
  752. begin
  753. GetProcedureAddress(_RegEnumKeyExW, advapi32, 'RegEnumKeyExW');
  754. asm
  755. MOV ESP, EBP
  756. POP EBP
  757. JMP [_RegEnumKeyExW]
  758. end;
  759. end;
  760. var
  761. _RegEnumKeyEx: Pointer;
  762. function RegEnumKeyEx;
  763. begin
  764. GetProcedureAddress(_RegEnumKeyEx, advapi32, 'RegEnumKeyEx' + AWSuffix);
  765. asm
  766. MOV ESP, EBP
  767. POP EBP
  768. JMP [_RegEnumKeyEx]
  769. end;
  770. end;
  771. var
  772. _RegEnumValueA: Pointer;
  773. function RegEnumValueA;
  774. begin
  775. GetProcedureAddress(_RegEnumValueA, advapi32, 'RegEnumValueA');
  776. asm
  777. MOV ESP, EBP
  778. POP EBP
  779. JMP [_RegEnumValueA]
  780. end;
  781. end;
  782. var
  783. _RegEnumValueW: Pointer;
  784. function RegEnumValueW;
  785. begin
  786. GetProcedureAddress(_RegEnumValueW, advapi32, 'RegEnumValueW');
  787. asm
  788. MOV ESP, EBP
  789. POP EBP
  790. JMP [_RegEnumValueW]
  791. end;
  792. end;
  793. var
  794. _RegEnumValue: Pointer;
  795. function RegEnumValue;
  796. begin
  797. GetProcedureAddress(_RegEnumValue, advapi32, 'RegEnumValue' + AWSuffix);
  798. asm
  799. MOV ESP, EBP
  800. POP EBP
  801. JMP [_RegEnumValue]
  802. end;
  803. end;
  804. var
  805. _RegFlushKey: Pointer;
  806. function RegFlushKey;
  807. begin
  808. GetProcedureAddress(_RegFlushKey, advapi32, 'RegFlushKey');
  809. asm
  810. MOV ESP, EBP
  811. POP EBP
  812. JMP [_RegFlushKey]
  813. end;
  814. end;
  815. var
  816. _RegGetKeySecurity: Pointer;
  817. function RegGetKeySecurity;
  818. begin
  819. GetProcedureAddress(_RegGetKeySecurity, advapi32, 'RegGetKeySecurity');
  820. asm
  821. MOV ESP, EBP
  822. POP EBP
  823. JMP [_RegGetKeySecurity]
  824. end;
  825. end;
  826. var
  827. _RegLoadKeyA: Pointer;
  828. function RegLoadKeyA;
  829. begin
  830. GetProcedureAddress(_RegLoadKeyA, advapi32, 'RegLoadKeyA');
  831. asm
  832. MOV ESP, EBP
  833. POP EBP
  834. JMP [_RegLoadKeyA]
  835. end;
  836. end;
  837. var
  838. _RegLoadKeyW: Pointer;
  839. function RegLoadKeyW;
  840. begin
  841. GetProcedureAddress(_RegLoadKeyW, advapi32, 'RegLoadKeyW');
  842. asm
  843. MOV ESP, EBP
  844. POP EBP
  845. JMP [_RegLoadKeyW]
  846. end;
  847. end;
  848. var
  849. _RegLoadKey: Pointer;
  850. function RegLoadKey;
  851. begin
  852. GetProcedureAddress(_RegLoadKey, advapi32, 'RegLoadKey' + AWSuffix);
  853. asm
  854. MOV ESP, EBP
  855. POP EBP
  856. JMP [_RegLoadKey]
  857. end;
  858. end;
  859. var
  860. _RegOpenKeyA: Pointer;
  861. function RegOpenKeyA;
  862. begin
  863. GetProcedureAddress(_RegOpenKeyA, advapi32, 'RegOpenKeyA');
  864. asm
  865. MOV ESP, EBP
  866. POP EBP
  867. JMP [_RegOpenKeyA]
  868. end;
  869. end;
  870. var
  871. _RegOpenKeyW: Pointer;
  872. function RegOpenKeyW;
  873. begin
  874. GetProcedureAddress(_RegOpenKeyW, advapi32, 'RegOpenKeyW');
  875. asm
  876. MOV ESP, EBP
  877. POP EBP
  878. JMP [_RegOpenKeyW]
  879. end;
  880. end;
  881. var
  882. _RegOpenKey: Pointer;
  883. function RegOpenKey;
  884. begin
  885. GetProcedureAddress(_RegOpenKey, advapi32, 'RegOpenKey' + AWSuffix);
  886. asm
  887. MOV ESP, EBP
  888. POP EBP
  889. JMP [_RegOpenKey]
  890. end;
  891. end;
  892. var
  893. _RegOpenKeyExA: Pointer;
  894. function RegOpenKeyExA;
  895. begin
  896. GetProcedureAddress(_RegOpenKeyExA, advapi32, 'RegOpenKeyExA');
  897. asm
  898. MOV ESP, EBP
  899. POP EBP
  900. JMP [_RegOpenKeyExA]
  901. end;
  902. end;
  903. var
  904. _RegOpenKeyExW: Pointer;
  905. function RegOpenKeyExW;
  906. begin
  907. GetProcedureAddress(_RegOpenKeyExW, advapi32, 'RegOpenKeyExW');
  908. asm
  909. MOV ESP, EBP
  910. POP EBP
  911. JMP [_RegOpenKeyExW]
  912. end;
  913. end;
  914. var
  915. _RegOpenKeyEx: Pointer;
  916. function RegOpenKeyEx;
  917. begin
  918. GetProcedureAddress(_RegOpenKeyEx, advapi32, 'RegOpenKeyEx' + AWSuffix);
  919. asm
  920. MOV ESP, EBP
  921. POP EBP
  922. JMP [_RegOpenKeyEx]
  923. end;
  924. end;
  925. var
  926. _RegQueryInfoKeyA: Pointer;
  927. function RegQueryInfoKeyA;
  928. begin
  929. GetProcedureAddress(_RegQueryInfoKeyA, advapi32, 'RegQueryInfoKeyA');
  930. asm
  931. MOV ESP, EBP
  932. POP EBP
  933. JMP [_RegQueryInfoKeyA]
  934. end;
  935. end;
  936. var
  937. _RegQueryInfoKeyW: Pointer;
  938. function RegQueryInfoKeyW;
  939. begin
  940. GetProcedureAddress(_RegQueryInfoKeyW, advapi32, 'RegQueryInfoKeyW');
  941. asm
  942. MOV ESP, EBP
  943. POP EBP
  944. JMP [_RegQueryInfoKeyW]
  945. end;
  946. end;
  947. var
  948. _RegQueryInfoKey: Pointer;
  949. function RegQueryInfoKey;
  950. begin
  951. GetProcedureAddress(_RegQueryInfoKey, advapi32, 'RegQueryInfoKey' + AWSuffix);
  952. asm
  953. MOV ESP, EBP
  954. POP EBP
  955. JMP [_RegQueryInfoKey]
  956. end;
  957. end;
  958. var
  959. _RegQueryValueA: Pointer;
  960. function RegQueryValueA;
  961. begin
  962. GetProcedureAddress(_RegQueryValueA, advapi32, 'RegQueryValueA');
  963. asm
  964. MOV ESP, EBP
  965. POP EBP
  966. JMP [_RegQueryValueA]
  967. end;
  968. end;
  969. var
  970. _RegQueryValueW: Pointer;
  971. function RegQueryValueW;
  972. begin
  973. GetProcedureAddress(_RegQueryValueW, advapi32, 'RegQueryValueW');
  974. asm
  975. MOV ESP, EBP
  976. POP EBP
  977. JMP [_RegQueryValueW]
  978. end;
  979. end;
  980. var
  981. _RegQueryValue: Pointer;
  982. function RegQueryValue;
  983. begin
  984. GetProcedureAddress(_RegQueryValue, advapi32, 'RegQueryValue' + AWSuffix);
  985. asm
  986. MOV ESP, EBP
  987. POP EBP
  988. JMP [_RegQueryValue]
  989. end;
  990. end;
  991. var
  992. _RegQueryMultipleValuesA: Pointer;
  993. function RegQueryMultipleValuesA;
  994. begin
  995. GetProcedureAddress(_RegQueryMultipleValuesA, advapi32, 'RegQueryMultipleValuesA');
  996. asm
  997. MOV ESP, EBP
  998. POP EBP
  999. JMP [_RegQueryMultipleValuesA]
  1000. end;
  1001. end;
  1002. var
  1003. _RegQueryMultipleValuesW: Pointer;
  1004. function RegQueryMultipleValuesW;
  1005. begin
  1006. GetProcedureAddress(_RegQueryMultipleValuesW, advapi32, 'RegQueryMultipleValuesW');
  1007. asm
  1008. MOV ESP, EBP
  1009. POP EBP
  1010. JMP [_RegQueryMultipleValuesW]
  1011. end;
  1012. end;
  1013. var
  1014. _RegQueryMultipleValues: Pointer;
  1015. function RegQueryMultipleValues;
  1016. begin
  1017. GetProcedureAddress(_RegQueryMultipleValues, advapi32, 'RegQueryMultipleValues' + AWSuffix);
  1018. asm
  1019. MOV ESP, EBP
  1020. POP EBP
  1021. JMP [_RegQueryMultipleValues]
  1022. end;
  1023. end;
  1024. var
  1025. _RegQueryValueExA: Pointer;
  1026. function RegQueryValueExA;
  1027. begin
  1028. GetProcedureAddress(_RegQueryValueExA, advapi32, 'RegQueryValueExA');
  1029. asm
  1030. MOV ESP, EBP
  1031. POP EBP
  1032. JMP [_RegQueryValueExA]
  1033. end;
  1034. end;
  1035. var
  1036. _RegQueryValueExW: Pointer;
  1037. function RegQueryValueExW;
  1038. begin
  1039. GetProcedureAddress(_RegQueryValueExW, advapi32, 'RegQueryValueExW');
  1040. asm
  1041. MOV ESP, EBP
  1042. POP EBP
  1043. JMP [_RegQueryValueExW]
  1044. end;
  1045. end;
  1046. var
  1047. _RegQueryValueEx: Pointer;
  1048. function RegQueryValueEx;
  1049. begin
  1050. GetProcedureAddress(_RegQueryValueEx, advapi32, 'RegQueryValueEx' + AWSuffix);
  1051. asm
  1052. MOV ESP, EBP
  1053. POP EBP
  1054. JMP [_RegQueryValueEx]
  1055. end;
  1056. end;
  1057. var
  1058. _RegReplaceKeyA: Pointer;
  1059. function RegReplaceKeyA;
  1060. begin
  1061. GetProcedureAddress(_RegReplaceKeyA, advapi32, 'RegReplaceKeyA');
  1062. asm
  1063. MOV ESP, EBP
  1064. POP EBP
  1065. JMP [_RegReplaceKeyA]
  1066. end;
  1067. end;
  1068. var
  1069. _RegReplaceKeyW: Pointer;
  1070. function RegReplaceKeyW;
  1071. begin
  1072. GetProcedureAddress(_RegReplaceKeyW, advapi32, 'RegReplaceKeyW');
  1073. asm
  1074. MOV ESP, EBP
  1075. POP EBP
  1076. JMP [_RegReplaceKeyW]
  1077. end;
  1078. end;
  1079. var
  1080. _RegReplaceKey: Pointer;
  1081. function RegReplaceKey;
  1082. begin
  1083. GetProcedureAddress(_RegReplaceKey, advapi32, 'RegReplaceKey' + AWSuffix);
  1084. asm
  1085. MOV ESP, EBP
  1086. POP EBP
  1087. JMP [_RegReplaceKey]
  1088. end;
  1089. end;
  1090. var
  1091. _RegRestoreKeyA: Pointer;
  1092. function RegRestoreKeyA;
  1093. begin
  1094. GetProcedureAddress(_RegRestoreKeyA, advapi32, 'RegRestoreKeyA');
  1095. asm
  1096. MOV ESP, EBP
  1097. POP EBP
  1098. JMP [_RegRestoreKeyA]
  1099. end;
  1100. end;
  1101. var
  1102. _RegRestoreKeyW: Pointer;
  1103. function RegRestoreKeyW;
  1104. begin
  1105. GetProcedureAddress(_RegRestoreKeyW, advapi32, 'RegRestoreKeyW');
  1106. asm
  1107. MOV ESP, EBP
  1108. POP EBP
  1109. JMP [_RegRestoreKeyW]
  1110. end;
  1111. end;
  1112. var
  1113. _RegRestoreKey: Pointer;
  1114. function RegRestoreKey;
  1115. begin
  1116. GetProcedureAddress(_RegRestoreKey, advapi32, 'RegRestoreKey' + AWSuffix);
  1117. asm
  1118. MOV ESP, EBP
  1119. POP EBP
  1120. JMP [_RegRestoreKey]
  1121. end;
  1122. end;
  1123. var
  1124. _RegSaveKeyA: Pointer;
  1125. function RegSaveKeyA;
  1126. begin
  1127. GetProcedureAddress(_RegSaveKeyA, advapi32, 'RegSaveKeyA');
  1128. asm
  1129. MOV ESP, EBP
  1130. POP EBP
  1131. JMP [_RegSaveKeyA]
  1132. end;
  1133. end;
  1134. var
  1135. _RegSaveKeyW: Pointer;
  1136. function RegSaveKeyW;
  1137. begin
  1138. GetProcedureAddress(_RegSaveKeyW, advapi32, 'RegSaveKeyW');
  1139. asm
  1140. MOV ESP, EBP
  1141. POP EBP
  1142. JMP [_RegSaveKeyW]
  1143. end;
  1144. end;
  1145. var
  1146. _RegSaveKey: Pointer;
  1147. function RegSaveKey;
  1148. begin
  1149. GetProcedureAddress(_RegSaveKey, advapi32, 'RegSaveKey' + AWSuffix);
  1150. asm
  1151. MOV ESP, EBP
  1152. POP EBP
  1153. JMP [_RegSaveKey]
  1154. end;
  1155. end;
  1156. var
  1157. _RegSetKeySecurity: Pointer;
  1158. function RegSetKeySecurity;
  1159. begin
  1160. GetProcedureAddress(_RegSetKeySecurity, advapi32, 'RegSetKeySecurity');
  1161. asm
  1162. MOV ESP, EBP
  1163. POP EBP
  1164. JMP [_RegSetKeySecurity]
  1165. end;
  1166. end;
  1167. var
  1168. _RegSetValueA: Pointer;
  1169. function RegSetValueA;
  1170. begin
  1171. GetProcedureAddress(_RegSetValueA, advapi32, 'RegSetValueA');
  1172. asm
  1173. MOV ESP, EBP
  1174. POP EBP
  1175. JMP [_RegSetValueA]
  1176. end;
  1177. end;
  1178. var
  1179. _RegSetValueW: Pointer;
  1180. function RegSetValueW;
  1181. begin
  1182. GetProcedureAddress(_RegSetValueW, advapi32, 'RegSetValueW');
  1183. asm
  1184. MOV ESP, EBP
  1185. POP EBP
  1186. JMP [_RegSetValueW]
  1187. end;
  1188. end;
  1189. var
  1190. _RegSetValue: Pointer;
  1191. function RegSetValue;
  1192. begin
  1193. GetProcedureAddress(_RegSetValue, advapi32, 'RegSetValue' + AWSuffix);
  1194. asm
  1195. MOV ESP, EBP
  1196. POP EBP
  1197. JMP [_RegSetValue]
  1198. end;
  1199. end;
  1200. var
  1201. _RegSetValueExA: Pointer;
  1202. function RegSetValueExA;
  1203. begin
  1204. GetProcedureAddress(_RegSetValueExA, advapi32, 'RegSetValueExA');
  1205. asm
  1206. MOV ESP, EBP
  1207. POP EBP
  1208. JMP [_RegSetValueExA]
  1209. end;
  1210. end;
  1211. var
  1212. _RegSetValueExW: Pointer;
  1213. function RegSetValueExW;
  1214. begin
  1215. GetProcedureAddress(_RegSetValueExW, advapi32, 'RegSetValueExW');
  1216. asm
  1217. MOV ESP, EBP
  1218. POP EBP
  1219. JMP [_RegSetValueExW]
  1220. end;
  1221. end;
  1222. var
  1223. _RegSetValueEx: Pointer;
  1224. function RegSetValueEx;
  1225. begin
  1226. GetProcedureAddress(_RegSetValueEx, advapi32, 'RegSetValueEx' + AWSuffix);
  1227. asm
  1228. MOV ESP, EBP
  1229. POP EBP
  1230. JMP [_RegSetValueEx]
  1231. end;
  1232. end;
  1233. var
  1234. _RegUnLoadKeyA: Pointer;
  1235. function RegUnLoadKeyA;
  1236. begin
  1237. GetProcedureAddress(_RegUnLoadKeyA, advapi32, 'RegUnLoadKeyA');
  1238. asm
  1239. MOV ESP, EBP
  1240. POP EBP
  1241. JMP [_RegUnLoadKeyA]
  1242. end;
  1243. end;
  1244. var
  1245. _RegUnLoadKeyW: Pointer;
  1246. function RegUnLoadKeyW;
  1247. begin
  1248. GetProcedureAddress(_RegUnLoadKeyW, advapi32, 'RegUnLoadKeyW');
  1249. asm
  1250. MOV ESP, EBP
  1251. POP EBP
  1252. JMP [_RegUnLoadKeyW]
  1253. end;
  1254. end;
  1255. var
  1256. _RegUnLoadKey: Pointer;
  1257. function RegUnLoadKey;
  1258. begin
  1259. GetProcedureAddress(_RegUnLoadKey, advapi32, 'RegUnLoadKey' + AWSuffix);
  1260. asm
  1261. MOV ESP, EBP
  1262. POP EBP
  1263. JMP [_RegUnLoadKey]
  1264. end;
  1265. end;
  1266. var
  1267. _InitiateSystemShutdownA: Pointer;
  1268. function InitiateSystemShutdownA;
  1269. begin
  1270. GetProcedureAddress(_InitiateSystemShutdownA, advapi32, 'InitiateSystemShutdownA');
  1271. asm
  1272. MOV ESP, EBP
  1273. POP EBP
  1274. JMP [_InitiateSystemShutdownA]
  1275. end;
  1276. end;
  1277. var
  1278. _InitiateSystemShutdownW: Pointer;
  1279. function InitiateSystemShutdownW;
  1280. begin
  1281. GetProcedureAddress(_InitiateSystemShutdownW, advapi32, 'InitiateSystemShutdownW');
  1282. asm
  1283. MOV ESP, EBP
  1284. POP EBP
  1285. JMP [_InitiateSystemShutdownW]
  1286. end;
  1287. end;
  1288. var
  1289. _InitiateSystemShutdown: Pointer;
  1290. function InitiateSystemShutdown;
  1291. begin
  1292. GetProcedureAddress(_InitiateSystemShutdown, advapi32, 'InitiateSystemShutdown' + AWSuffix);
  1293. asm
  1294. MOV ESP, EBP
  1295. POP EBP
  1296. JMP [_InitiateSystemShutdown]
  1297. end;
  1298. end;
  1299. var
  1300. _AbortSystemShutdownA: Pointer;
  1301. function AbortSystemShutdownA;
  1302. begin
  1303. GetProcedureAddress(_AbortSystemShutdownA, advapi32, 'AbortSystemShutdownA');
  1304. asm
  1305. MOV ESP, EBP
  1306. POP EBP
  1307. JMP [_AbortSystemShutdownA]
  1308. end;
  1309. end;
  1310. var
  1311. _AbortSystemShutdownW: Pointer;
  1312. function AbortSystemShutdownW;
  1313. begin
  1314. GetProcedureAddress(_AbortSystemShutdownW, advapi32, 'AbortSystemShutdownW');
  1315. asm
  1316. MOV ESP, EBP
  1317. POP EBP
  1318. JMP [_AbortSystemShutdownW]
  1319. end;
  1320. end;
  1321. var
  1322. _AbortSystemShutdown: Pointer;
  1323. function AbortSystemShutdown;
  1324. begin
  1325. GetProcedureAddress(_AbortSystemShutdown, advapi32, 'AbortSystemShutdown' + AWSuffix);
  1326. asm
  1327. MOV ESP, EBP
  1328. POP EBP
  1329. JMP [_AbortSystemShutdown]
  1330. end;
  1331. end;
  1332. var
  1333. _InitiateSystemShutdownExA: Pointer;
  1334. function InitiateSystemShutdownExA;
  1335. begin
  1336. GetProcedureAddress(_InitiateSystemShutdownExA, advapi32, 'InitiateSystemShutdownExA');
  1337. asm
  1338. MOV ESP, EBP
  1339. POP EBP
  1340. JMP [_InitiateSystemShutdownExA]
  1341. end;
  1342. end;
  1343. var
  1344. _InitiateSystemShutdownExW: Pointer;
  1345. function InitiateSystemShutdownExW;
  1346. begin
  1347. GetProcedureAddress(_InitiateSystemShutdownExW, advapi32, 'InitiateSystemShutdownExW');
  1348. asm
  1349. MOV ESP, EBP
  1350. POP EBP
  1351. JMP [_InitiateSystemShutdownExW]
  1352. end;
  1353. end;
  1354. var
  1355. _InitiateSystemShutdownEx: Pointer;
  1356. function InitiateSystemShutdownEx;
  1357. begin
  1358. GetProcedureAddress(_InitiateSystemShutdownEx, advapi32, 'InitiateSystemShutdownEx' + AWSuffix);
  1359. asm
  1360. MOV ESP, EBP
  1361. POP EBP
  1362. JMP [_InitiateSystemShutdownEx]
  1363. end;
  1364. end;
  1365. var
  1366. _RegSaveKeyExA: Pointer;
  1367. function RegSaveKeyExA;
  1368. begin
  1369. GetProcedureAddress(_RegSaveKeyExA, advapi32, 'RegSaveKeyExA');
  1370. asm
  1371. MOV ESP, EBP
  1372. POP EBP
  1373. JMP [_RegSaveKeyExA]
  1374. end;
  1375. end;
  1376. var
  1377. _RegSaveKeyExW: Pointer;
  1378. function RegSaveKeyExW;
  1379. begin
  1380. GetProcedureAddress(_RegSaveKeyExW, advapi32, 'RegSaveKeyExW');
  1381. asm
  1382. MOV ESP, EBP
  1383. POP EBP
  1384. JMP [_RegSaveKeyExW]
  1385. end;
  1386. end;
  1387. var
  1388. _RegSaveKeyEx: Pointer;
  1389. function RegSaveKeyEx;
  1390. begin
  1391. GetProcedureAddress(_RegSaveKeyEx, advapi32, 'RegSaveKeyEx' + AWSuffix);
  1392. asm
  1393. MOV ESP, EBP
  1394. POP EBP
  1395. JMP [_RegSaveKeyEx]
  1396. end;
  1397. end;
  1398. var
  1399. _Wow64Win32ApiEntry: Pointer;
  1400. function Wow64Win32ApiEntry;
  1401. begin
  1402. GetProcedureAddress(_Wow64Win32ApiEntry, advapi32, 'Wow64Win32ApiEntry');
  1403. asm
  1404. MOV ESP, EBP
  1405. POP EBP
  1406. JMP [_Wow64Win32ApiEntry]
  1407. end;
  1408. end;
  1409. {$ELSE}
  1410. function RegCloseKey; external advapi32 name 'RegCloseKey';
  1411. function RegOverridePredefKey; external advapi32 name 'RegOverridePredefKey';
  1412. function RegOpenUserClassesRoot; external advapi32 name 'RegOpenUserClassesRoot';
  1413. function RegOpenCurrentUser; external advapi32 name 'RegOpenCurrentUser';
  1414. function RegDisablePredefinedCache; external advapi32 name 'RegDisablePredefinedCache';
  1415. function RegConnectRegistryA; external advapi32 name 'RegConnectRegistryA';
  1416. function RegConnectRegistryW; external advapi32 name 'RegConnectRegistryW';
  1417. function RegConnectRegistry; external advapi32 name 'RegConnectRegistry' + AWSuffix;
  1418. function RegCreateKeyA; external advapi32 name 'RegCreateKeyA';
  1419. function RegCreateKeyW; external advapi32 name 'RegCreateKeyW';
  1420. function RegCreateKey; external advapi32 name 'RegCreateKey' + AWSuffix;
  1421. function RegCreateKeyExA; external advapi32 name 'RegCreateKeyExA';
  1422. function RegCreateKeyExW; external advapi32 name 'RegCreateKeyExW';
  1423. function RegCreateKeyEx; external advapi32 name 'RegCreateKeyEx' + AWSuffix;
  1424. function RegDeleteKeyA; external advapi32 name 'RegDeleteKeyA';
  1425. function RegDeleteKeyW; external advapi32 name 'RegDeleteKeyW';
  1426. function RegDeleteKey; external advapi32 name 'RegDeleteKey' + AWSuffix;
  1427. function RegDeleteValueA; external advapi32 name 'RegDeleteValueA';
  1428. function RegDeleteValueW; external advapi32 name 'RegDeleteValueW';
  1429. function RegDeleteValue; external advapi32 name 'RegDeleteValue' + AWSuffix;
  1430. function RegEnumKeyA; external advapi32 name 'RegEnumKeyA';
  1431. function RegEnumKeyW; external advapi32 name 'RegEnumKeyW';
  1432. function RegEnumKey; external advapi32 name 'RegEnumKey' + AWSuffix;
  1433. function RegEnumKeyExA; external advapi32 name 'RegEnumKeyExA';
  1434. function RegEnumKeyExW; external advapi32 name 'RegEnumKeyExW';
  1435. function RegEnumKeyEx; external advapi32 name 'RegEnumKeyEx' + AWSuffix;
  1436. function RegEnumValueA; external advapi32 name 'RegEnumValueA';
  1437. function RegEnumValueW; external advapi32 name 'RegEnumValueW';
  1438. function RegEnumValue; external advapi32 name 'RegEnumValue' + AWSuffix;
  1439. function RegFlushKey; external advapi32 name 'RegFlushKey';
  1440. function RegGetKeySecurity; external advapi32 name 'RegGetKeySecurity';
  1441. function RegLoadKeyA; external advapi32 name 'RegLoadKeyA';
  1442. function RegLoadKeyW; external advapi32 name 'RegLoadKeyW';
  1443. function RegLoadKey; external advapi32 name 'RegLoadKey' + AWSuffix;
  1444. function RegOpenKeyA; external advapi32 name 'RegOpenKeyA';
  1445. function RegOpenKeyW; external advapi32 name 'RegOpenKeyW';
  1446. function RegOpenKey; external advapi32 name 'RegOpenKey' + AWSuffix;
  1447. function RegOpenKeyExA; external advapi32 name 'RegOpenKeyExA';
  1448. function RegOpenKeyExW; external advapi32 name 'RegOpenKeyExW';
  1449. function RegOpenKeyEx; external advapi32 name 'RegOpenKeyEx' + AWSuffix;
  1450. function RegQueryInfoKeyA; external advapi32 name 'RegQueryInfoKeyA';
  1451. function RegQueryInfoKeyW; external advapi32 name 'RegQueryInfoKeyW';
  1452. function RegQueryInfoKey; external advapi32 name 'RegQueryInfoKey' + AWSuffix;
  1453. function RegQueryValueA; external advapi32 name 'RegQueryValueA';
  1454. function RegQueryValueW; external advapi32 name 'RegQueryValueW';
  1455. function RegQueryValue; external advapi32 name 'RegQueryValue' + AWSuffix;
  1456. function RegQueryMultipleValuesA; external advapi32 name 'RegQueryMultipleValuesA';
  1457. function RegQueryMultipleValuesW; external advapi32 name 'RegQueryMultipleValuesW';
  1458. function RegQueryMultipleValues; external advapi32 name 'RegQueryMultipleValues' + AWSuffix;
  1459. function RegQueryValueExA; external advapi32 name 'RegQueryValueExA';
  1460. function RegQueryValueExW; external advapi32 name 'RegQueryValueExW';
  1461. function RegQueryValueEx; external advapi32 name 'RegQueryValueEx' + AWSuffix;
  1462. function RegReplaceKeyA; external advapi32 name 'RegReplaceKeyA';
  1463. function RegReplaceKeyW; external advapi32 name 'RegReplaceKeyW';
  1464. function RegReplaceKey; external advapi32 name 'RegReplaceKey' + AWSuffix;
  1465. function RegRestoreKeyA; external advapi32 name 'RegRestoreKeyA';
  1466. function RegRestoreKeyW; external advapi32 name 'RegRestoreKeyW';
  1467. function RegRestoreKey; external advapi32 name 'RegRestoreKey' + AWSuffix;
  1468. function RegSaveKeyA; external advapi32 name 'RegSaveKeyA';
  1469. function RegSaveKeyW; external advapi32 name 'RegSaveKeyW';
  1470. function RegSaveKey; external advapi32 name 'RegSaveKey' + AWSuffix;
  1471. function RegSetKeySecurity; external advapi32 name 'RegSetKeySecurity';
  1472. function RegSetValueA; external advapi32 name 'RegSetValueA';
  1473. function RegSetValueW; external advapi32 name 'RegSetValueW';
  1474. function RegSetValue; external advapi32 name 'RegSetValue' + AWSuffix;
  1475. function RegSetValueExA; external advapi32 name 'RegSetValueExA';
  1476. function RegSetValueExW; external advapi32 name 'RegSetValueExW';
  1477. function RegSetValueEx; external advapi32 name 'RegSetValueEx' + AWSuffix;
  1478. function RegUnLoadKeyA; external advapi32 name 'RegUnLoadKeyA';
  1479. function RegUnLoadKeyW; external advapi32 name 'RegUnLoadKeyW';
  1480. function RegUnLoadKey; external advapi32 name 'RegUnLoadKey' + AWSuffix;
  1481. function InitiateSystemShutdownA; external advapi32 name 'InitiateSystemShutdownA';
  1482. function InitiateSystemShutdownW; external advapi32 name 'InitiateSystemShutdownW';
  1483. function InitiateSystemShutdown; external advapi32 name 'InitiateSystemShutdown' + AWSuffix;
  1484. function AbortSystemShutdownA; external advapi32 name 'AbortSystemShutdownA';
  1485. function AbortSystemShutdownW; external advapi32 name 'AbortSystemShutdownW';
  1486. function AbortSystemShutdown; external advapi32 name 'AbortSystemShutdown' + AWSuffix;
  1487. function InitiateSystemShutdownExA; external advapi32 name 'InitiateSystemShutdownExA';
  1488. function InitiateSystemShutdownExW; external advapi32 name 'InitiateSystemShutdownExW';
  1489. function InitiateSystemShutdownEx; external advapi32 name 'InitiateSystemShutdownEx' + AWSuffix;
  1490. function RegSaveKeyExA; external advapi32 name 'RegSaveKeyExA';
  1491. function RegSaveKeyExW; external advapi32 name 'RegSaveKeyExW';
  1492. function RegSaveKeyEx; external advapi32 name 'RegSaveKeyEx' + AWSuffix;
  1493. function Wow64Win32ApiEntry; external advapi32 name 'Wow64Win32ApiEntry';
  1494. {$ENDIF DYNAMIC_LINK}
  1495. end.