jwawinreg.pas 48 KB

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