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.

804 lines
16 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. AliasDXDC.cpp
  5. Abstract:
  6. Win2k used to cache DCs for surfaces. Apparently this no longer happens on
  7. Whistler as the handles come back different on different calls to GetDC for
  8. the same surface.
  9. Our solution is to alias the handle returned from the IDirectDrawSurface::GetDC
  10. and fix it up in the GDI functions that depend on it.
  11. Notes:
  12. This is a general purpose shim.
  13. History:
  14. 12/02/2001 linstev Created
  15. --*/
  16. #include "precomp.h"
  17. IMPLEMENT_SHIM_BEGIN(AliasDXDC)
  18. #include "ShimHookMacro.h"
  19. APIHOOK_ENUM_BEGIN
  20. APIHOOK_ENUM_ENTRY_DIRECTX_COMSERVER()
  21. APIHOOK_ENUM_ENTRY(BitBlt)
  22. APIHOOK_ENUM_ENTRY(CreateDIBSection)
  23. APIHOOK_ENUM_ENTRY(Ellipse)
  24. APIHOOK_ENUM_ENTRY(GetCurrentObject)
  25. APIHOOK_ENUM_ENTRY(GetDeviceCaps)
  26. APIHOOK_ENUM_ENTRY(GetPixel)
  27. APIHOOK_ENUM_ENTRY(SetPixel)
  28. APIHOOK_ENUM_ENTRY(GetSystemPaletteEntries)
  29. APIHOOK_ENUM_ENTRY(GetTextExtentPoint32A)
  30. APIHOOK_ENUM_ENTRY(GetTextFaceA)
  31. APIHOOK_ENUM_ENTRY(GetTextMetricsA)
  32. APIHOOK_ENUM_ENTRY(LineTo)
  33. APIHOOK_ENUM_ENTRY(MoveToEx)
  34. APIHOOK_ENUM_ENTRY(RealizePalette)
  35. APIHOOK_ENUM_ENTRY(Rectangle)
  36. APIHOOK_ENUM_ENTRY(SelectObject)
  37. APIHOOK_ENUM_ENTRY(SelectPalette)
  38. APIHOOK_ENUM_ENTRY(SetDIBColorTable)
  39. APIHOOK_ENUM_ENTRY(SetStretchBltMode)
  40. APIHOOK_ENUM_ENTRY(SetSystemPaletteUse)
  41. APIHOOK_ENUM_ENTRY(StretchBlt)
  42. APIHOOK_ENUM_ENTRY(StretchDIBits)
  43. APIHOOK_ENUM_ENTRY(TextOutA)
  44. APIHOOK_ENUM_END
  45. IMPLEMENT_DIRECTX_COMSERVER_HOOKS()
  46. #define ALIASDC (HDC) 0x42
  47. HDC g_hDcLast = 0;
  48. /*++
  49. UnAlias the DC if required.
  50. --*/
  51. HDC FixDC(HDC hdc)
  52. {
  53. if (hdc == ALIASDC) {
  54. return g_hDcLast;
  55. } else {
  56. return hdc;
  57. }
  58. }
  59. /*++
  60. Hook create surface so we can be sure we're being called.
  61. --*/
  62. HRESULT
  63. COMHOOK(IDirectDraw, CreateSurface)(
  64. PVOID pThis,
  65. LPDDSURFACEDESC lpDDSurfaceDesc,
  66. LPDIRECTDRAWSURFACE* lplpDDSurface,
  67. IUnknown* pUnkOuter
  68. )
  69. {
  70. HRESULT hReturn;
  71. _pfn_IDirectDraw_CreateSurface pfnOld =
  72. ORIGINAL_COM(IDirectDraw, CreateSurface, pThis);
  73. if (SUCCEEDED(hReturn = (*pfnOld)(
  74. pThis,
  75. lpDDSurfaceDesc,
  76. lplpDDSurface,
  77. pUnkOuter)))
  78. {
  79. HookObject(
  80. NULL,
  81. IID_IDirectDrawSurface,
  82. (PVOID*)lplpDDSurface,
  83. NULL,
  84. FALSE);
  85. }
  86. return hReturn;
  87. }
  88. /*++
  89. Hook create surface so we can be sure we're being called.
  90. --*/
  91. HRESULT
  92. COMHOOK(IDirectDraw2, CreateSurface)(
  93. PVOID pThis,
  94. LPDDSURFACEDESC lpDDSurfaceDesc,
  95. LPDIRECTDRAWSURFACE* lplpDDSurface,
  96. IUnknown* pUnkOuter
  97. )
  98. {
  99. HRESULT hReturn;
  100. _pfn_IDirectDraw2_CreateSurface pfnOld =
  101. ORIGINAL_COM(IDirectDraw2, CreateSurface, pThis);
  102. if (SUCCEEDED(hReturn = (*pfnOld)(
  103. pThis,
  104. lpDDSurfaceDesc,
  105. lplpDDSurface,
  106. pUnkOuter)))
  107. {
  108. HookObject(
  109. NULL,
  110. IID_IDirectDrawSurface2,
  111. (PVOID*)lplpDDSurface,
  112. NULL,
  113. FALSE);
  114. }
  115. return hReturn;
  116. }
  117. /*++
  118. Hook create surface so we can be sure we're being called.
  119. --*/
  120. HRESULT
  121. COMHOOK(IDirectDraw4, CreateSurface)(
  122. PVOID pThis,
  123. LPDDSURFACEDESC2 lpDDSurfaceDesc,
  124. LPDIRECTDRAWSURFACE* lplpDDSurface,
  125. IUnknown* pUnkOuter
  126. )
  127. {
  128. HRESULT hReturn;
  129. _pfn_IDirectDraw4_CreateSurface pfnOld =
  130. ORIGINAL_COM(IDirectDraw4, CreateSurface, pThis);
  131. if (SUCCEEDED(hReturn = (*pfnOld)(
  132. pThis,
  133. lpDDSurfaceDesc,
  134. lplpDDSurface,
  135. pUnkOuter)))
  136. {
  137. HookObject(
  138. NULL,
  139. IID_IDirectDrawSurface4,
  140. (PVOID*)lplpDDSurface,
  141. NULL,
  142. FALSE);
  143. }
  144. return hReturn;
  145. }
  146. /*++
  147. Hook create surface so we can be sure we're being called.
  148. --*/
  149. HRESULT
  150. COMHOOK(IDirectDraw7, CreateSurface)(
  151. PVOID pThis,
  152. LPDDSURFACEDESC2 lpDDSurfaceDesc,
  153. LPDIRECTDRAWSURFACE* lplpDDSurface,
  154. IUnknown* pUnkOuter
  155. )
  156. {
  157. HRESULT hReturn;
  158. _pfn_IDirectDraw7_CreateSurface pfnOld =
  159. ORIGINAL_COM(IDirectDraw7, CreateSurface, pThis);
  160. if (SUCCEEDED(hReturn = (*pfnOld)(
  161. pThis,
  162. lpDDSurfaceDesc,
  163. lplpDDSurface,
  164. pUnkOuter)))
  165. {
  166. HookObject(
  167. NULL,
  168. IID_IDirectDrawSurface7,
  169. (PVOID*)lplpDDSurface,
  170. NULL,
  171. FALSE);
  172. }
  173. return hReturn;
  174. }
  175. /*++
  176. Get the DC
  177. --*/
  178. HRESULT
  179. COMHOOK(IDirectDrawSurface, GetDC)(
  180. LPDIRECTDRAWSURFACE lpDDSurface,
  181. HDC FAR *lphDC
  182. )
  183. {
  184. HRESULT hReturn;
  185. _pfn_IDirectDrawSurface_GetDC pfnOld =
  186. ORIGINAL_COM(IDirectDrawSurface, GetDC, (LPVOID) lpDDSurface);
  187. if (SUCCEEDED(hReturn = (*pfnOld)(
  188. lpDDSurface,
  189. lphDC)))
  190. {
  191. g_hDcLast = *lphDC;
  192. *lphDC = ALIASDC;
  193. DPFN( eDbgLevelWarning, "[Surface_GetDC] Acquired DC %08lx", g_hDcLast);
  194. }
  195. return hReturn;
  196. }
  197. /*++
  198. Get the DC
  199. --*/
  200. HRESULT
  201. COMHOOK(IDirectDrawSurface2, GetDC)(
  202. LPDIRECTDRAWSURFACE lpDDSurface,
  203. HDC FAR *lphDC
  204. )
  205. {
  206. HRESULT hReturn;
  207. _pfn_IDirectDrawSurface2_GetDC pfnOld =
  208. ORIGINAL_COM(IDirectDrawSurface2, GetDC, (LPVOID) lpDDSurface);
  209. if (SUCCEEDED(hReturn = (*pfnOld)(
  210. lpDDSurface,
  211. lphDC)))
  212. {
  213. g_hDcLast = *lphDC;
  214. *lphDC = ALIASDC;
  215. DPFN( eDbgLevelWarning, "[Surface_GetDC2] Acquired DC %08lx", g_hDcLast);
  216. }
  217. return hReturn;
  218. }
  219. /*++
  220. Get the DC
  221. --*/
  222. HRESULT
  223. COMHOOK(IDirectDrawSurface4, GetDC)(
  224. LPDIRECTDRAWSURFACE lpDDSurface,
  225. HDC FAR *lphDC
  226. )
  227. {
  228. HRESULT hReturn;
  229. _pfn_IDirectDrawSurface4_GetDC pfnOld =
  230. ORIGINAL_COM(IDirectDrawSurface4, GetDC, (LPVOID) lpDDSurface);
  231. if (SUCCEEDED(hReturn = (*pfnOld)(
  232. lpDDSurface,
  233. lphDC)))
  234. {
  235. g_hDcLast = *lphDC;
  236. *lphDC = ALIASDC;
  237. DPFN( eDbgLevelWarning, "[Surface_GetDC4] Acquired DC %08lx", g_hDcLast);
  238. }
  239. return hReturn;
  240. }
  241. /*++
  242. Get the DC
  243. --*/
  244. HRESULT
  245. COMHOOK(IDirectDrawSurface7, GetDC)(
  246. LPDIRECTDRAWSURFACE lpDDSurface,
  247. HDC FAR *lphDC
  248. )
  249. {
  250. HRESULT hReturn;
  251. _pfn_IDirectDrawSurface7_GetDC pfnOld =
  252. ORIGINAL_COM(IDirectDrawSurface7, GetDC, (LPVOID) lpDDSurface);
  253. if (SUCCEEDED(hReturn = (*pfnOld)(
  254. lpDDSurface,
  255. lphDC)))
  256. {
  257. g_hDcLast = *lphDC;
  258. *lphDC = ALIASDC;
  259. DPFN( eDbgLevelWarning, "[Surface_GetDC7] Acquired DC %08lx", g_hDcLast);
  260. }
  261. return hReturn;
  262. }
  263. /*++
  264. ReleaseDC the DC
  265. --*/
  266. HRESULT
  267. COMHOOK(IDirectDrawSurface, ReleaseDC)(
  268. LPDIRECTDRAWSURFACE lpDDSurface,
  269. HDC hDC
  270. )
  271. {
  272. HRESULT hReturn = DDERR_GENERIC;
  273. _pfn_IDirectDrawSurface_ReleaseDC pfnOld =
  274. ORIGINAL_COM(IDirectDrawSurface, ReleaseDC, (LPVOID) lpDDSurface);
  275. if (hDC == ALIASDC)
  276. {
  277. hDC = g_hDcLast;
  278. if (SUCCEEDED(hReturn = (*pfnOld)(lpDDSurface, hDC)))
  279. {
  280. DPFN( eDbgLevelWarning, "[Surface_ReleaseDC] Released DC %08lx", g_hDcLast);
  281. g_hDcLast = 0;
  282. }
  283. }
  284. else
  285. {
  286. hReturn = (*pfnOld)(lpDDSurface, hDC);
  287. }
  288. return hReturn;
  289. }
  290. /*++
  291. ReleaseDC the DC
  292. --*/
  293. HRESULT
  294. COMHOOK(IDirectDrawSurface2, ReleaseDC)(
  295. LPDIRECTDRAWSURFACE lpDDSurface,
  296. HDC hDC
  297. )
  298. {
  299. HRESULT hReturn = DDERR_GENERIC;
  300. _pfn_IDirectDrawSurface2_ReleaseDC pfnOld =
  301. ORIGINAL_COM(IDirectDrawSurface2, ReleaseDC, (LPVOID) lpDDSurface);
  302. if (hDC == ALIASDC)
  303. {
  304. hDC = g_hDcLast;
  305. if (SUCCEEDED(hReturn = (*pfnOld)(lpDDSurface, hDC)))
  306. {
  307. DPFN( eDbgLevelWarning, "[Surface_ReleaseDC2] Released DC %08lx", g_hDcLast);
  308. g_hDcLast = 0;
  309. }
  310. }
  311. else
  312. {
  313. hReturn = (*pfnOld)(lpDDSurface, hDC);
  314. }
  315. return hReturn;
  316. }
  317. /*++
  318. ReleaseDC the DC
  319. --*/
  320. HRESULT
  321. COMHOOK(IDirectDrawSurface4, ReleaseDC)(
  322. LPDIRECTDRAWSURFACE lpDDSurface,
  323. HDC hDC
  324. )
  325. {
  326. HRESULT hReturn = DDERR_GENERIC;
  327. _pfn_IDirectDrawSurface4_ReleaseDC pfnOld =
  328. ORIGINAL_COM(IDirectDrawSurface4, ReleaseDC, (LPVOID) lpDDSurface);
  329. if (hDC == ALIASDC)
  330. {
  331. hDC = g_hDcLast;
  332. if (SUCCEEDED(hReturn = (*pfnOld)(lpDDSurface, hDC)))
  333. {
  334. DPFN( eDbgLevelWarning, "[Surface_ReleaseDC4] Released DC %08lx", g_hDcLast);
  335. g_hDcLast = 0;
  336. }
  337. }
  338. else
  339. {
  340. hReturn = (*pfnOld)(lpDDSurface, hDC);
  341. }
  342. return hReturn;
  343. }
  344. /*++
  345. ReleaseDC the DC
  346. --*/
  347. HRESULT
  348. COMHOOK(IDirectDrawSurface7, ReleaseDC)(
  349. LPDIRECTDRAWSURFACE lpDDSurface,
  350. HDC hDC
  351. )
  352. {
  353. HRESULT hReturn = DDERR_GENERIC;
  354. _pfn_IDirectDrawSurface7_ReleaseDC pfnOld =
  355. ORIGINAL_COM(IDirectDrawSurface7, ReleaseDC, (LPVOID) lpDDSurface);
  356. if (hDC == ALIASDC)
  357. {
  358. hDC = g_hDcLast;
  359. if (SUCCEEDED(hReturn = (*pfnOld)(lpDDSurface, hDC)))
  360. {
  361. DPFN( eDbgLevelWarning, "[Surface_ReleaseDC7] Released DC %08lx", g_hDcLast);
  362. g_hDcLast = 0;
  363. }
  364. }
  365. else
  366. {
  367. hReturn = (*pfnOld)(lpDDSurface, hDC);
  368. }
  369. return hReturn;
  370. }
  371. /*++
  372. Unalias the DC.
  373. --*/
  374. BOOL
  375. APIHOOK(BitBlt)(
  376. HDC hdcDest,
  377. int nXDest,
  378. int nYDest,
  379. int nWidth,
  380. int nHeight,
  381. HDC hdcSrc,
  382. int nXSrc,
  383. int nYSrc,
  384. DWORD dwRop
  385. )
  386. {
  387. return ORIGINAL_API(BitBlt)(FixDC(hdcDest), nXDest, nYDest, nWidth,
  388. nHeight, FixDC(hdcSrc), nXSrc, nYSrc, dwRop);
  389. }
  390. HBITMAP
  391. APIHOOK(CreateDIBSection)(
  392. HDC hdc,
  393. CONST BITMAPINFO *pbmi,
  394. UINT iUsage,
  395. VOID *ppvBits,
  396. HANDLE hSection,
  397. DWORD dwOffset
  398. )
  399. {
  400. return ORIGINAL_API(CreateDIBSection)(FixDC(hdc), pbmi, iUsage, ppvBits, hSection,
  401. dwOffset);
  402. }
  403. BOOL
  404. APIHOOK(Ellipse)(
  405. HDC hdc,
  406. int nLeftRect,
  407. int nTopRect,
  408. int nRightRect,
  409. int nBottomRect
  410. )
  411. {
  412. return ORIGINAL_API(Ellipse)(FixDC(hdc), nLeftRect, nTopRect, nRightRect,
  413. nBottomRect);
  414. }
  415. HGDIOBJ
  416. APIHOOK(GetCurrentObject)(
  417. HDC hdc,
  418. UINT uObjectType
  419. )
  420. {
  421. return ORIGINAL_API(GetCurrentObject)(FixDC(hdc), uObjectType);
  422. }
  423. int
  424. APIHOOK(GetDeviceCaps)(
  425. HDC hdc,
  426. int nIndex
  427. )
  428. {
  429. return ORIGINAL_API(GetDeviceCaps)(FixDC(hdc), nIndex);
  430. }
  431. COLORREF
  432. APIHOOK(GetPixel)(
  433. HDC hdc,
  434. int XPos,
  435. int nYPos
  436. )
  437. {
  438. return ORIGINAL_API(GetPixel)(FixDC(hdc), XPos, nYPos);
  439. }
  440. COLORREF
  441. APIHOOK(SetPixel)(
  442. HDC hdc,
  443. int XPos,
  444. int nYPos,
  445. COLORREF crColor
  446. )
  447. {
  448. return ORIGINAL_API(SetPixel)(FixDC(hdc), XPos, nYPos, crColor);
  449. }
  450. UINT
  451. APIHOOK(GetSystemPaletteEntries)(
  452. HDC hdc,
  453. UINT iStartIndex,
  454. UINT nEntries,
  455. LPPALETTEENTRY lppe
  456. )
  457. {
  458. return ORIGINAL_API(GetSystemPaletteEntries)(FixDC(hdc), iStartIndex,
  459. nEntries, lppe);
  460. }
  461. BOOL
  462. APIHOOK(GetTextExtentPoint32A)(
  463. HDC hdc,
  464. LPCSTR lpString,
  465. int cbString,
  466. LPSIZE lpSize
  467. )
  468. {
  469. return ORIGINAL_API(GetTextExtentPoint32A)(FixDC(hdc), lpString, cbString, lpSize);
  470. }
  471. int
  472. APIHOOK(GetTextFaceA)(
  473. HDC hdc,
  474. int nCount,
  475. LPSTR lpFaceName
  476. )
  477. {
  478. return ORIGINAL_API(GetTextFaceA)(FixDC(hdc), nCount, lpFaceName);
  479. }
  480. BOOL
  481. APIHOOK(GetTextMetricsA)(
  482. HDC hdc,
  483. LPTEXTMETRICA lptm
  484. )
  485. {
  486. return ORIGINAL_API(GetTextMetricsA)(FixDC(hdc), lptm);
  487. }
  488. BOOL
  489. APIHOOK(LineTo)(
  490. HDC hdc,
  491. int nXEnd,
  492. int nYEnd
  493. )
  494. {
  495. return ORIGINAL_API(LineTo)(FixDC(hdc), nXEnd, nYEnd);
  496. }
  497. BOOL
  498. APIHOOK(MoveToEx)(
  499. HDC hdc,
  500. int X,
  501. int Y,
  502. LPPOINT lpPoint
  503. )
  504. {
  505. return ORIGINAL_API(MoveToEx)(FixDC(hdc), X, Y, lpPoint);
  506. }
  507. UINT
  508. APIHOOK(RealizePalette)(HDC hdc)
  509. {
  510. return ORIGINAL_API(RealizePalette)(FixDC(hdc));
  511. }
  512. BOOL
  513. APIHOOK(Rectangle)(
  514. HDC hdc,
  515. int nLeftRect,
  516. int nTopRect,
  517. int nRightRect,
  518. int nBottomRect
  519. )
  520. {
  521. return ORIGINAL_API(Rectangle)(FixDC(hdc), nLeftRect, nTopRect, nRightRect,
  522. nBottomRect);
  523. }
  524. HGDIOBJ
  525. APIHOOK(SelectObject)(
  526. HDC hdc,
  527. HGDIOBJ hgdiobj
  528. )
  529. {
  530. return ORIGINAL_API(SelectObject)(FixDC(hdc), hgdiobj);
  531. }
  532. HPALETTE
  533. APIHOOK(SelectPalette)(
  534. HDC hdc,
  535. HPALETTE hpal,
  536. BOOL bForceBackground
  537. )
  538. {
  539. return ORIGINAL_API(SelectPalette)(FixDC(hdc), hpal, bForceBackground);
  540. }
  541. UINT
  542. APIHOOK(SetDIBColorTable)(
  543. HDC hdc,
  544. UINT uStartIndex,
  545. UINT cEntries,
  546. CONST RGBQUAD *pColors
  547. )
  548. {
  549. return ORIGINAL_API(SetDIBColorTable)(FixDC(hdc), uStartIndex, cEntries,
  550. pColors);
  551. }
  552. int
  553. APIHOOK(SetStretchBltMode)(
  554. HDC hdc,
  555. int iStretchMode
  556. )
  557. {
  558. return ORIGINAL_API(SetStretchBltMode)(FixDC(hdc), iStretchMode);
  559. }
  560. UINT
  561. APIHOOK(SetSystemPaletteUse)(
  562. HDC hdc,
  563. UINT uUsage
  564. )
  565. {
  566. return ORIGINAL_API(SetSystemPaletteUse)(FixDC(hdc), uUsage);
  567. }
  568. BOOL
  569. APIHOOK(StretchBlt)(
  570. HDC hdcDest,
  571. int nXOriginDest,
  572. int nYOriginDest,
  573. int nWidthDest,
  574. int nHeightDest,
  575. HDC hdcSrc,
  576. int nXOriginSrc,
  577. int nYOriginSrc,
  578. int nWidthSrc,
  579. int nHeightSrc,
  580. DWORD dwRop
  581. )
  582. {
  583. return ORIGINAL_API(StretchBlt)(FixDC(hdcDest), nXOriginDest, nYOriginDest,
  584. nWidthDest, nHeightDest, FixDC(hdcSrc), nXOriginSrc, nYOriginSrc,
  585. nWidthSrc, nHeightSrc, dwRop);
  586. }
  587. int
  588. APIHOOK(StretchDIBits)(
  589. HDC hdc,
  590. int XDest,
  591. int YDest,
  592. int nDestWidth,
  593. int nDestHeight,
  594. int XSrc,
  595. int YSrc,
  596. int nSrcWidth,
  597. int nSrcHeight,
  598. CONST VOID *lpBits,
  599. CONST BITMAPINFO *lpBitsInfo,
  600. UINT iUsage,
  601. DWORD dwRop
  602. )
  603. {
  604. return ORIGINAL_API(StretchDIBits)(FixDC(hdc), XDest, YDest, nDestWidth,
  605. nDestHeight, XSrc, YSrc, nSrcWidth, nSrcHeight, lpBits, lpBitsInfo,
  606. iUsage, dwRop);
  607. }
  608. BOOL
  609. APIHOOK(TextOutA)(
  610. HDC hdc,
  611. int nXStart,
  612. int nYStart,
  613. LPCSTR lpString,
  614. int cbString
  615. )
  616. {
  617. return ORIGINAL_API(TextOutA)(FixDC(hdc), nXStart, nYStart, lpString, cbString);
  618. }
  619. /*++
  620. Register hooked functions
  621. --*/
  622. HOOK_BEGIN
  623. APIHOOK_ENTRY_DIRECTX_COMSERVER()
  624. COMHOOK_ENTRY(DirectDraw, IDirectDraw, CreateSurface, 6)
  625. COMHOOK_ENTRY(DirectDraw, IDirectDraw2, CreateSurface, 6)
  626. COMHOOK_ENTRY(DirectDraw, IDirectDraw4, CreateSurface, 6)
  627. COMHOOK_ENTRY(DirectDraw, IDirectDraw7, CreateSurface, 6)
  628. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface, GetDC, 17)
  629. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface2, GetDC, 17)
  630. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface4, GetDC, 17)
  631. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface7, GetDC, 17)
  632. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface, ReleaseDC, 26)
  633. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface2, ReleaseDC, 26)
  634. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface4, ReleaseDC, 26)
  635. COMHOOK_ENTRY(DirectDraw, IDirectDrawSurface7, ReleaseDC, 26)
  636. APIHOOK_ENTRY(GDI32.DLL, BitBlt)
  637. APIHOOK_ENTRY(GDI32.DLL, CreateDIBSection)
  638. APIHOOK_ENTRY(GDI32.DLL, Ellipse)
  639. APIHOOK_ENTRY(GDI32.DLL, GetCurrentObject)
  640. APIHOOK_ENTRY(GDI32.DLL, GetDeviceCaps)
  641. APIHOOK_ENTRY(GDI32.DLL, GetPixel)
  642. APIHOOK_ENTRY(GDI32.DLL, SetPixel)
  643. APIHOOK_ENTRY(GDI32.DLL, GetSystemPaletteEntries)
  644. APIHOOK_ENTRY(GDI32.DLL, GetTextExtentPoint32A)
  645. APIHOOK_ENTRY(GDI32.DLL, GetTextFaceA)
  646. APIHOOK_ENTRY(GDI32.DLL, GetTextMetricsA)
  647. APIHOOK_ENTRY(GDI32.DLL, LineTo)
  648. APIHOOK_ENTRY(GDI32.DLL, MoveToEx)
  649. APIHOOK_ENTRY(GDI32.DLL, RealizePalette)
  650. APIHOOK_ENTRY(GDI32.DLL, Rectangle)
  651. APIHOOK_ENTRY(GDI32.DLL, SelectObject)
  652. APIHOOK_ENTRY(GDI32.DLL, SelectPalette)
  653. APIHOOK_ENTRY(GDI32.DLL, SetDIBColorTable)
  654. APIHOOK_ENTRY(GDI32.DLL, SetStretchBltMode)
  655. APIHOOK_ENTRY(GDI32.DLL, SetSystemPaletteUse)
  656. APIHOOK_ENTRY(GDI32.DLL, StretchBlt)
  657. APIHOOK_ENTRY(GDI32.DLL, StretchDIBits)
  658. APIHOOK_ENTRY(GDI32.DLL, TextOutA)
  659. HOOK_END
  660. IMPLEMENT_SHIM_END