Source code of Windows XP (NT5)
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.

1817 lines
45 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. ObsoleteAPICalls.cpp
  5. Abstract:
  6. This AppVerifier shim hooks the API calls that are considered
  7. obsolete by the Platform SDK team and logs an entry.
  8. Notes:
  9. This is a general purpose shim.
  10. API calls are listed in alphabetical order to allow
  11. them to be quickly located in the shim and to allow
  12. new ones to be added in the proper location.
  13. History:
  14. 09/30/2001 rparsons Created
  15. 10/10/2001 rparsons Removed SetHandleCount
  16. --*/
  17. #include "precomp.h"
  18. IMPLEMENT_SHIM_BEGIN(ObsoleteAPICalls)
  19. #include "ShimHookMacro.h"
  20. BEGIN_DEFINE_VERIFIER_LOG(ObsoleteAPICalls)
  21. VERIFIER_LOG_ENTRY(VLOG_OBSOLETECALLS_API)
  22. END_DEFINE_VERIFIER_LOG(ObsoleteAPICalls)
  23. INIT_VERIFIER_LOG(ObsoleteAPICalls);
  24. APIHOOK_ENUM_BEGIN
  25. APIHOOK_ENUM_ENTRY(_hread)
  26. APIHOOK_ENUM_ENTRY(_hwrite)
  27. APIHOOK_ENUM_ENTRY(_lclose)
  28. APIHOOK_ENUM_ENTRY(_lcreat)
  29. APIHOOK_ENUM_ENTRY(_llseek)
  30. APIHOOK_ENUM_ENTRY(_lopen)
  31. APIHOOK_ENUM_ENTRY(_lread)
  32. APIHOOK_ENUM_ENTRY(_lwrite)
  33. APIHOOK_ENUM_ENTRY(AnyPopup)
  34. APIHOOK_ENUM_ENTRY(CloseMetaFile)
  35. APIHOOK_ENUM_ENTRY(CopyLZFile)
  36. APIHOOK_ENUM_ENTRY(CopyMetaFileA)
  37. APIHOOK_ENUM_ENTRY(CopyMetaFileW)
  38. APIHOOK_ENUM_ENTRY(CreateDIBPatternBrush)
  39. APIHOOK_ENUM_ENTRY(CreateDiscardableBitmap)
  40. APIHOOK_ENUM_ENTRY(CreateMetaFileA)
  41. APIHOOK_ENUM_ENTRY(CreateMetaFileW)
  42. APIHOOK_ENUM_ENTRY(DeleteMetaFile)
  43. APIHOOK_ENUM_ENTRY(EnumFontFamiliesA)
  44. APIHOOK_ENUM_ENTRY(EnumFontFamiliesW)
  45. APIHOOK_ENUM_ENTRY(EnumFontFamProc)
  46. APIHOOK_ENUM_ENTRY(EnumFontsA)
  47. APIHOOK_ENUM_ENTRY(EnumFontsW)
  48. APIHOOK_ENUM_ENTRY(EnumFontsProc)
  49. APIHOOK_ENUM_ENTRY(EnumMetaFile)
  50. APIHOOK_ENUM_ENTRY(EnumMetaFileProc)
  51. APIHOOK_ENUM_ENTRY(FixBrushOrgEx)
  52. APIHOOK_ENUM_ENTRY(FloodFill)
  53. APIHOOK_ENUM_ENTRY(FreeResource)
  54. APIHOOK_ENUM_ENTRY(GetBitmapBits)
  55. APIHOOK_ENUM_ENTRY(GetCharWidthA)
  56. APIHOOK_ENUM_ENTRY(GetCharWidthW)
  57. APIHOOK_ENUM_ENTRY(GetClassWord)
  58. APIHOOK_ENUM_ENTRY(GetKBCodePage)
  59. APIHOOK_ENUM_ENTRY(GetMetaFileA)
  60. APIHOOK_ENUM_ENTRY(GetMetaFileW)
  61. APIHOOK_ENUM_ENTRY(GetMetaFileBitsEx)
  62. APIHOOK_ENUM_ENTRY(GetPrivateProfileIntA)
  63. APIHOOK_ENUM_ENTRY(GetPrivateProfileIntW)
  64. APIHOOK_ENUM_ENTRY(GetPrivateProfileSectionA)
  65. APIHOOK_ENUM_ENTRY(GetPrivateProfileSectionW)
  66. APIHOOK_ENUM_ENTRY(GetPrivateProfileSectionNamesA)
  67. APIHOOK_ENUM_ENTRY(GetPrivateProfileSectionNamesW)
  68. APIHOOK_ENUM_ENTRY(GetPrivateProfileStringA)
  69. APIHOOK_ENUM_ENTRY(GetPrivateProfileStringW)
  70. APIHOOK_ENUM_ENTRY(GetPrivateProfileStructA)
  71. APIHOOK_ENUM_ENTRY(GetPrivateProfileStructW)
  72. APIHOOK_ENUM_ENTRY(GetProfileIntA)
  73. APIHOOK_ENUM_ENTRY(GetProfileIntW)
  74. APIHOOK_ENUM_ENTRY(GetProfileSectionA)
  75. APIHOOK_ENUM_ENTRY(GetProfileSectionW)
  76. APIHOOK_ENUM_ENTRY(GetProfileStringA)
  77. APIHOOK_ENUM_ENTRY(GetProfileStringW)
  78. APIHOOK_ENUM_ENTRY(GetSysModalWindow)
  79. APIHOOK_ENUM_ENTRY(GetTextExtentPointA)
  80. APIHOOK_ENUM_ENTRY(GetTextExtentPointW)
  81. APIHOOK_ENUM_ENTRY(GetWindowWord)
  82. APIHOOK_ENUM_ENTRY(GlobalAlloc)
  83. APIHOOK_ENUM_ENTRY(GlobalCompact)
  84. APIHOOK_ENUM_ENTRY(GlobalFix)
  85. APIHOOK_ENUM_ENTRY(GlobalFlags)
  86. APIHOOK_ENUM_ENTRY(GlobalFree)
  87. APIHOOK_ENUM_ENTRY(GlobalHandle)
  88. APIHOOK_ENUM_ENTRY(GlobalLock)
  89. APIHOOK_ENUM_ENTRY(GlobalReAlloc)
  90. APIHOOK_ENUM_ENTRY(GlobalSize)
  91. APIHOOK_ENUM_ENTRY(GlobalUnfix)
  92. APIHOOK_ENUM_ENTRY(GlobalUnlock)
  93. APIHOOK_ENUM_ENTRY(GlobalUnWire)
  94. APIHOOK_ENUM_ENTRY(GlobalWire)
  95. APIHOOK_ENUM_ENTRY(IsBadHugeReadPtr)
  96. APIHOOK_ENUM_ENTRY(IsBadHugeWritePtr)
  97. APIHOOK_ENUM_ENTRY(LoadModule)
  98. APIHOOK_ENUM_ENTRY(LocalAlloc)
  99. APIHOOK_ENUM_ENTRY(LocalCompact)
  100. APIHOOK_ENUM_ENTRY(LocalDiscard)
  101. APIHOOK_ENUM_ENTRY(LocalFlags)
  102. APIHOOK_ENUM_ENTRY(LocalFree)
  103. APIHOOK_ENUM_ENTRY(LocalHandle)
  104. APIHOOK_ENUM_ENTRY(LocalLock)
  105. APIHOOK_ENUM_ENTRY(LocalReAlloc)
  106. APIHOOK_ENUM_ENTRY(LocalShrink)
  107. APIHOOK_ENUM_ENTRY(LocalSize)
  108. APIHOOK_ENUM_ENTRY(LocalUnlock)
  109. APIHOOK_ENUM_ENTRY(LZDone)
  110. APIHOOK_ENUM_ENTRY(LZStart)
  111. APIHOOK_ENUM_ENTRY(OpenFile)
  112. APIHOOK_ENUM_ENTRY(PlayMetaFile)
  113. APIHOOK_ENUM_ENTRY(PlayMetaFileRecord)
  114. APIHOOK_ENUM_ENTRY(PrinterMessageBoxA)
  115. APIHOOK_ENUM_ENTRY(PrinterMessageBoxW)
  116. APIHOOK_ENUM_ENTRY(RegCreateKeyA)
  117. APIHOOK_ENUM_ENTRY(RegCreateKeyW)
  118. APIHOOK_ENUM_ENTRY(RegEnumKeyA)
  119. APIHOOK_ENUM_ENTRY(RegEnumKeyW)
  120. APIHOOK_ENUM_ENTRY(RegOpenKeyA)
  121. APIHOOK_ENUM_ENTRY(RegOpenKeyW)
  122. APIHOOK_ENUM_ENTRY(RegQueryValueA)
  123. APIHOOK_ENUM_ENTRY(RegQueryValueW)
  124. APIHOOK_ENUM_ENTRY(RegSetValueA)
  125. APIHOOK_ENUM_ENTRY(RegSetValueW)
  126. APIHOOK_ENUM_ENTRY(SetBitmapBits)
  127. APIHOOK_ENUM_ENTRY(SetClassWord)
  128. APIHOOK_ENUM_ENTRY(SetDebugErrorLevel)
  129. APIHOOK_ENUM_ENTRY(SetMessageQueue)
  130. APIHOOK_ENUM_ENTRY(SetMetaFileBitsEx)
  131. APIHOOK_ENUM_ENTRY(SetSysModalWindow)
  132. APIHOOK_ENUM_ENTRY(SetWindowsHookA)
  133. APIHOOK_ENUM_ENTRY(SetWindowsHookW)
  134. APIHOOK_ENUM_ENTRY(SetWindowWord)
  135. APIHOOK_ENUM_ENTRY(UnhookWindowsHook)
  136. APIHOOK_ENUM_ENTRY(WaitForPrinterChange)
  137. APIHOOK_ENUM_ENTRY(WinExec)
  138. APIHOOK_ENUM_ENTRY(WNetAddConnectionA)
  139. APIHOOK_ENUM_ENTRY(WNetAddConnectionW)
  140. APIHOOK_ENUM_ENTRY(WritePrivateProfileSectionA)
  141. APIHOOK_ENUM_ENTRY(WritePrivateProfileSectionW)
  142. APIHOOK_ENUM_ENTRY(WritePrivateProfileStringA)
  143. APIHOOK_ENUM_ENTRY(WritePrivateProfileStringW)
  144. APIHOOK_ENUM_ENTRY(WritePrivateProfileStructA)
  145. APIHOOK_ENUM_ENTRY(WritePrivateProfileStructW)
  146. APIHOOK_ENUM_ENTRY(WriteProfileSectionA)
  147. APIHOOK_ENUM_ENTRY(WriteProfileSectionW)
  148. APIHOOK_ENUM_ENTRY(WriteProfileStringA)
  149. APIHOOK_ENUM_ENTRY(WriteProfileStringW)
  150. APIHOOK_ENUM_END
  151. LONG
  152. APIHOOK(_hread)(
  153. HFILE hFile,
  154. LPVOID lpBuffer,
  155. LONG lBytes
  156. )
  157. {
  158. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _hread");
  159. return ORIGINAL_API(_hread)(hFile, lpBuffer, lBytes);
  160. }
  161. LONG
  162. APIHOOK(_hwrite)(
  163. HFILE hFile,
  164. LPCSTR lpBuffer,
  165. LONG lBytes
  166. )
  167. {
  168. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _hwrite");
  169. return ORIGINAL_API(_hwrite)(hFile, lpBuffer, lBytes);
  170. }
  171. HFILE
  172. APIHOOK(_lclose)(
  173. HFILE hFile
  174. )
  175. {
  176. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _lclose");
  177. return ORIGINAL_API(_lclose)(hFile);
  178. }
  179. HFILE
  180. APIHOOK(_lcreat)(
  181. LPCSTR lpPathName,
  182. int iAttribute
  183. )
  184. {
  185. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _lcreat");
  186. return ORIGINAL_API(_lcreat)(lpPathName, iAttribute);
  187. }
  188. LONG
  189. APIHOOK(_llseek)(
  190. HFILE hFile,
  191. LONG lOffset,
  192. int iOrigin
  193. )
  194. {
  195. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _llseek");
  196. return ORIGINAL_API(_llseek)(hFile, lOffset, iOrigin);
  197. }
  198. HFILE
  199. APIHOOK(_lopen)(
  200. LPCSTR lpPathName,
  201. int iReadWrite
  202. )
  203. {
  204. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _lopen");
  205. return ORIGINAL_API(_lopen)(lpPathName, iReadWrite);
  206. }
  207. UINT
  208. APIHOOK(_lread)(
  209. HFILE hFile,
  210. LPVOID lpBuffer,
  211. UINT uBytes
  212. )
  213. {
  214. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _lread");
  215. return ORIGINAL_API(_lread)(hFile, lpBuffer, uBytes);
  216. }
  217. UINT
  218. APIHOOK(_lwrite)(
  219. HFILE hFile,
  220. LPCSTR lpBuffer,
  221. UINT uBytes
  222. )
  223. {
  224. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: _lwrite");
  225. return ORIGINAL_API(_lwrite)(hFile, lpBuffer, uBytes);
  226. }
  227. BOOL
  228. APIHOOK(AnyPopup)(
  229. void
  230. )
  231. {
  232. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: AnyPopup");
  233. return ORIGINAL_API(AnyPopup)();
  234. }
  235. HMETAFILE
  236. APIHOOK(CloseMetaFile)(
  237. HDC hdc
  238. )
  239. {
  240. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CloseMetaFile");
  241. return ORIGINAL_API(CloseMetaFile)(hdc);
  242. }
  243. LONG
  244. APIHOOK(CopyLZFile)(
  245. int nUnknown1,
  246. int nUnknown2
  247. )
  248. {
  249. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CopyLZFile");
  250. return ORIGINAL_API(CopyLZFile)(nUnknown1, nUnknown2);
  251. }
  252. HMETAFILE
  253. APIHOOK(CopyMetaFileA)(
  254. HMETAFILE hmfSrc,
  255. LPCSTR lpszFile
  256. )
  257. {
  258. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CopyMetaFileA");
  259. return ORIGINAL_API(CopyMetaFileA)(hmfSrc, lpszFile);
  260. }
  261. HMETAFILE
  262. APIHOOK(CopyMetaFileW)(
  263. HMETAFILE hmfSrc,
  264. LPCWSTR lpszFile
  265. )
  266. {
  267. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CopyMetaFileW");
  268. return ORIGINAL_API(CopyMetaFileW)(hmfSrc, lpszFile);
  269. }
  270. HBRUSH
  271. APIHOOK(CreateDIBPatternBrush)(
  272. HGLOBAL hglbDIBPacked,
  273. UINT fuColorSpec
  274. )
  275. {
  276. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CreateDIBPatternBrush");
  277. return ORIGINAL_API(CreateDIBPatternBrush)(hglbDIBPacked, fuColorSpec);
  278. }
  279. HBITMAP
  280. APIHOOK(CreateDiscardableBitmap)(
  281. HDC hdc,
  282. int nWidth,
  283. int nHeight
  284. )
  285. {
  286. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CreateDiscardableBitmap");
  287. return ORIGINAL_API(CreateDiscardableBitmap)(hdc, nWidth, nHeight);
  288. }
  289. HDC
  290. APIHOOK(CreateMetaFileA)(
  291. LPCSTR lpszFile
  292. )
  293. {
  294. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CreateMetaFileA");
  295. return ORIGINAL_API(CreateMetaFileA)(lpszFile);
  296. }
  297. HDC
  298. APIHOOK(CreateMetaFileW)(
  299. LPCWSTR lpszFile
  300. )
  301. {
  302. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: CreateMetaFileW");
  303. return ORIGINAL_API(CreateMetaFileW)(lpszFile);
  304. }
  305. BOOL
  306. APIHOOK(DeleteMetaFile)(
  307. HMETAFILE hmf
  308. )
  309. {
  310. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: DeleteMetaFile");
  311. return ORIGINAL_API(DeleteMetaFile)(hmf);
  312. }
  313. int
  314. APIHOOK(EnumFontFamiliesA)(
  315. HDC hdc,
  316. LPCSTR lpszFamily,
  317. FONTENUMPROC lpEnumFontFamProc,
  318. LPARAM lParam
  319. )
  320. {
  321. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontFamiliesA");
  322. return ORIGINAL_API(EnumFontFamiliesA)(hdc, lpszFamily, lpEnumFontFamProc, lParam);
  323. }
  324. int
  325. APIHOOK(EnumFontFamiliesW)(
  326. HDC hdc,
  327. LPCWSTR lpszFamily,
  328. FONTENUMPROC lpEnumFontFamProc,
  329. LPARAM lParam
  330. )
  331. {
  332. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontFamiliesW");
  333. return ORIGINAL_API(EnumFontFamiliesW)(hdc, lpszFamily, lpEnumFontFamProc, lParam);
  334. }
  335. int
  336. APIHOOK(EnumFontFamProc)(
  337. ENUMLOGFONT *lpelf,
  338. NEWTEXTMETRIC *lpntm,
  339. DWORD FontType,
  340. LPARAM lParam
  341. )
  342. {
  343. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontFamProc");
  344. return ORIGINAL_API(EnumFontFamProc)(lpelf, lpntm, FontType, lParam);
  345. }
  346. int
  347. APIHOOK(EnumFontsA)(
  348. HDC hdc,
  349. LPCSTR lpFaceName,
  350. FONTENUMPROC lpFontFunc,
  351. LPARAM lParam
  352. )
  353. {
  354. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontsA");
  355. return ORIGINAL_API(EnumFontsA)(hdc, lpFaceName, lpFontFunc, lParam);
  356. }
  357. int
  358. APIHOOK(EnumFontsW)(
  359. HDC hdc,
  360. LPCWSTR lpFaceName,
  361. FONTENUMPROC lpFontFunc,
  362. LPARAM lParam
  363. )
  364. {
  365. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontsW");
  366. return ORIGINAL_API(EnumFontsW)(hdc, lpFaceName, lpFontFunc, lParam);
  367. }
  368. int
  369. APIHOOK(EnumFontsProc)(
  370. CONST LOGFONT *lplf,
  371. CONST TEXTMETRIC *lptm,
  372. DWORD dwType,
  373. LPARAM lpData
  374. )
  375. {
  376. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumFontsProc");
  377. return ORIGINAL_API(EnumFontsProc)(lplf, lptm, dwType, lpData);
  378. }
  379. BOOL
  380. APIHOOK(EnumMetaFile)(
  381. HDC hdc,
  382. HMETAFILE hmf,
  383. MFENUMPROC lpMetaFunc,
  384. LPARAM lParam
  385. )
  386. {
  387. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumMetaFile");
  388. return ORIGINAL_API(EnumMetaFile)(hdc, hmf, lpMetaFunc, lParam);
  389. }
  390. int
  391. APIHOOK(EnumMetaFileProc)(
  392. HDC hDC,
  393. HANDLETABLE *lpHTable,
  394. METARECORD *lpMFR,
  395. int nObj,
  396. LPARAM lpClientData
  397. )
  398. {
  399. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: EnumMetaFileProc");
  400. return ORIGINAL_API(EnumMetaFileProc)(hDC, lpHTable, lpMFR, nObj, lpClientData);
  401. }
  402. BOOL
  403. APIHOOK(FixBrushOrgEx)(
  404. HDC hdc,
  405. int nUnknown1,
  406. int nUnknown2,
  407. LPPOINT lpPoint
  408. )
  409. {
  410. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: FixBrushOrgEx");
  411. return ORIGINAL_API(FixBrushOrgEx)(hdc, nUnknown1, nUnknown2, lpPoint);
  412. }
  413. BOOL
  414. APIHOOK(FloodFill)(
  415. HDC hdc,
  416. int nXStart,
  417. int nYStart,
  418. COLORREF crFill
  419. )
  420. {
  421. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: FloodFill");
  422. return ORIGINAL_API(FloodFill)(hdc, nXStart, nYStart, crFill);
  423. }
  424. BOOL
  425. APIHOOK(FreeResource)(
  426. HGLOBAL hMem
  427. )
  428. {
  429. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: FreeResource");
  430. return ORIGINAL_API(FreeResource)(hMem);
  431. }
  432. LONG
  433. APIHOOK(GetBitmapBits)(
  434. HBITMAP hbmp,
  435. LONG cbBuffer,
  436. LPVOID lpvBits
  437. )
  438. {
  439. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetBitmapBits");
  440. return ORIGINAL_API(GetBitmapBits)(hbmp, cbBuffer, lpvBits);
  441. }
  442. BOOL
  443. APIHOOK(GetCharWidthA)(
  444. HDC hdc,
  445. UINT iFirstChar,
  446. UINT iLastChar,
  447. LPINT lpBuffer
  448. )
  449. {
  450. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetCharWidthA");
  451. return ORIGINAL_API(GetCharWidthA)(hdc, iFirstChar, iLastChar, lpBuffer);
  452. }
  453. BOOL
  454. APIHOOK(GetCharWidthW)(
  455. HDC hdc,
  456. UINT iFirstChar,
  457. UINT iLastChar,
  458. LPINT lpBuffer
  459. )
  460. {
  461. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetCharWidthW");
  462. return ORIGINAL_API(GetCharWidthW)(hdc, iFirstChar, iLastChar, lpBuffer);
  463. }
  464. WORD
  465. APIHOOK(GetClassWord)(
  466. HWND hWnd,
  467. int nIndex
  468. )
  469. {
  470. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetClassWord");
  471. return ORIGINAL_API(GetClassWord)(hWnd, nIndex);
  472. }
  473. UINT
  474. APIHOOK(GetKBCodePage)(
  475. void
  476. )
  477. {
  478. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetKBCodePage");
  479. return ORIGINAL_API(GetKBCodePage)();
  480. }
  481. HMETAFILE
  482. APIHOOK(GetMetaFileA)(
  483. LPCSTR lpszString
  484. )
  485. {
  486. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetMetaFileA");
  487. return ORIGINAL_API(GetMetaFileA)(lpszString);
  488. }
  489. HMETAFILE
  490. APIHOOK(GetMetaFileW)(
  491. LPCWSTR lpszString
  492. )
  493. {
  494. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetMetaFileW");
  495. return ORIGINAL_API(GetMetaFileW)(lpszString);
  496. }
  497. UINT
  498. APIHOOK(GetMetaFileBitsEx)(
  499. HMETAFILE hmf,
  500. UINT nSize,
  501. LPVOID lpvData
  502. )
  503. {
  504. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetMetaFileBitsEx");
  505. return ORIGINAL_API(GetMetaFileBitsEx)(hmf, nSize, lpvData);
  506. }
  507. UINT
  508. APIHOOK(GetPrivateProfileIntA)(
  509. LPCSTR lpAppName,
  510. LPCSTR lpKeyName,
  511. INT nDefault,
  512. LPCSTR lpFileName
  513. )
  514. {
  515. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileIntA");
  516. return ORIGINAL_API(GetPrivateProfileIntA)(lpAppName, lpKeyName, nDefault, lpFileName);
  517. }
  518. UINT
  519. APIHOOK(GetPrivateProfileIntW)(
  520. LPCWSTR lpAppName,
  521. LPCWSTR lpKeyName,
  522. INT nDefault,
  523. LPCWSTR lpFileName
  524. )
  525. {
  526. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileIntW");
  527. return ORIGINAL_API(GetPrivateProfileIntW)(lpAppName, lpKeyName, nDefault, lpFileName);
  528. }
  529. DWORD
  530. APIHOOK(GetPrivateProfileSectionA)(
  531. LPCSTR lpAppName,
  532. LPSTR lpReturnedString,
  533. DWORD nSize,
  534. LPCSTR lpFileName
  535. )
  536. {
  537. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileSectionA");
  538. return ORIGINAL_API(GetPrivateProfileSectionA)(lpAppName, lpReturnedString, nSize, lpFileName);
  539. }
  540. DWORD
  541. APIHOOK(GetPrivateProfileSectionW)(
  542. LPCWSTR lpAppName,
  543. LPWSTR lpReturnedString,
  544. DWORD nSize,
  545. LPCWSTR lpFileName
  546. )
  547. {
  548. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileSectionW");
  549. return ORIGINAL_API(GetPrivateProfileSectionW)(lpAppName, lpReturnedString, nSize, lpFileName);
  550. }
  551. DWORD
  552. APIHOOK(GetPrivateProfileSectionNamesA)(
  553. LPSTR lpszReturnBuffer,
  554. DWORD nSize,
  555. LPCSTR lpFileName
  556. )
  557. {
  558. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileSectionNamesA");
  559. return ORIGINAL_API(GetPrivateProfileSectionNamesA)(lpszReturnBuffer, nSize, lpFileName);
  560. }
  561. DWORD
  562. APIHOOK(GetPrivateProfileSectionNamesW)(
  563. LPWSTR lpszReturnBuffer,
  564. DWORD nSize,
  565. LPCWSTR lpFileName
  566. )
  567. {
  568. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileSectionNamesW");
  569. return ORIGINAL_API(GetPrivateProfileSectionNamesW)(lpszReturnBuffer, nSize, lpFileName);
  570. }
  571. DWORD
  572. APIHOOK(GetPrivateProfileStringA)(
  573. LPCSTR lpAppName,
  574. LPCSTR lpKeyName,
  575. LPCSTR lpDefault,
  576. LPSTR lpReturnedString,
  577. DWORD nSize,
  578. LPCSTR lpFileName
  579. )
  580. {
  581. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileStringA");
  582. return ORIGINAL_API(GetPrivateProfileStringA)(lpAppName, lpKeyName, lpDefault,
  583. lpReturnedString, nSize, lpFileName);
  584. }
  585. DWORD
  586. APIHOOK(GetPrivateProfileStringW)(
  587. LPCWSTR lpAppName,
  588. LPCWSTR lpKeyName,
  589. LPCWSTR lpDefault,
  590. LPWSTR lpReturnedString,
  591. DWORD nSize,
  592. LPCWSTR lpFileName
  593. )
  594. {
  595. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileStringW");
  596. return ORIGINAL_API(GetPrivateProfileStringW)(lpAppName, lpKeyName, lpDefault,
  597. lpReturnedString, nSize, lpFileName);
  598. }
  599. BOOL
  600. APIHOOK(GetPrivateProfileStructA)(
  601. LPCSTR lpszSection,
  602. LPCSTR lpszKey,
  603. LPVOID lpStruct,
  604. UINT uSizeStruct,
  605. LPCSTR szFile
  606. )
  607. {
  608. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileStructA");
  609. return ORIGINAL_API(GetPrivateProfileStructA)(lpszSection, lpszKey, lpStruct,
  610. uSizeStruct, szFile);
  611. }
  612. BOOL
  613. APIHOOK(GetPrivateProfileStructW)(
  614. LPCWSTR lpszSection,
  615. LPCWSTR lpszKey,
  616. LPVOID lpStruct,
  617. UINT uSizeStruct,
  618. LPCWSTR szFile
  619. )
  620. {
  621. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetPrivateProfileStructW");
  622. return ORIGINAL_API(GetPrivateProfileStructW)(lpszSection, lpszKey, lpStruct,
  623. uSizeStruct, szFile);
  624. }
  625. UINT
  626. APIHOOK(GetProfileIntA)(
  627. LPCSTR lpAppName,
  628. LPCSTR lpKeyName,
  629. INT nDefault
  630. )
  631. {
  632. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileIntA");
  633. return ORIGINAL_API(GetProfileIntA)(lpAppName, lpKeyName, nDefault);
  634. }
  635. UINT
  636. APIHOOK(GetProfileIntW)(
  637. LPCWSTR lpAppName,
  638. LPCWSTR lpKeyName,
  639. INT nDefault
  640. )
  641. {
  642. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileIntW");
  643. return ORIGINAL_API(GetProfileIntW)(lpAppName, lpKeyName, nDefault);
  644. }
  645. DWORD
  646. APIHOOK(GetProfileSectionA)(
  647. LPCSTR lpAppName,
  648. LPSTR lpReturnedString,
  649. DWORD nSize
  650. )
  651. {
  652. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileSectionA");
  653. return ORIGINAL_API(GetProfileSectionA)(lpAppName, lpReturnedString, nSize);
  654. }
  655. DWORD
  656. APIHOOK(GetProfileSectionW)(
  657. LPCWSTR lpAppName,
  658. LPWSTR lpReturnedString,
  659. DWORD nSize
  660. )
  661. {
  662. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileSectionW");
  663. return ORIGINAL_API(GetProfileSectionW)(lpAppName, lpReturnedString, nSize);
  664. }
  665. DWORD
  666. APIHOOK(GetProfileStringA)(
  667. LPCSTR lpAppName,
  668. LPCSTR lpKeyName,
  669. LPCSTR lpDefault,
  670. LPSTR lpReturnedString,
  671. DWORD nSize
  672. )
  673. {
  674. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileStringA");
  675. return ORIGINAL_API(GetProfileStringA)(lpAppName, lpKeyName, lpDefault,
  676. lpReturnedString, nSize);
  677. }
  678. DWORD
  679. APIHOOK(GetProfileStringW)(
  680. LPCWSTR lpAppName,
  681. LPCWSTR lpKeyName,
  682. LPCWSTR lpDefault,
  683. LPWSTR lpReturnedString,
  684. DWORD nSize
  685. )
  686. {
  687. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetProfileStringW");
  688. return ORIGINAL_API(GetProfileStringW)(lpAppName, lpKeyName, lpDefault,
  689. lpReturnedString, nSize);
  690. }
  691. HWND
  692. APIHOOK(GetSysModalWindow)(
  693. void
  694. )
  695. {
  696. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetSysModalWindow");
  697. return ORIGINAL_API(GetSysModalWindow)();
  698. }
  699. BOOL
  700. APIHOOK(GetTextExtentPointA)(
  701. HDC hdc,
  702. LPCSTR lpString,
  703. int cbString,
  704. LPSIZE lpSize
  705. )
  706. {
  707. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetTextExtentPointA");
  708. return ORIGINAL_API(GetTextExtentPointA)(hdc, lpString, cbString, lpSize);
  709. }
  710. BOOL
  711. APIHOOK(GetTextExtentPointW)(
  712. HDC hdc,
  713. LPCWSTR lpString,
  714. int cbString,
  715. LPSIZE lpSize
  716. )
  717. {
  718. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetTextExtentPointW");
  719. return ORIGINAL_API(GetTextExtentPointW)(hdc, lpString, cbString, lpSize);
  720. }
  721. WORD
  722. APIHOOK(GetWindowWord)(
  723. HWND hWnd,
  724. int nUnknown
  725. )
  726. {
  727. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GetWindowWord");
  728. return ORIGINAL_API(GetWindowWord)(hWnd, nUnknown);
  729. }
  730. HGLOBAL
  731. APIHOOK(GlobalAlloc)(
  732. UINT uFlags,
  733. SIZE_T dwBytes
  734. )
  735. {
  736. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalAlloc");
  737. return ORIGINAL_API(GlobalAlloc)(uFlags, dwBytes);
  738. }
  739. DWORD
  740. APIHOOK(GlobalCompact)(
  741. DWORD dwUnknown
  742. )
  743. {
  744. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalCompact");
  745. return ORIGINAL_API(GlobalCompact)(dwUnknown);
  746. }
  747. void
  748. APIHOOK(GlobalFix)(
  749. HGLOBAL hMem
  750. )
  751. {
  752. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalFix");
  753. return ORIGINAL_API(GlobalFix)(hMem);
  754. }
  755. UINT
  756. APIHOOK(GlobalFlags)(
  757. HGLOBAL hMem
  758. )
  759. {
  760. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalFlags");
  761. return ORIGINAL_API(GlobalFlags)(hMem);
  762. }
  763. HGLOBAL
  764. APIHOOK(GlobalFree)(
  765. HGLOBAL hMem
  766. )
  767. {
  768. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalFree");
  769. return ORIGINAL_API(GlobalFree)(hMem);
  770. }
  771. HGLOBAL
  772. APIHOOK(GlobalHandle)(
  773. LPCVOID pMem
  774. )
  775. {
  776. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalHandle");
  777. return ORIGINAL_API(GlobalHandle)(pMem);
  778. }
  779. LPVOID
  780. APIHOOK(GlobalLock)(
  781. HGLOBAL hMem
  782. )
  783. {
  784. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalLock");
  785. return ORIGINAL_API(GlobalLock)(hMem);
  786. }
  787. HGLOBAL
  788. APIHOOK(GlobalReAlloc)(
  789. HGLOBAL hMem,
  790. SIZE_T dwBytes,
  791. UINT uFlags
  792. )
  793. {
  794. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalReAlloc");
  795. return ORIGINAL_API(GlobalReAlloc)(hMem, dwBytes, uFlags);
  796. }
  797. SIZE_T
  798. APIHOOK(GlobalSize)(
  799. HGLOBAL hMem
  800. )
  801. {
  802. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalSize");
  803. return ORIGINAL_API(GlobalSize)(hMem);
  804. }
  805. void
  806. APIHOOK(GlobalUnfix)(
  807. HGLOBAL hMem
  808. )
  809. {
  810. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalUnfix");
  811. return ORIGINAL_API(GlobalUnfix)(hMem);
  812. }
  813. BOOL
  814. APIHOOK(GlobalUnlock)(
  815. HGLOBAL hMem
  816. )
  817. {
  818. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalUnlock");
  819. return ORIGINAL_API(GlobalUnlock)(hMem);
  820. }
  821. BOOL
  822. APIHOOK(GlobalUnWire)(
  823. HGLOBAL hMem
  824. )
  825. {
  826. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalUnWire");
  827. return ORIGINAL_API(GlobalUnWire)(hMem);
  828. }
  829. char FAR*
  830. APIHOOK(GlobalWire)(
  831. HGLOBAL hMem
  832. )
  833. {
  834. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: GlobalWire");
  835. return ORIGINAL_API(GlobalWire)(hMem);
  836. }
  837. BOOL
  838. APIHOOK(IsBadHugeReadPtr)(
  839. const void _huge* lp,
  840. DWORD cb
  841. )
  842. {
  843. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: IsBadHugeReadPtr");
  844. return ORIGINAL_API(IsBadHugeReadPtr)(lp, cb);
  845. }
  846. BOOL
  847. APIHOOK(IsBadHugeWritePtr)(
  848. const void _huge* lp,
  849. DWORD cb
  850. )
  851. {
  852. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: IsBadHugeWritePtr");
  853. return ORIGINAL_API(IsBadHugeWritePtr)(lp, cb);
  854. }
  855. DWORD
  856. APIHOOK(LoadModule)(
  857. LPCSTR lpModuleName,
  858. LPVOID lpParameterBlock
  859. )
  860. {
  861. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LoadModule");
  862. return ORIGINAL_API(LoadModule)(lpModuleName, lpParameterBlock);
  863. }
  864. HLOCAL
  865. APIHOOK(LocalAlloc)(
  866. UINT uFlags,
  867. SIZE_T uBytes
  868. )
  869. {
  870. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalAlloc");
  871. return ORIGINAL_API(LocalAlloc)(uFlags, uBytes);
  872. }
  873. UINT
  874. APIHOOK(LocalCompact)(
  875. UINT uUnknown
  876. )
  877. {
  878. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalCompact");
  879. return ORIGINAL_API(LocalCompact)(uUnknown);
  880. }
  881. HLOCAL
  882. APIHOOK(LocalDiscard)(
  883. HLOCAL hlocMem
  884. )
  885. {
  886. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalDiscard");
  887. return ORIGINAL_API(LocalDiscard)(hlocMem);
  888. }
  889. UINT
  890. APIHOOK(LocalFlags)(
  891. HLOCAL hMem
  892. )
  893. {
  894. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalFlags");
  895. return ORIGINAL_API(LocalFlags)(hMem);
  896. }
  897. HLOCAL
  898. APIHOOK(LocalFree)(
  899. HLOCAL hMem
  900. )
  901. {
  902. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalFree");
  903. return ORIGINAL_API(LocalFree)(hMem);
  904. }
  905. HLOCAL
  906. APIHOOK(LocalHandle)(
  907. LPCVOID pMem
  908. )
  909. {
  910. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalHandle");
  911. return ORIGINAL_API(LocalHandle)(pMem);
  912. }
  913. LPVOID
  914. APIHOOK(LocalLock)(
  915. HLOCAL hMem
  916. )
  917. {
  918. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalLock");
  919. return ORIGINAL_API(LocalLock)(hMem);
  920. }
  921. HLOCAL
  922. APIHOOK(LocalReAlloc)(
  923. HLOCAL hMem,
  924. SIZE_T uBytes,
  925. UINT uFlags
  926. )
  927. {
  928. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalReAlloc");
  929. return ORIGINAL_API(LocalReAlloc)(hMem, uBytes, uFlags);
  930. }
  931. UINT
  932. APIHOOK(LocalShrink)(
  933. HLOCAL hMem,
  934. UINT uUnknown
  935. )
  936. {
  937. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalShrink");
  938. return ORIGINAL_API(LocalShrink)(hMem, uUnknown);
  939. }
  940. UINT
  941. APIHOOK(LocalSize)(
  942. HLOCAL hMem
  943. )
  944. {
  945. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalSize");
  946. return ORIGINAL_API(LocalSize)(hMem);
  947. }
  948. BOOL
  949. APIHOOK(LocalUnlock)(
  950. HLOCAL hMem
  951. )
  952. {
  953. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LocalUnlock");
  954. return ORIGINAL_API(LocalUnlock)(hMem);
  955. }
  956. void
  957. APIHOOK(LZDone)(
  958. void
  959. )
  960. {
  961. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LZDone");
  962. return ORIGINAL_API(LZDone)();
  963. }
  964. int
  965. APIHOOK(LZStart)(
  966. void
  967. )
  968. {
  969. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: LZStart");
  970. return ORIGINAL_API(LZStart)();
  971. }
  972. HFILE
  973. APIHOOK(OpenFile)(
  974. LPCSTR lpFileName,
  975. LPOFSTRUCT lpReOpenBuff,
  976. UINT uStyle
  977. )
  978. {
  979. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: OpenFile");
  980. return ORIGINAL_API(OpenFile)(lpFileName, lpReOpenBuff, uStyle);
  981. }
  982. BOOL
  983. APIHOOK(PlayMetaFile)(
  984. HDC hdc,
  985. HMETAFILE hmf
  986. )
  987. {
  988. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: PlayMetaFile");
  989. return ORIGINAL_API(PlayMetaFile)(hdc, hmf);
  990. }
  991. BOOL
  992. APIHOOK(PlayMetaFileRecord)(
  993. HDC hdc,
  994. LPHANDLETABLE lpHandletable,
  995. LPMETARECORD lpMetaRecord,
  996. UINT nHandles
  997. )
  998. {
  999. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: PlayMetaFileRecord");
  1000. return ORIGINAL_API(PlayMetaFileRecord)(hdc, lpHandletable, lpMetaRecord, nHandles);
  1001. }
  1002. DWORD
  1003. APIHOOK(PrinterMessageBoxA)(
  1004. HANDLE hPrinter,
  1005. DWORD Error,
  1006. HWND hWnd,
  1007. LPSTR pText,
  1008. LPSTR pCaption,
  1009. DWORD dwType
  1010. )
  1011. {
  1012. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: PrinterMessageBoxA");
  1013. return ORIGINAL_API(PrinterMessageBoxA)(hPrinter, Error, hWnd, pText, pCaption, dwType);
  1014. }
  1015. DWORD
  1016. APIHOOK(PrinterMessageBoxW)(
  1017. HANDLE hPrinter,
  1018. DWORD Error,
  1019. HWND hWnd,
  1020. LPWSTR pText,
  1021. LPWSTR pCaption,
  1022. DWORD dwType
  1023. )
  1024. {
  1025. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: PrinterMessageBoxW");
  1026. return ORIGINAL_API(PrinterMessageBoxW)(hPrinter, Error, hWnd, pText, pCaption, dwType);
  1027. }
  1028. LONG
  1029. APIHOOK(RegCreateKeyA)(
  1030. HKEY hKey,
  1031. LPCSTR lpSubKey,
  1032. PHKEY phkResult
  1033. )
  1034. {
  1035. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegCreateKeyA");
  1036. return ORIGINAL_API(RegCreateKeyA)(hKey, lpSubKey, phkResult);
  1037. }
  1038. LONG
  1039. APIHOOK(RegCreateKeyW)(
  1040. HKEY hKey,
  1041. LPCWSTR lpSubKey,
  1042. PHKEY phkResult
  1043. )
  1044. {
  1045. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegCreateKeyW");
  1046. return ORIGINAL_API(RegCreateKeyW)(hKey, lpSubKey, phkResult);
  1047. }
  1048. LONG
  1049. APIHOOK(RegEnumKeyA)(
  1050. HKEY hKey,
  1051. DWORD dwIndex,
  1052. LPSTR lpName,
  1053. DWORD cchName
  1054. )
  1055. {
  1056. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegEnumKeyA");
  1057. return ORIGINAL_API(RegEnumKeyA)(hKey, dwIndex, lpName, cchName);
  1058. }
  1059. LONG
  1060. APIHOOK(RegEnumKeyW)(
  1061. HKEY hKey,
  1062. DWORD dwIndex,
  1063. LPWSTR lpName,
  1064. DWORD cchName
  1065. )
  1066. {
  1067. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegEnumKeyW");
  1068. return ORIGINAL_API(RegEnumKeyW)(hKey, dwIndex, lpName, cchName);
  1069. }
  1070. LONG
  1071. APIHOOK(RegOpenKeyA)(
  1072. HKEY hKey,
  1073. LPSTR lpSubKey,
  1074. PHKEY phkResult
  1075. )
  1076. {
  1077. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegOpenKeyA");
  1078. return ORIGINAL_API(RegOpenKeyA)(hKey, lpSubKey, phkResult);
  1079. }
  1080. LONG
  1081. APIHOOK(RegOpenKeyW)(
  1082. HKEY hKey,
  1083. LPWSTR lpSubKey,
  1084. PHKEY phkResult
  1085. )
  1086. {
  1087. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegOpenKeyW");
  1088. return ORIGINAL_API(RegOpenKeyW)(hKey, lpSubKey, phkResult);
  1089. }
  1090. LONG
  1091. APIHOOK(RegQueryValueA)(
  1092. HKEY hKey,
  1093. LPCSTR lpSubKey,
  1094. LPSTR lpValue,
  1095. PLONG lpcbValue
  1096. )
  1097. {
  1098. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegQueryValueA");
  1099. return ORIGINAL_API(RegQueryValueA)(hKey, lpSubKey, lpValue, lpcbValue);
  1100. }
  1101. LONG
  1102. APIHOOK(RegQueryValueW)(
  1103. HKEY hKey,
  1104. LPCWSTR lpSubKey,
  1105. LPWSTR lpValue,
  1106. PLONG lpcbValue
  1107. )
  1108. {
  1109. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegQueryValueW");
  1110. return ORIGINAL_API(RegQueryValueW)(hKey, lpSubKey, lpValue, lpcbValue);
  1111. }
  1112. LONG
  1113. APIHOOK(RegSetValueA)(
  1114. HKEY hKey,
  1115. LPCSTR lpSubKey,
  1116. DWORD dwType,
  1117. LPCSTR lpData,
  1118. DWORD cbData
  1119. )
  1120. {
  1121. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegSetValueA");
  1122. return ORIGINAL_API(RegSetValueA)(hKey, lpSubKey, dwType, lpData, cbData);
  1123. }
  1124. LONG
  1125. APIHOOK(RegSetValueW)(
  1126. HKEY hKey,
  1127. LPCWSTR lpSubKey,
  1128. DWORD dwType,
  1129. LPCWSTR lpData,
  1130. DWORD cbData
  1131. )
  1132. {
  1133. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: RegSetValueW");
  1134. return ORIGINAL_API(RegSetValueW)(hKey, lpSubKey, dwType, lpData, cbData);
  1135. }
  1136. LONG
  1137. APIHOOK(SetBitmapBits)(
  1138. HBITMAP hbmp,
  1139. DWORD cBytes,
  1140. CONST VOID *lpBits
  1141. )
  1142. {
  1143. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetBitmapBits");
  1144. return ORIGINAL_API(SetBitmapBits)(hbmp, cBytes, lpBits);
  1145. }
  1146. WORD
  1147. APIHOOK(SetClassWord)(
  1148. HWND hWnd,
  1149. int nIndex,
  1150. WORD wNewWord
  1151. )
  1152. {
  1153. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetClassWord");
  1154. return ORIGINAL_API(SetClassWord)(hWnd, nIndex, wNewWord);
  1155. }
  1156. void
  1157. APIHOOK(SetDebugErrorLevel)(
  1158. DWORD dwLevel
  1159. )
  1160. {
  1161. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetDebugErrorLevel");
  1162. return ORIGINAL_API(SetDebugErrorLevel)(dwLevel);
  1163. }
  1164. BOOL
  1165. APIHOOK(SetMessageQueue)(
  1166. int nUnknown
  1167. )
  1168. {
  1169. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetMessageQueue");
  1170. return ORIGINAL_API(SetMessageQueue)(nUnknown);
  1171. }
  1172. HMETAFILE
  1173. APIHOOK(SetMetaFileBitsEx)(
  1174. UINT nSize,
  1175. CONST BYTE *lpData
  1176. )
  1177. {
  1178. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetMetaFileBitsEx");
  1179. return ORIGINAL_API(SetMetaFileBitsEx)(nSize, lpData);
  1180. }
  1181. HWND
  1182. APIHOOK(SetSysModalWindow)(
  1183. HWND hWnd
  1184. )
  1185. {
  1186. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetSysModalWindow");
  1187. return ORIGINAL_API(SetSysModalWindow)(hWnd);
  1188. }
  1189. HHOOK
  1190. APIHOOK(SetWindowsHookA)(
  1191. int idHook,
  1192. HOOKPROC lpfn
  1193. )
  1194. {
  1195. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetWindowsHookA");
  1196. return ORIGINAL_API(SetWindowsHookA)(idHook, lpfn);
  1197. }
  1198. HHOOK
  1199. APIHOOK(SetWindowsHookW)(
  1200. int idHook,
  1201. HOOKPROC lpfn
  1202. )
  1203. {
  1204. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetWindowsHookW");
  1205. return ORIGINAL_API(SetWindowsHookW)(idHook, lpfn);
  1206. }
  1207. WORD
  1208. APIHOOK(SetWindowWord)(
  1209. HWND hWnd,
  1210. int nUnknown,
  1211. WORD wUnknown
  1212. )
  1213. {
  1214. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: SetWindowWord");
  1215. return ORIGINAL_API(SetWindowWord)(hWnd, nUnknown, wUnknown);
  1216. }
  1217. BOOL
  1218. APIHOOK(UnhookWindowsHook)(
  1219. int idHook,
  1220. HOOKPROC lpfn
  1221. )
  1222. {
  1223. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: UnhookWindowsHook");
  1224. return ORIGINAL_API(UnhookWindowsHook)(idHook, lpfn);
  1225. }
  1226. DWORD
  1227. APIHOOK(WaitForPrinterChange)(
  1228. HANDLE hPrinter,
  1229. DWORD Flags
  1230. )
  1231. {
  1232. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WaitForPrinterChange");
  1233. return ORIGINAL_API(WaitForPrinterChange)(hPrinter, Flags);
  1234. }
  1235. UINT
  1236. APIHOOK(WinExec)(
  1237. LPCSTR lpCmdLine,
  1238. UINT uCmdShow
  1239. )
  1240. {
  1241. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WinExec");
  1242. return ORIGINAL_API(WinExec)(lpCmdLine, uCmdShow);
  1243. }
  1244. DWORD
  1245. APIHOOK(WNetAddConnectionA)(
  1246. LPCSTR lpRemoteName,
  1247. LPCSTR lpPassword,
  1248. LPCSTR lpLocalName
  1249. )
  1250. {
  1251. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WNetAddConnectionA");
  1252. return ORIGINAL_API(WNetAddConnectionA)(lpRemoteName, lpPassword, lpLocalName);
  1253. }
  1254. DWORD
  1255. APIHOOK(WNetAddConnectionW)(
  1256. LPCWSTR lpRemoteName,
  1257. LPCWSTR lpPassword,
  1258. LPCWSTR lpLocalName
  1259. )
  1260. {
  1261. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WNetAddConnectionW");
  1262. return ORIGINAL_API(WNetAddConnectionW)(lpRemoteName, lpPassword, lpLocalName);
  1263. }
  1264. BOOL
  1265. APIHOOK(WritePrivateProfileSectionA)(
  1266. LPCSTR lpAppName,
  1267. LPCSTR lpString,
  1268. LPCSTR lpFileName
  1269. )
  1270. {
  1271. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileSectionA");
  1272. return ORIGINAL_API(WritePrivateProfileSectionA)(lpAppName, lpString, lpFileName);
  1273. }
  1274. BOOL
  1275. APIHOOK(WritePrivateProfileSectionW)(
  1276. LPCWSTR lpAppName,
  1277. LPCWSTR lpString,
  1278. LPCWSTR lpFileName
  1279. )
  1280. {
  1281. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileSectionW");
  1282. return ORIGINAL_API(WritePrivateProfileSectionW)(lpAppName, lpString, lpFileName);
  1283. }
  1284. BOOL
  1285. APIHOOK(WritePrivateProfileStringA)(
  1286. LPCSTR lpAppName,
  1287. LPCSTR lpKeyName,
  1288. LPCSTR lpString,
  1289. LPCSTR lpFileName
  1290. )
  1291. {
  1292. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileStringA");
  1293. return ORIGINAL_API(WritePrivateProfileStringA)(lpAppName, lpKeyName,
  1294. lpString, lpFileName);
  1295. }
  1296. BOOL
  1297. APIHOOK(WritePrivateProfileStringW)(
  1298. LPCWSTR lpAppName,
  1299. LPCWSTR lpKeyName,
  1300. LPCWSTR lpString,
  1301. LPCWSTR lpFileName
  1302. )
  1303. {
  1304. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileStringW");
  1305. return ORIGINAL_API(WritePrivateProfileStringW)(lpAppName, lpKeyName,
  1306. lpString, lpFileName);
  1307. }
  1308. BOOL
  1309. APIHOOK(WritePrivateProfileStructA)(
  1310. LPCSTR lpszSection,
  1311. LPCSTR lpszKey,
  1312. LPVOID lpStruct,
  1313. UINT uSizeStruct,
  1314. LPCSTR szFile
  1315. )
  1316. {
  1317. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileStructA");
  1318. return ORIGINAL_API(WritePrivateProfileStructA)(lpszSection, lpszKey, lpStruct,
  1319. uSizeStruct, szFile);
  1320. }
  1321. BOOL
  1322. APIHOOK(WritePrivateProfileStructW)(
  1323. LPCWSTR lpszSection,
  1324. LPCWSTR lpszKey,
  1325. LPVOID lpStruct,
  1326. UINT uSizeStruct,
  1327. LPCWSTR szFile
  1328. )
  1329. {
  1330. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WritePrivateProfileStructW");
  1331. return ORIGINAL_API(WritePrivateProfileStructW)(lpszSection, lpszKey, lpStruct,
  1332. uSizeStruct, szFile);
  1333. }
  1334. BOOL
  1335. APIHOOK(WriteProfileSectionA)(
  1336. LPCSTR lpAppName,
  1337. LPCSTR lpString
  1338. )
  1339. {
  1340. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WriteProfileSectionA");
  1341. return ORIGINAL_API(WriteProfileSectionA)(lpAppName, lpString);
  1342. }
  1343. BOOL
  1344. APIHOOK(WriteProfileSectionW)(
  1345. LPCWSTR lpAppName,
  1346. LPCWSTR lpString
  1347. )
  1348. {
  1349. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WriteProfileSectionW");
  1350. return ORIGINAL_API(WriteProfileSectionW)(lpAppName, lpString);
  1351. }
  1352. BOOL
  1353. APIHOOK(WriteProfileStringA)(
  1354. LPCSTR lpAppName,
  1355. LPCSTR lpKeyName,
  1356. LPCSTR lpString
  1357. )
  1358. {
  1359. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WriteProfileStringA");
  1360. return ORIGINAL_API(WriteProfileStringA)(lpAppName, lpKeyName, lpString);
  1361. }
  1362. BOOL
  1363. APIHOOK(WriteProfileStringW)(
  1364. LPCWSTR lpAppName,
  1365. LPCWSTR lpKeyName,
  1366. LPCWSTR lpString
  1367. )
  1368. {
  1369. VLOG(VLOG_LEVEL_WARNING, VLOG_OBSOLETECALLS_API, "API: WriteProfileStringW");
  1370. return ORIGINAL_API(WriteProfileStringW)(lpAppName, lpKeyName, lpString);
  1371. }
  1372. SHIM_INFO_BEGIN()
  1373. SHIM_INFO_DESCRIPTION(AVS_OBSOLETECALLS_DESC)
  1374. SHIM_INFO_FRIENDLY_NAME(AVS_OBSOLETECALLS_FRIENDLY)
  1375. SHIM_INFO_VERSION(2, 0)
  1376. SHIM_INFO_INCLUDE_EXCLUDE("I:*")
  1377. SHIM_INFO_END()
  1378. /*++
  1379. Register hooked functions
  1380. --*/
  1381. HOOK_BEGIN
  1382. DUMP_VERIFIER_LOG_ENTRY(VLOG_OBSOLETECALLS_API,
  1383. AVS_OBSOLETECALLS_API,
  1384. AVS_OBSOLETECALLS_API_R,
  1385. AVS_OBSOLETECALLS_API_URL)
  1386. APIHOOK_ENTRY(KERNEL32.DLL, _hread)
  1387. APIHOOK_ENTRY(KERNEL32.DLL, _hwrite)
  1388. APIHOOK_ENTRY(KERNEL32.DLL, _lclose)
  1389. APIHOOK_ENTRY(KERNEL32.DLL, _lcreat)
  1390. APIHOOK_ENTRY(KERNEL32.DLL, _llseek)
  1391. APIHOOK_ENTRY(KERNEL32.DLL, _lopen)
  1392. APIHOOK_ENTRY(KERNEL32.DLL, _lread)
  1393. APIHOOK_ENTRY(KERNEL32.DLL, _lwrite)
  1394. APIHOOK_ENTRY(USER32.DLL, AnyPopup)
  1395. APIHOOK_ENTRY(GDI32.DLL, CloseMetaFile)
  1396. APIHOOK_ENTRY(LZ32.DLL, CopyLZFile)
  1397. APIHOOK_ENTRY(GDI32.DLL, CopyMetaFileA)
  1398. APIHOOK_ENTRY(GDI32.DLL, CopyMetaFileW)
  1399. APIHOOK_ENTRY(GDI32.DLL, CreateDIBPatternBrush)
  1400. APIHOOK_ENTRY(GDI32.DLL, CreateDiscardableBitmap)
  1401. APIHOOK_ENTRY(GDI32.DLL, CreateMetaFileA)
  1402. APIHOOK_ENTRY(GDI32.DLL, CreateMetaFileW)
  1403. APIHOOK_ENTRY(GDI32.DLL, DeleteMetaFile)
  1404. APIHOOK_ENTRY(GDI32.DLL, EnumFontFamiliesA)
  1405. APIHOOK_ENTRY(GDI32.DLL, EnumFontFamiliesW)
  1406. APIHOOK_ENTRY(GDI32.DLL, EnumFontFamProc)
  1407. APIHOOK_ENTRY(GDI32.DLL, EnumFontsA)
  1408. APIHOOK_ENTRY(GDI32.DLL, EnumFontsW)
  1409. APIHOOK_ENTRY(GDI32.DLL, EnumFontsProc)
  1410. APIHOOK_ENTRY(GDI32.DLL, EnumMetaFile)
  1411. APIHOOK_ENTRY(GDI32.DLL, EnumMetaFileProc)
  1412. APIHOOK_ENTRY(GDI32.DLL, FixBrushOrgEx)
  1413. APIHOOK_ENTRY(GDI32.DLL, FloodFill)
  1414. APIHOOK_ENTRY(KERNEL32.DLL, FreeResource)
  1415. APIHOOK_ENTRY(GDI32.DLL, GetBitmapBits)
  1416. APIHOOK_ENTRY(GDI32.DLL, GetCharWidthA)
  1417. APIHOOK_ENTRY(GDI32.DLL, GetCharWidthW)
  1418. APIHOOK_ENTRY(USER32.DLL, GetClassWord)
  1419. APIHOOK_ENTRY(USER32.DLL, GetKBCodePage)
  1420. APIHOOK_ENTRY(GDI32.DLL, GetMetaFileA)
  1421. APIHOOK_ENTRY(GDI32.DLL, GetMetaFileW)
  1422. APIHOOK_ENTRY(GDI32.DLL, GetMetaFileBitsEx)
  1423. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileIntA)
  1424. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileIntW)
  1425. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileSectionA)
  1426. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileSectionW)
  1427. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileSectionNamesA)
  1428. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileSectionNamesW)
  1429. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileStringA)
  1430. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileStringW)
  1431. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileStructA)
  1432. APIHOOK_ENTRY(KERNEL32.DLL, GetPrivateProfileStructW)
  1433. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileIntA)
  1434. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileIntW)
  1435. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileSectionA)
  1436. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileSectionW)
  1437. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileStringA)
  1438. APIHOOK_ENTRY(KERNEL32.DLL, GetProfileStringW)
  1439. APIHOOK_ENTRY(USER32.DLL, GetSysModalWindow)
  1440. APIHOOK_ENTRY(GDI32.DLL, GetTextExtentPointA)
  1441. APIHOOK_ENTRY(GDI32.DLL, GetTextExtentPointW)
  1442. APIHOOK_ENTRY(USER32.DLL, GetWindowWord)
  1443. APIHOOK_ENTRY(KERNEL32.DLL, GlobalAlloc)
  1444. APIHOOK_ENTRY(KERNEL32.DLL, GlobalCompact)
  1445. APIHOOK_ENTRY(KERNEL32.DLL, GlobalFix)
  1446. APIHOOK_ENTRY(KERNEL32.DLL, GlobalFlags)
  1447. APIHOOK_ENTRY(KERNEL32.DLL, GlobalFree)
  1448. APIHOOK_ENTRY(KERNEL32.DLL, GlobalHandle)
  1449. APIHOOK_ENTRY(KERNEL32.DLL, GlobalLock)
  1450. APIHOOK_ENTRY(KERNEL32.DLL, GlobalReAlloc)
  1451. APIHOOK_ENTRY(KERNEL32.DLL, GlobalSize)
  1452. APIHOOK_ENTRY(KERNEL32.DLL, GlobalUnfix)
  1453. APIHOOK_ENTRY(KERNEL32.DLL, GlobalUnlock)
  1454. APIHOOK_ENTRY(KERNEL32.DLL, GlobalUnWire)
  1455. APIHOOK_ENTRY(KERNEL32.DLL, GlobalWire)
  1456. APIHOOK_ENTRY(KERNEL32.DLL, IsBadHugeReadPtr)
  1457. APIHOOK_ENTRY(KERNEL32.DLL, IsBadHugeWritePtr)
  1458. APIHOOK_ENTRY(KERNEL32.DLL, LoadModule)
  1459. APIHOOK_ENTRY(KERNEL32.DLL, LocalAlloc)
  1460. APIHOOK_ENTRY(KERNEL32.DLL, LocalCompact)
  1461. APIHOOK_ENTRY(KERNEL32.DLL, LocalDiscard)
  1462. APIHOOK_ENTRY(KERNEL32.DLL, LocalFlags)
  1463. APIHOOK_ENTRY(KERNEL32.DLL, LocalFree)
  1464. APIHOOK_ENTRY(KERNEL32.DLL, LocalHandle)
  1465. APIHOOK_ENTRY(KERNEL32.DLL, LocalLock)
  1466. APIHOOK_ENTRY(KERNEL32.DLL, LocalReAlloc)
  1467. APIHOOK_ENTRY(KERNEL32.DLL, LocalShrink)
  1468. APIHOOK_ENTRY(KERNEL32.DLL, LocalSize)
  1469. APIHOOK_ENTRY(KERNEL32.DLL, LocalUnlock)
  1470. APIHOOK_ENTRY(LZ32.DLL, LZDone)
  1471. APIHOOK_ENTRY(LZ32.DLL, LZStart)
  1472. APIHOOK_ENTRY(KERNEL32.DLL, OpenFile)
  1473. APIHOOK_ENTRY(GDI32.DLL, PlayMetaFile)
  1474. APIHOOK_ENTRY(GDI32.DLL, PlayMetaFileRecord)
  1475. APIHOOK_ENTRY(WINSPOOL.DRV, PrinterMessageBoxA)
  1476. APIHOOK_ENTRY(WINSPOOL.DRV, PrinterMessageBoxW)
  1477. APIHOOK_ENTRY(ADVAPI32.DLL, RegCreateKeyA)
  1478. APIHOOK_ENTRY(ADVAPI32.DLL, RegCreateKeyW)
  1479. APIHOOK_ENTRY(ADVAPI32.DLL, RegEnumKeyA)
  1480. APIHOOK_ENTRY(ADVAPI32.DLL, RegEnumKeyW)
  1481. APIHOOK_ENTRY(ADVAPI32.DLL, RegOpenKeyA)
  1482. APIHOOK_ENTRY(ADVAPI32.DLL, RegOpenKeyW)
  1483. APIHOOK_ENTRY(ADVAPI32.DLL, RegQueryValueA)
  1484. APIHOOK_ENTRY(ADVAPI32.DLL, RegQueryValueW)
  1485. APIHOOK_ENTRY(ADVAPI32.DLL, RegSetValueA)
  1486. APIHOOK_ENTRY(ADVAPI32.DLL, RegSetValueW)
  1487. APIHOOK_ENTRY(GDI32.DLL, SetBitmapBits)
  1488. APIHOOK_ENTRY(USER32.DLL, SetClassWord)
  1489. APIHOOK_ENTRY(USER32.DLL, SetDebugErrorLevel)
  1490. APIHOOK_ENTRY(USER32.DLL, SetMessageQueue)
  1491. APIHOOK_ENTRY(GDI32.DLL, SetMetaFileBitsEx)
  1492. APIHOOK_ENTRY(USER32.DLL, SetSysModalWindow)
  1493. APIHOOK_ENTRY(USER32.DLL, SetWindowsHookA)
  1494. APIHOOK_ENTRY(USER32.DLL, SetWindowsHookW)
  1495. APIHOOK_ENTRY(USER32.DLL, SetWindowWord)
  1496. APIHOOK_ENTRY(USER32.DLL, UnhookWindowsHook)
  1497. APIHOOK_ENTRY(WINSPOOL.DRV, WaitForPrinterChange)
  1498. APIHOOK_ENTRY(KERNEL32.DLL, WinExec)
  1499. APIHOOK_ENTRY(MPR.DLL, WNetAddConnectionA)
  1500. APIHOOK_ENTRY(MPR.DLL, WNetAddConnectionW)
  1501. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileSectionA)
  1502. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileSectionW)
  1503. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileStringA)
  1504. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileStringW)
  1505. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileStructA)
  1506. APIHOOK_ENTRY(KERNEL32.DLL, WritePrivateProfileStructW)
  1507. APIHOOK_ENTRY(KERNEL32.DLL, WriteProfileSectionA)
  1508. APIHOOK_ENTRY(KERNEL32.DLL, WriteProfileSectionW)
  1509. APIHOOK_ENTRY(KERNEL32.DLL, WriteProfileStringA)
  1510. APIHOOK_ENTRY(KERNEL32.DLL, WriteProfileStringW)
  1511. HOOK_END
  1512. IMPLEMENT_SHIM_END