Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

489 lines
25 KiB

  1. /*++ BUILD Version: 0001
  2. *
  3. * WOW v1.0
  4. *
  5. * Copyright (c) 2002, Microsoft Corporation
  6. *
  7. * dpmf_reg.h
  8. * WOW32 Dynamic Patch Module to support Registry API family
  9. * Definitions & macors to support calls into dpmfreg.dll
  10. *
  11. * History:
  12. * Created 01-10-2002 by cmjones
  13. --*/
  14. #ifndef _DPMF_REGAPI_H_
  15. #define _DPMF_REGAPI_H_
  16. #define REGPFT (DPMFAMTBLS()[REG_FAM])
  17. #define REG_SHIM(ord, typ) ((typ)((pFT)->pDpmShmTbls[ord]))
  18. // The order of this list must be the same as the lists below
  19. enum RegFam {DPM_REGCLOSEKEY=0, // Win 3.1 set
  20. DPM_REGCREATEKEY,
  21. DPM_REGDELETEKEY,
  22. DPM_REGENUMKEY,
  23. DPM_REGOPENKEY,
  24. DPM_REGQUERYVALUE,
  25. DPM_REGSETVALUE, // end Win 3.1 set
  26. DPM_REGDELETEVALUE, // Win 9x API's we currently thunk
  27. DPM_REGENUMVALUE,
  28. DPM_REGFLUSHKEY,
  29. DPM_REGLOADKEY,
  30. DPM_REGQUERYVALUEEX,
  31. DPM_REGSAVEKEY,
  32. DPM_REGSETVALUEEX,
  33. DPM_REGUNLOADKEY, // End Win 9x thunked set
  34. DPM_REGCONNECTREGISTRY, // Remainder for Generic thunk support
  35. DPM_REGCREATEKEYEX,
  36. DPM_REGENUMKEYEX,
  37. DPM_REGNOTIFYCHANGEKEYVALUE,
  38. DPM_REGOPENKEYEX,
  39. DPM_REGQUERYINFOKEY,
  40. DPM_REGQUERYMULTIPLEVALUES,
  41. DPM_REGREPLACEKEY,
  42. DPM_REGCREATEKEYW,
  43. DPM_REGDELETEKEYW,
  44. DPM_REGENUMKEYW,
  45. DPM_REGOPENKEYW,
  46. DPM_REGQUERYVALUEW,
  47. DPM_REGSETVALUEW,
  48. DPM_REGDELETEVALUEW,
  49. DPM_REGENUMVALUEW,
  50. DPM_REGLOADKEYW,
  51. DPM_REGQUERYVALUEEXW,
  52. DPM_REGSAVEKEYW,
  53. DPM_REGSETVALUEEXW,
  54. DPM_REGUNLOADKEYW,
  55. DPM_REGCONNECTREGISTRYW,
  56. DPM_REGCREATEKEYEXW,
  57. DPM_REGENUMKEYEXW,
  58. DPM_REGOPENKEYEXW,
  59. DPM_REGQUERYINFOKEYW,
  60. DPM_REGQUERYMULTIPLEVALUESW,
  61. DPM_REGREPLACEKEYW,
  62. enum_reg_last};
  63. // These types will catch misuse of parameters & ret types
  64. typedef ULONG (*typdpmRegCloseKey)(HKEY);
  65. typedef ULONG (*typdpmRegCreateKey)(HKEY, LPCSTR, PHKEY);
  66. typedef ULONG (*typdpmRegDeleteKey)(HKEY, LPCSTR);
  67. typedef ULONG (*typdpmRegEnumKey)(HKEY, DWORD, LPSTR, DWORD);
  68. typedef ULONG (*typdpmRegOpenKey)(HKEY, LPCSTR, PHKEY);
  69. typedef ULONG (*typdpmRegQueryValue)(HKEY, LPCSTR, LPSTR, PLONG);
  70. typedef ULONG (*typdpmRegSetValue)(HKEY, LPCSTR, DWORD, LPCSTR, DWORD);
  71. typedef ULONG (*typdpmRegDeleteValue)(HKEY, LPCSTR);
  72. typedef ULONG (*typdpmRegEnumValue)(HKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
  73. typedef ULONG (*typdpmRegFlushKey)(HKEY);
  74. typedef ULONG (*typdpmRegLoadKey)(HKEY, LPCSTR, LPCSTR);
  75. typedef ULONG (*typdpmRegQueryValueEx)(HKEY, LPCSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
  76. typedef ULONG (*typdpmRegSaveKey)(HKEY, LPCSTR, LPSECURITY_ATTRIBUTES);
  77. typedef ULONG (*typdpmRegSetValueEx)(HKEY, LPCSTR, DWORD, DWORD, CONST BYTE *, DWORD);
  78. typedef ULONG (*typdpmRegUnLoadKey)(HKEY, LPCSTR);
  79. typedef ULONG (*typdpmRegConnectRegistry)(LPCSTR, HKEY, PHKEY);
  80. typedef ULONG (*typdpmRegCreateKeyEx)(HKEY, LPCSTR, DWORD, LPSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, PHKEY, LPDWORD);
  81. typedef ULONG (*typdpmRegEnumKeyEx)(HKEY, DWORD, LPSTR, LPDWORD, LPDWORD, LPSTR, LPDWORD, PFILETIME);
  82. typedef ULONG (*typdpmRegNotifyChangeKeyValue)(HKEY, BOOL, DWORD, HANDLE, BOOL);
  83. typedef ULONG (*typdpmRegOpenKeyEx)(HKEY, LPCSTR, DWORD, REGSAM, PHKEY);
  84. typedef ULONG (*typdpmRegQueryInfoKey)(HKEY, LPSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, PFILETIME);
  85. typedef ULONG (*typdpmRegQueryMultipleValues)(HKEY, PVALENT, DWORD, LPSTR, LPDWORD);
  86. typedef ULONG (*typdpmRegReplaceKey)(HKEY, LPCSTR, LPCSTR, LPCSTR);
  87. typedef ULONG (*typdpmRegCreateKeyW)(HKEY, LPCWSTR, PHKEY);
  88. typedef ULONG (*typdpmRegDeleteKeyW)(HKEY, LPCWSTR);
  89. typedef ULONG (*typdpmRegEnumKeyW)(HKEY, DWORD, LPWSTR, DWORD);
  90. typedef ULONG (*typdpmRegOpenKeyW)(HKEY, LPCWSTR, PHKEY);
  91. typedef ULONG (*typdpmRegQueryValueW)(HKEY, LPCWSTR, LPWSTR, PLONG);
  92. typedef ULONG (*typdpmRegSetValueW)(HKEY, LPCWSTR, DWORD, LPCWSTR, DWORD);
  93. typedef ULONG (*typdpmRegDeleteValueW)(HKEY, LPCWSTR);
  94. typedef ULONG (*typdpmRegEnumValueW)(HKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
  95. typedef ULONG (*typdpmRegLoadKeyW)(HKEY, LPCWSTR, LPCWSTR);
  96. typedef ULONG (*typdpmRegQueryValueExW)(HKEY, LPCWSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
  97. typedef ULONG (*typdpmRegSaveKeyW)(HKEY, LPCWSTR, LPSECURITY_ATTRIBUTES);
  98. typedef ULONG (*typdpmRegSetValueExW)(HKEY, LPCWSTR, DWORD, DWORD, CONST BYTE *, DWORD);
  99. typedef ULONG (*typdpmRegUnLoadKeyW)(HKEY, LPCWSTR);
  100. typedef ULONG (*typdpmRegConnectRegistryW)(LPCWSTR, HKEY, PHKEY);
  101. typedef ULONG (*typdpmRegCreateKeyExW)(HKEY, LPCWSTR, DWORD, LPWSTR, DWORD, REGSAM, LPSECURITY_ATTRIBUTES, PHKEY, LPDWORD);
  102. typedef ULONG (*typdpmRegEnumKeyExW)(HKEY, DWORD, LPWSTR, LPDWORD, LPDWORD, LPWSTR, LPDWORD, PFILETIME);
  103. typedef ULONG (*typdpmRegOpenKeyExW)(HKEY, LPCWSTR, DWORD, REGSAM, PHKEY);
  104. typedef ULONG (*typdpmRegQueryInfoKeyW)(HKEY, LPWSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, PFILETIME);
  105. typedef ULONG (*typdpmRegQueryMultipleValuesW)(HKEY, PVALENTW, DWORD, LPWSTR, LPDWORD);
  106. typedef ULONG (*typdpmRegReplaceKeyW)(HKEY, LPCWSTR, LPCWSTR, LPCWSTR);
  107. // Macros to dispatch API calls properly
  108. #define DPM_RegCloseKey(a) \
  109. ((typdpmRegCloseKey)(REGPFT->pfn[DPM_REGCLOSEKEY]))(a)
  110. #define DPM_RegCreateKey(a,b,c) \
  111. ((typdpmRegCreateKey)(REGPFT->pfn[DPM_REGCREATEKEY]))(a,b,c)
  112. #define DPM_RegDeleteKey(a,b) \
  113. ((typdpmRegDeleteKey)(REGPFT->pfn[DPM_REGDELETEKEY]))(a,b)
  114. #define DPM_RegEnumKey(a,b,c,d) \
  115. ((typdpmRegEnumKey)(REGPFT->pfn[DPM_REGENUMKEY]))(a,b,c,d)
  116. #define DPM_RegOpenKey(a,b,c) \
  117. ((typdpmRegOpenKey)(REGPFT->pfn[DPM_REGOPENKEY]))(a,b,c)
  118. #define DPM_RegQueryValue(a,b,c,d) \
  119. ((typdpmRegQueryValue)(REGPFT->pfn[DPM_REGQUERYVALUE]))(a,b,c,d)
  120. #define DPM_RegSetValue(a,b,c,d,e) \
  121. ((typdpmRegSetValue)(REGPFT->pfn[DPM_REGSETVALUE]))(a,b,c,d,e)
  122. #define DPM_RegDeleteValue(a,b) \
  123. ((typdpmRegDeleteValue)(REGPFT->pfn[DPM_REGDELETEVALUE]))(a,b)
  124. #define DPM_RegEnumValue(a,b,c,d,e,f,g,h) \
  125. ((typdpmRegEnumValue)(REGPFT->pfn[DPM_REGENUMVALUE]))(a,b,c,d,e,f,g,h)
  126. #define DPM_RegFlushKey(a) \
  127. ((typdpmRegFlushKey)(REGPFT->pfn[DPM_REGFLUSHKEY]))(a)
  128. #define DPM_RegLoadKey(a,b,c) \
  129. ((typdpmRegLoadKey)(REGPFT->pfn[DPM_REGLOADKEY]))(a,b,c)
  130. #define DPM_RegQueryValueEx(a,b,c,d,e,f) \
  131. ((typdpmRegQueryValueEx)(REGPFT->pfn[DPM_REGQUERYVALUEEX]))(a,b,c,d,e,f)
  132. #define DPM_RegSaveKey(a,b,c) \
  133. ((typdpmRegSaveKey)(REGPFT->pfn[DPM_REGSAVEKEY]))(a,b,c)
  134. #define DPM_RegSetValueEx(a,b,c,d,e,f) \
  135. ((typdpmRegSetValueEx)(REGPFT->pfn[DPM_REGSETVALUEEX]))(a,b,c,d,e,f)
  136. #define DPM_RegUnLoadKey(a,b) \
  137. ((typdpmRegUnLoadKey)(REGPFT->pfn[DPM_REGUNLOADKEY]))(a,b)
  138. #define DPM_RegConnectRegistry(a,b,c) \
  139. ((typdpmRegConnectRegistry)(REGPFT->pfn[DPM_REGCONNECTREGISTRY]))(a,b,c)
  140. #define DPM_RegCreateKeyEx(a,b,c,d,e,f,g,h,i) \
  141. ((typdpmRegCreateKeyEx)(REGPFT->pfn[DPM_REGCREATEKEYEX]))(a,b,c,d,e,f,g,h,i)
  142. #define DPM_RegEnumKeyEx(a,b,c,d,e,f,g,h) \
  143. ((typdpmRegEnumKeyEx)(REGPFT->pfn[DPM_REGENUMKEYEX]))(a,b,c,d,e,f,g,h)
  144. #define DPM_RegNotifyChangeKeyValue(a,b,c,d,e) \
  145. ((typdpmRegNotifyChangeKeyValue)(REGPFT->pfn[DPM_REGNOTIFYCHANGEKEYVALUE]))(a,b,c,d,e)
  146. #define DPM_RegOpenKeyEx(a,b,c,d,e) \
  147. ((typdpmRegOpenKeyEx)(REGPFT->pfn[DPM_REGOPENKEYEX]))(a,b,c,d,e)
  148. #define DPM_RegQueryInfoKey(a,b,c,d,e,f,g,h,i,j,k,l) \
  149. ((typdpmRegQueryInfoKey)(REGPFT->pfn[DPM_REGQUERYINFOKEY]))(a,b,c,d,e,f,g,h,i,j,k,l)
  150. #define DPM_RegQueryMultipleValues(a,b,c,d,e) \
  151. ((typdpmRegQueryMultipleValues)(REGPFT->pfn[DPM_REGQUERYMULTIPLEVALUES]))(a,b,c,d,e)
  152. #define DPM_RegReplaceKey(a,b,c,d) \
  153. ((typdpmRegReplaceKey)(REGPFT->pfn[DPM_REGREPLACEKEY]))(a,b,c,d)
  154. #define DPM_RegCreateKeyW(a,b,c) \
  155. ((typdpmRegCreateKeyW)(REGPFT->pfn[DPM_REGCREATEKEYW]))(a,b,c)
  156. #define DPM_RegDeleteKeyW(a,b) \
  157. ((typdpmRegDeleteKeyW)(REGPFT->pfn[DPM_REGDELETEKEYW]))(a,b)
  158. #define DPM_RegEnumKeyW(a,b,c,d) \
  159. ((typdpmRegEnumKeyW)(REGPFT->pfn[DPM_REGENUMKEYW]))(a,b,c,d)
  160. #define DPM_RegOpenKeyW(a,b,c) \
  161. ((typdpmRegOpenKeyW)(REGPFT->pfn[DPM_REGOPENKEYW]))(a,b,c)
  162. #define DPM_RegQueryValueW(a,b,c,d) \
  163. ((typdpmRegQueryValueW)(REGPFT->pfn[DPM_REGQUERYVALUEW]))(a,b,c,d)
  164. #define DPM_RegSetValueW(a,b,c,d,e) \
  165. ((typdpmRegSetValueW)(REGPFT->pfn[DPM_REGSETVALUEW]))(a,b,c,d,e)
  166. #define DPM_RegDeleteValueW(a,b) \
  167. ((typdpmRegDeleteValueW)(REGPFT->pfn[DPM_REGDELETEVALUEW]))(a,b)
  168. #define DPM_RegEnumValueW(a,b,c,d,e,f,g,h) \
  169. ((typdpmRegEnumValueW)(REGPFT->pfn[DPM_REGENUMVALUEW]))(a,b,c,d,e,f,g,h)
  170. #define DPM_RegLoadKeyW(a,b,c) \
  171. ((typdpmRegLoadKeyW)(REGPFT->pfn[DPM_REGLOADKEYW]))(a,b,c)
  172. #define DPM_RegQueryValueExW(a,b,c,d,e,f) \
  173. ((typdpmRegQueryValueExW)(REGPFT->pfn[DPM_REGQUERYVALUEEXW]))(a,b,c,d,e,f)
  174. #define DPM_RegSaveKeyW(a,b,c) \
  175. ((typdpmRegSaveKeyW)(REGPFT->pfn[DPM_REGSAVEKEYW]))(a,b,c)
  176. #define DPM_RegSetValueExW(a,b,c,d,e,f) \
  177. ((typdpmRegSetValueExW)(REGPFT->pfn[DPM_REGSETVALUEEXW]))(a,b,c,d,e,f)
  178. #define DPM_RegUnLoadKeyW(a,b) \
  179. ((typdpmRegUnLoadKeyW)(REGPFT->pfn[DPM_REGUNLOADKEYW]))(a,b)
  180. #define DPM_RegConnectRegistryW(a,b,c) \
  181. ((typdpmRegConnectRegistryW)(REGPFT->pfn[DPM_REGCONNECTREGISTRYW]))(a,b,c)
  182. #define DPM_RegCreateKeyExW(a,b,c,d,e,f,g,h,i) \
  183. ((typdpmRegCreateKeyExW)(REGPFT->pfn[DPM_REGCREATEKEYEXW]))(a,b,c,d,e,f,g,h,i)
  184. #define DPM_RegEnumKeyExW(a,b,c,d,e,f,g,h) \
  185. ((typdpmRegEnumKeyExW)(REGPFT->pfn[DPM_REGENUMKEYEXW]))(a,b,c,d,e,f,g,h)
  186. #define DPM_RegOpenKeyExW(a,b,c,d,e) \
  187. ((typdpmRegOpenKeyExW)(REGPFT->pfn[DPM_REGOPENKEYEXW]))(a,b,c,d,e)
  188. #define DPM_RegQueryInfoKeyW(a,b,c,d,e,f,g,h,i,j,k,l) \
  189. ((typdpmRegQueryInfoKeyW)(REGPFT->pfn[DPM_REGQUERYINFOKEYW]))(a,b,c,d,e,f,g,h,i,j,k,l)
  190. #define DPM_RegQueryMultipleValuesW(a,b,c,d,e) \
  191. ((typdpmRegQueryMultipleValuesW)(REGPFT->pfn[DPM_REGQUERYMULTIPLEVALUESW]))(a,b,c,d,e)
  192. #define DPM_RegReplaceKeyW(a,b,c,d) \
  193. ((typdpmRegReplaceKeyW)(REGPFT->pfn[DPM_REGREPLACEKEYW]))(a,b,c,d)
  194. // Macros to dispatch Shimed API calls properly from the dpmfxxx.dll
  195. #define SHM_RegCloseKey(a) \
  196. (REG_SHIM(DPM_REGCLOSEKEY, \
  197. typdpmRegCloseKey))(a)
  198. #define SHM_RegCreateKey(a,b,c) \
  199. (REG_SHIM(DPM_REGCREATEKEY, \
  200. typdpmRegCreateKey))(a,b,c)
  201. #define SHM_RegDeleteKey(a,b) \
  202. (REG_SHIM(DPM_REGDELETEKEY, \
  203. typdpmRegDeleteKey))(a,b)
  204. #define SHM_RegEnumKey(a,b,c,d) \
  205. (REG_SHIM(DPM_REGENUMKEY, \
  206. typdpmRegEnumKey))(a,b,c,d)
  207. #define SHM_RegOpenKey(a,b,c) \
  208. (REG_SHIM(DPM_REGOPENKEY, \
  209. typdpmRegOpenKey))(a,b,c)
  210. #define SHM_RegQueryValue(a,b,c,d) \
  211. (REG_SHIM(DPM_REGQUERYVALUE, \
  212. typdpmRegQueryValue))(a,b,c,d)
  213. #define SHM_RegSetValue(a,b,c,d,e) \
  214. (REG_SHIM(DPM_REGSETVALUE, \
  215. typdpmRegSetValue))(a,b,c,d,e)
  216. #define SHM_RegDeleteValue(a,b) \
  217. (REG_SHIM(DPM_REGDELETEVALUE, \
  218. typdpmRegDeleteValue))(a,b)
  219. #define SHM_RegEnumValue(a,b,c,d,e,f,g,h) \
  220. (REG_SHIM(DPM_REGENUMVALUE, \
  221. typdpmRegEnumValue))(a,b,c,d,e,f,g,h)
  222. #define SHM_RegFlushKey(a) \
  223. (REG_SHIM(DPM_REGFLUSHKEY, \
  224. typdpmRegFlushKey))(a)
  225. #define SHM_RegLoadKey(a,b,c) \
  226. (REG_SHIM(DPM_REGLOADKEY, \
  227. typdpmRegLoadKey))(a,b,c)
  228. #define SHM_RegQueryValueEx(a,b,c,d,e,f) \
  229. (REG_SHIM(DPM_REGQUERYVALUEEX, \
  230. typdpmRegQueryValueEx))(a,b,c,d,e,f)
  231. #define SHM_RegSaveKey(a,b,c) \
  232. (REG_SHIM(DPM_REGSAVEKEY, \
  233. typdpmRegSaveKey))(a,b,c)
  234. #define SHM_RegSetValueEx(a,b,c,d,e,f) \
  235. (REG_SHIM(DPM_REGSETVALUEEX, \
  236. typdpmRegSetValueEx))(a,b,c,d,e,f)
  237. #define SHM_RegUnLoadKey(a,b) \
  238. (REG_SHIM(DPM_REGUNLOADKEY, \
  239. typdpmRegUnLoadKey))(a,b)
  240. #define SHM_RegConnectRegistry(a,b,c) \
  241. (REG_SHIM(DPM_REGCONNECTREGISTRY, \
  242. typdpmRegConnectRegistry))(a,b,c)
  243. #define SHM_RegCreateKeyEx(a,b,c,d,e,f,g,h,i) \
  244. (REG_SHIM(DPM_REGCREATEKEYEX, \
  245. typdpmRegCreateKeyEx))(a,b,c,d,e,f,g,h,i)
  246. #define SHM_RegEnumKeyEx(a,b,c,d,e,f,g,h) \
  247. (REG_SHIM(DPM_REGENUMKEYEX, \
  248. typdpmRegEnumKeyEx))(a,b,c,d,e,f,g,h)
  249. #define SHM_RegNotifyChangeKeyValue(a,b,c,d,e) \
  250. (REG_SHIM(DPM_REGNOTIFYCHANGEKEYVALUE, \
  251. typdpmRegNotifyChangeKeyValue))(a,b,c,d,e)
  252. #define SHM_RegOpenKeyEx(a,b,c,d,e) \
  253. (REG_SHIM(DPM_REGOPENKEYEX, \
  254. typdpmRegOpenKeyEx))(a,b,c,d,e)
  255. #define SHM_RegQueryInfoKey(a,b,c,d,e,f,g,h,i,j,k,l) \
  256. (REG_SHIM(DPM_REGQUERYINFOKEY, \
  257. typdpmRegQueryInfoKey))(a,b,c,d,e,f,g,h,i,j,k,l)
  258. #define SHM_RegQueryMultipleValues(a,b,c,d,e) \
  259. (REG_SHIM(DPM_REGQUERYMULTIPLEVALUES, \
  260. typdpmRegQueryMultipleValues))(a,b,c,d,e)
  261. #define SHM_RegReplaceKey(a,b,c,d) \
  262. (REG_SHIM(DPM_REGREPLACEKEY, \
  263. typdpmRegReplaceKey))(a,b,c,d)
  264. #define SHM_RegCreateKeyW(a,b,c) \
  265. (REG_SHIM(DPM_REGCREATEKEYW, \
  266. typdpmRegCreateKeyW))(a,b,c)
  267. #define SHM_RegDeleteKeyW(a,b) \
  268. (REG_SHIM(DPM_REGDELETEKEYW, \
  269. typdpmRegDeleteKeyW))(a,b)
  270. #define SHM_RegEnumKeyW(a,b,c,d) \
  271. (REG_SHIM(DPM_REGENUMKEYW, \
  272. typdpmRegEnumKeyW))(a,b,c,d)
  273. #define SHM_RegOpenKeyW(a,b,c) \
  274. (REG_SHIM(DPM_REGOPENKEYW, \
  275. typdpmRegOpenKeyW))(a,b,c)
  276. #define SHM_RegQueryValueW(a,b,c,d) \
  277. (REG_SHIM(DPM_REGQUERYVALUEW, \
  278. typdpmRegQueryValueW))(a,b,c,d)
  279. #define SHM_RegSetValueW(a,b,c,d,e) \
  280. (REG_SHIM(DPM_REGSETVALUEW, \
  281. typdpmRegSetValueW))(a,b,c,d,e)
  282. #define SHM_RegDeleteValueW(a,b) \
  283. (REG_SHIM(DPM_REGDELETEVALUEW, \
  284. typdpmRegDeleteValueW))(a,b)
  285. #define SHM_RegEnumValueW(a,b,c,d,e,f,g,h) \
  286. (REG_SHIM(DPM_REGENUMVALUEW, \
  287. typdpmRegEnumValueW))(a,b,c,d,e,f,g,h)
  288. #define SHM_RegLoadKeyW(a,b,c) \
  289. (REG_SHIM(DPM_REGLOADKEYW, \
  290. typdpmRegLoadKeyW))(a,b,c)
  291. #define SHM_RegQueryValueExW(a,b,c,d,e,f) \
  292. (REG_SHIM(DPM_REGQUERYVALUEEXW, \
  293. typdpmRegQueryValueExW))(a,b,c,d,e,f)
  294. #define SHM_RegSaveKeyW(a,b,c) \
  295. (REG_SHIM(DPM_REGSAVEKEYW, \
  296. typdpmRegSaveKeyW))(a,b,c)
  297. #define SHM_RegSetValueExW(a,b,c,d,e,f) \
  298. (REG_SHIM(DPM_REGSETVALUEEXW, \
  299. typdpmRegSetValueExW))(a,b,c,d,e,f)
  300. #define SHM_RegUnLoadKeyW(a,b) \
  301. (REG_SHIM(DPM_REGUNLOADKEYW, \
  302. typdpmRegUnLoadKeyW))(a,b)
  303. #define SHM_RegConnectRegistryW(a,b,c) \
  304. (REG_SHIM(DPM_REGCONNECTREGISTRYW, \
  305. typdpmRegConnectRegistryW))(a,b,c)
  306. #define SHM_RegCreateKeyExW(a,b,c,d,e,f,g,h,i) \
  307. (REG_SHIM(DPM_REGCREATEKEYEXW, \
  308. typdpmRegCreateKeyExW))(a,b,c,d,e,f,g,h,i)
  309. #define SHM_RegEnumKeyExW(a,b,c,d,e,f,g,h) \
  310. (REG_SHIM(DPM_REGENUMKEYEXW, \
  311. typdpmRegEnumKeyExW))(a,b,c,d,e,f,g,h)
  312. #define SHM_RegOpenKeyExW(a,b,c,d,e) \
  313. (REG_SHIM(DPM_REGOPENKEYEXW, \
  314. typdpmRegOpenKeyExW))(a,b,c,d,e)
  315. #define SHM_RegQueryInfoKeyW(a,b,c,d,e,f,g,h,i,j,k,l) \
  316. (REG_SHIM(DPM_REGQUERYINFOKEYW, \
  317. typdpmRegQueryInfoKeyW))(a,b,c,d,e,f,g,h,i,j,k,l)
  318. #define SHM_RegQueryMultipleValuesW(a,b,c,d,e) \
  319. (REG_SHIM(DPM_REGQUERYMULTIPLEVALUESW, \
  320. typdpmRegQueryMultipleValuesW))(a,b,c,d,e)
  321. #define SHM_RegReplaceKeyW(a,b,c,d) \
  322. (REG_SHIM(DPM_REGREPLACEKEYW, \
  323. typdpmRegReplaceKeyW))(a,b,c,d)
  324. #endif // _DPMF_REGAPI_H_
  325. // These need to be in the same order as the RegFam enum definitions above and
  326. // the DpmRegTbl[] list below.
  327. // This instantiates memory for DpmRegStrs[] in mvdm\wow32\wdpm.c
  328. #ifdef _WDPM_C_
  329. const char *DpmRegStrs[] = {"RegCloseKey",
  330. "RegCreateKeyA",
  331. "RegDeleteKeyA",
  332. "RegEnumKeyA",
  333. "RegOpenKeyA",
  334. "RegQueryValueA",
  335. "RegSetValueA",
  336. "RegDeleteValueA",
  337. "RegEnumValueA",
  338. "RegFlushKey",
  339. "RegLoadKeyA",
  340. "RegQueryValueExA",
  341. "RegSaveKeyA",
  342. "RegSetValueExA",
  343. "RegUnLoadKeyA",
  344. "RegConnectRegistryA",
  345. "RegCreateKeyExA",
  346. "RegEnumKeyExA",
  347. "RegNotifyChangeKeyValue",
  348. "RegOpenKeyExA",
  349. "RegQueryInfoKeyA",
  350. "RegQueryMultipleValuesA",
  351. "RegReplaceKeyA",
  352. "RegCreateKeyW",
  353. "RegDeleteKeyW",
  354. "RegEnumKeyW",
  355. "RegOpenKeyW",
  356. "RegQueryValueW",
  357. "RegSetValueW",
  358. "RegDeleteValueW",
  359. "RegEnumValueW",
  360. "RegLoadKeyW",
  361. "RegQueryValueExW",
  362. "RegSaveKeyW",
  363. "RegSetValueExW",
  364. "RegUnLoadKeyW",
  365. "RegConnectRegistryW",
  366. "RegCreateKeyExW",
  367. "RegEnumKeyExW",
  368. "RegOpenKeyExW",
  369. "RegQueryInfoKeyW",
  370. "RegQueryMultipleValuesW",
  371. "RegReplaceKeyW"};
  372. // These need to be in the same order as the RegFam enum definitions and the
  373. // the DpmRegStrs[] list above.
  374. // This instantiates memory for DpmRegTbl[] in mvdm\wow32\wdpm.c
  375. PVOID DpmRegTbl[] = {RegCloseKey,
  376. RegCreateKeyA,
  377. RegDeleteKeyA,
  378. RegEnumKeyA,
  379. RegOpenKeyA,
  380. RegQueryValueA,
  381. RegSetValueA,
  382. RegDeleteValueA,
  383. RegEnumValueA,
  384. RegFlushKey,
  385. RegLoadKeyA,
  386. RegQueryValueExA,
  387. RegSaveKeyA,
  388. RegSetValueExA,
  389. RegUnLoadKeyA,
  390. RegConnectRegistryA,
  391. RegCreateKeyExA,
  392. RegEnumKeyExA,
  393. RegNotifyChangeKeyValue,
  394. RegOpenKeyExA,
  395. RegQueryInfoKeyA,
  396. RegQueryMultipleValuesA,
  397. RegReplaceKeyA,
  398. RegCreateKeyW,
  399. RegDeleteKeyW,
  400. RegEnumKeyW,
  401. RegOpenKeyW,
  402. RegQueryValueW,
  403. RegSetValueW,
  404. RegDeleteValueW,
  405. RegEnumValueW,
  406. RegLoadKeyW,
  407. RegQueryValueExW,
  408. RegSaveKeyW,
  409. RegSetValueExW,
  410. RegUnLoadKeyW,
  411. RegConnectRegistryW,
  412. RegCreateKeyExW,
  413. RegEnumKeyExW,
  414. RegOpenKeyExW,
  415. RegQueryInfoKeyW,
  416. RegQueryMultipleValuesW,
  417. RegReplaceKeyW};
  418. #define NUM_HOOKED_REG_APIS ((sizeof DpmRegTbl)/(sizeof DpmRegTbl[0]))
  419. // This instantiates memory for DpmRegFam in mvdm\wow32\wdpm.c
  420. FAMILY_TABLE DpmRegFam = {NUM_HOOKED_REG_APIS, 0, 0, 0, 0, DpmRegTbl};
  421. #endif // _WDPM_C_