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.

1062 lines
21 KiB

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright 1998 - 2003 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: DDIHook.cpp
  9. //
  10. //
  11. // PURPOSE: DDI Hook routines for User Mode COM Customization DLL.
  12. //
  13. //
  14. // Functions:
  15. //
  16. //
  17. //
  18. //
  19. // PLATFORMS: Windows 2000, Windows XP, Windows Server 2003
  20. //
  21. //
  22. #include "precomp.h"
  23. #include "debug.h"
  24. #include "oemps.h"
  25. // StrSafe.h needs to be included last
  26. // to disallow bad string functions.
  27. #include <STRSAFE.H>
  28. //
  29. // OEMBitBlt
  30. //
  31. BOOL APIENTRY
  32. OEMBitBlt(
  33. SURFOBJ *psoTrg,
  34. SURFOBJ *psoSrc,
  35. SURFOBJ *psoMask,
  36. CLIPOBJ *pco,
  37. XLATEOBJ *pxlo,
  38. RECTL *prclTrg,
  39. POINTL *pptlSrc,
  40. POINTL *pptlMask,
  41. BRUSHOBJ *pbo,
  42. POINTL *pptlBrush,
  43. ROP4 rop4
  44. )
  45. {
  46. PDEVOBJ pdevobj;
  47. POEMPDEV poempdev;
  48. VERBOSE(DLLTEXT("OEMBitBlt() entry.\r\n"));
  49. pdevobj = (PDEVOBJ)psoTrg->dhpdev;
  50. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  51. //
  52. // turn around to call PS
  53. //
  54. return (((PFN_DrvBitBlt)(poempdev->pfnPS[UD_DrvBitBlt])) (
  55. psoTrg,
  56. psoSrc,
  57. psoMask,
  58. pco,
  59. pxlo,
  60. prclTrg,
  61. pptlSrc,
  62. pptlMask,
  63. pbo,
  64. pptlBrush,
  65. rop4));
  66. }
  67. //
  68. // OEMStretchBlt
  69. //
  70. BOOL APIENTRY
  71. OEMStretchBlt(
  72. SURFOBJ *psoDest,
  73. SURFOBJ *psoSrc,
  74. SURFOBJ *psoMask,
  75. CLIPOBJ *pco,
  76. XLATEOBJ *pxlo,
  77. COLORADJUSTMENT *pca,
  78. POINTL *pptlHTOrg,
  79. RECTL *prclDest,
  80. RECTL *prclSrc,
  81. POINTL *pptlMask,
  82. ULONG iMode
  83. )
  84. {
  85. PDEVOBJ pdevobj;
  86. POEMPDEV poempdev;
  87. VERBOSE(DLLTEXT("OEMStretchBlt() entry.\r\n"));
  88. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  89. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  90. //
  91. // turn around to call PS
  92. //
  93. return (((PFN_DrvStretchBlt)(poempdev->pfnPS[UD_DrvStretchBlt])) (
  94. psoDest,
  95. psoSrc,
  96. psoMask,
  97. pco,
  98. pxlo,
  99. pca,
  100. pptlHTOrg,
  101. prclDest,
  102. prclSrc,
  103. pptlMask,
  104. iMode));
  105. }
  106. //
  107. // OEMCopyBits
  108. //
  109. BOOL APIENTRY
  110. OEMCopyBits(
  111. SURFOBJ *psoDest,
  112. SURFOBJ *psoSrc,
  113. CLIPOBJ *pco,
  114. XLATEOBJ *pxlo,
  115. RECTL *prclDest,
  116. POINTL *pptlSrc
  117. )
  118. {
  119. PDEVOBJ pdevobj;
  120. POEMPDEV poempdev;
  121. VERBOSE(DLLTEXT("OEMCopyBits() entry.\r\n"));
  122. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  123. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  124. //
  125. // turn around to call PS
  126. //
  127. return (((PFN_DrvCopyBits)(poempdev->pfnPS[UD_DrvCopyBits])) (
  128. psoDest,
  129. psoSrc,
  130. pco,
  131. pxlo,
  132. prclDest,
  133. pptlSrc));
  134. }
  135. //
  136. // OEMTextOut
  137. //
  138. BOOL APIENTRY
  139. OEMTextOut(
  140. SURFOBJ *pso,
  141. STROBJ *pstro,
  142. FONTOBJ *pfo,
  143. CLIPOBJ *pco,
  144. RECTL *prclExtra,
  145. RECTL *prclOpaque,
  146. BRUSHOBJ *pboFore,
  147. BRUSHOBJ *pboOpaque,
  148. POINTL *pptlOrg,
  149. MIX mix
  150. )
  151. {
  152. PDEVOBJ pdevobj;
  153. POEMPDEV poempdev;
  154. VERBOSE(DLLTEXT("OEMTextOut() entry.\r\n"));
  155. pdevobj = (PDEVOBJ)pso->dhpdev;
  156. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  157. //
  158. // turn around to call PS
  159. //
  160. return (((PFN_DrvTextOut)(poempdev->pfnPS[UD_DrvTextOut])) (
  161. pso,
  162. pstro,
  163. pfo,
  164. pco,
  165. prclExtra,
  166. prclOpaque,
  167. pboFore,
  168. pboOpaque,
  169. pptlOrg,
  170. mix));
  171. }
  172. //
  173. // OEMStrokePath
  174. //
  175. BOOL APIENTRY
  176. OEMStrokePath(
  177. SURFOBJ *pso,
  178. PATHOBJ *ppo,
  179. CLIPOBJ *pco,
  180. XFORMOBJ *pxo,
  181. BRUSHOBJ *pbo,
  182. POINTL *pptlBrushOrg,
  183. LINEATTRS *plineattrs,
  184. MIX mix
  185. )
  186. {
  187. PDEVOBJ pdevobj;
  188. POEMPDEV poempdev;
  189. VERBOSE(DLLTEXT("OEMStokePath() entry.\r\n"));
  190. pdevobj = (PDEVOBJ)pso->dhpdev;
  191. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  192. //
  193. // turn around to call PS
  194. //
  195. return (((PFN_DrvStrokePath)(poempdev->pfnPS[UD_DrvStrokePath])) (
  196. pso,
  197. ppo,
  198. pco,
  199. pxo,
  200. pbo,
  201. pptlBrushOrg,
  202. plineattrs,
  203. mix));
  204. }
  205. //
  206. // OEMFillPath
  207. //
  208. BOOL APIENTRY
  209. OEMFillPath(
  210. SURFOBJ *pso,
  211. PATHOBJ *ppo,
  212. CLIPOBJ *pco,
  213. BRUSHOBJ *pbo,
  214. POINTL *pptlBrushOrg,
  215. MIX mix,
  216. FLONG flOptions
  217. )
  218. {
  219. PDEVOBJ pdevobj;
  220. POEMPDEV poempdev;
  221. VERBOSE(DLLTEXT("OEMFillPath() entry.\r\n"));
  222. pdevobj = (PDEVOBJ)pso->dhpdev;
  223. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  224. //
  225. // turn around to call PS
  226. //
  227. return (((PFN_DrvFillPath)(poempdev->pfnPS[UD_DrvFillPath])) (
  228. pso,
  229. ppo,
  230. pco,
  231. pbo,
  232. pptlBrushOrg,
  233. mix,
  234. flOptions));
  235. }
  236. //
  237. // OEMStrokeAndFillPath
  238. //
  239. BOOL APIENTRY
  240. OEMStrokeAndFillPath(
  241. SURFOBJ *pso,
  242. PATHOBJ *ppo,
  243. CLIPOBJ *pco,
  244. XFORMOBJ *pxo,
  245. BRUSHOBJ *pboStroke,
  246. LINEATTRS *plineattrs,
  247. BRUSHOBJ *pboFill,
  248. POINTL *pptlBrushOrg,
  249. MIX mixFill,
  250. FLONG flOptions
  251. )
  252. {
  253. PDEVOBJ pdevobj;
  254. POEMPDEV poempdev;
  255. VERBOSE(DLLTEXT("OEMStrokeAndFillPath() entry.\r\n"));
  256. pdevobj = (PDEVOBJ)pso->dhpdev;
  257. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  258. //
  259. // turn around to call PS
  260. //
  261. return (((PFN_DrvStrokeAndFillPath)(poempdev->pfnPS[UD_DrvStrokeAndFillPath])) (
  262. pso,
  263. ppo,
  264. pco,
  265. pxo,
  266. pboStroke,
  267. plineattrs,
  268. pboFill,
  269. pptlBrushOrg,
  270. mixFill,
  271. flOptions));
  272. }
  273. //
  274. // OEMRealizeBrush
  275. //
  276. BOOL APIENTRY
  277. OEMRealizeBrush(
  278. BRUSHOBJ *pbo,
  279. SURFOBJ *psoTarget,
  280. SURFOBJ *psoPattern,
  281. SURFOBJ *psoMask,
  282. XLATEOBJ *pxlo,
  283. ULONG iHatch
  284. )
  285. {
  286. PDEVOBJ pdevobj;
  287. POEMPDEV poempdev;
  288. VERBOSE(DLLTEXT("OEMRealizeBrush() entry.\r\n"));
  289. pdevobj = (PDEVOBJ)psoTarget->dhpdev;
  290. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  291. //
  292. // the OEM DLL should NOT hook out this function unless it wants to draw
  293. // graphics directly to the device surface. In that case, it calls
  294. // EngRealizeBrush which causes GDI to call DrvRealizeBrush.
  295. // Note that it cannot call back into PS since PS doesn't hook it.
  296. //
  297. //
  298. // In this test DLL, the drawing hooks does not call EngRealizeBrush. So this
  299. // this function will never be called. Do nothing.
  300. //
  301. return TRUE;
  302. }
  303. //
  304. // OEMStartPage
  305. //
  306. BOOL APIENTRY
  307. OEMStartPage(
  308. SURFOBJ *pso
  309. )
  310. {
  311. PDEVOBJ pdevobj;
  312. POEMPDEV poempdev;
  313. VERBOSE(DLLTEXT("OEMStartPage() entry.\r\n"));
  314. pdevobj = (PDEVOBJ)pso->dhpdev;
  315. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  316. //
  317. // turn around to call PS
  318. //
  319. return (((PFN_DrvStartPage)(poempdev->pfnPS[UD_DrvStartPage]))(pso));
  320. }
  321. #define OEM_TESTSTRING "The DDICMDCB DLL adds this line of text."
  322. //
  323. // OEMSendPage
  324. //
  325. BOOL APIENTRY
  326. OEMSendPage(
  327. SURFOBJ *pso
  328. )
  329. {
  330. PDEVOBJ pdevobj;
  331. POEMPDEV poempdev;
  332. VERBOSE(DLLTEXT("OEMSendPage() entry.\r\n"));
  333. pdevobj = (PDEVOBJ)pso->dhpdev;
  334. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  335. //
  336. // print a line of text, just for testing
  337. //
  338. if (pso->iType == STYPE_BITMAP)
  339. {
  340. pdevobj->pDrvProcs->DrvXMoveTo(pdevobj, 0, 0);
  341. pdevobj->pDrvProcs->DrvYMoveTo(pdevobj, 0, 0);
  342. pdevobj->pDrvProcs->DrvWriteSpoolBuf(pdevobj, OEM_TESTSTRING,
  343. sizeof(OEM_TESTSTRING));
  344. }
  345. //
  346. // turn around to call PS
  347. //
  348. return (((PFN_DrvSendPage)(poempdev->pfnPS[UD_DrvSendPage]))(pso));
  349. }
  350. //
  351. // OEMEscape
  352. //
  353. ULONG APIENTRY
  354. OEMEscape(
  355. SURFOBJ *pso,
  356. ULONG iEsc,
  357. ULONG cjIn,
  358. PVOID pvIn,
  359. ULONG cjOut,
  360. PVOID pvOut
  361. )
  362. {
  363. PDEVOBJ pdevobj;
  364. POEMPDEV poempdev;
  365. VERBOSE(DLLTEXT("OEMEscape() entry.\r\n"));
  366. pdevobj = (PDEVOBJ)pso->dhpdev;
  367. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  368. //
  369. // turn around to call PS
  370. //
  371. return (((PFN_DrvEscape)(poempdev->pfnPS[UD_DrvEscape])) (
  372. pso,
  373. iEsc,
  374. cjIn,
  375. pvIn,
  376. cjOut,
  377. pvOut));
  378. }
  379. //
  380. // OEMStartDoc
  381. //
  382. BOOL APIENTRY
  383. OEMStartDoc(
  384. SURFOBJ *pso,
  385. PWSTR pwszDocName,
  386. DWORD dwJobId
  387. )
  388. {
  389. PDEVOBJ pdevobj;
  390. POEMPDEV poempdev;
  391. VERBOSE(DLLTEXT("OEMStartDoc() entry.\r\n"));
  392. pdevobj = (PDEVOBJ)pso->dhpdev;
  393. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  394. //
  395. // turn around to call PS
  396. //
  397. return (((PFN_DrvStartDoc)(poempdev->pfnPS[UD_DrvStartDoc])) (
  398. pso,
  399. pwszDocName,
  400. dwJobId));
  401. }
  402. //
  403. // OEMEndDoc
  404. //
  405. BOOL APIENTRY
  406. OEMEndDoc(
  407. SURFOBJ *pso,
  408. FLONG fl
  409. )
  410. {
  411. PDEVOBJ pdevobj;
  412. POEMPDEV poempdev;
  413. VERBOSE(DLLTEXT("OEMEndDoc() entry.\r\n"));
  414. pdevobj = (PDEVOBJ)pso->dhpdev;
  415. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  416. //
  417. // turn around to call PS
  418. //
  419. return (((PFN_DrvEndDoc)(poempdev->pfnPS[UD_DrvEndDoc])) (
  420. pso,
  421. fl));
  422. }
  423. ////////
  424. // NOTE:
  425. // OEM DLL needs to hook out the following six font related DDI calls only
  426. // if it enumerates additional fonts beyond what's in the GPD file.
  427. // And if it does, it needs to take care of its own fonts for all font DDI
  428. // calls and DrvTextOut call.
  429. ///////
  430. //
  431. // OEMQueryFont
  432. //
  433. PIFIMETRICS APIENTRY
  434. OEMQueryFont(
  435. DHPDEV dhpdev,
  436. ULONG_PTR iFile,
  437. ULONG iFace,
  438. ULONG_PTR *pid
  439. )
  440. {
  441. PDEVOBJ pdevobj;
  442. POEMPDEV poempdev;
  443. VERBOSE(DLLTEXT("OEMQueryFont() entry.\r\n"));
  444. pdevobj = (PDEVOBJ)dhpdev;
  445. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  446. //
  447. // turn around to call PS
  448. //
  449. return (((PFN_DrvQueryFont)(poempdev->pfnPS[UD_DrvQueryFont])) (
  450. dhpdev,
  451. iFile,
  452. iFace,
  453. pid));
  454. }
  455. //
  456. // OEMQueryFontTree
  457. //
  458. PVOID APIENTRY
  459. OEMQueryFontTree(
  460. DHPDEV dhpdev,
  461. ULONG_PTR iFile,
  462. ULONG iFace,
  463. ULONG iMode,
  464. ULONG_PTR *pid
  465. )
  466. {
  467. PDEVOBJ pdevobj;
  468. POEMPDEV poempdev;
  469. VERBOSE(DLLTEXT("OEMQueryFontTree() entry.\r\n"));
  470. pdevobj = (PDEVOBJ)dhpdev;
  471. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  472. //
  473. // turn around to call PS
  474. //
  475. return (((PFN_DrvQueryFontTree)(poempdev->pfnPS[UD_DrvQueryFontTree])) (
  476. dhpdev,
  477. iFile,
  478. iFace,
  479. iMode,
  480. pid));
  481. }
  482. //
  483. // OEMQueryFontData
  484. //
  485. LONG APIENTRY
  486. OEMQueryFontData(
  487. DHPDEV dhpdev,
  488. FONTOBJ *pfo,
  489. ULONG iMode,
  490. HGLYPH hg,
  491. GLYPHDATA *pgd,
  492. PVOID pv,
  493. ULONG cjSize
  494. )
  495. {
  496. PDEVOBJ pdevobj;
  497. POEMPDEV poempdev;
  498. VERBOSE(DLLTEXT("OEMQueryFontData() entry.\r\n"));
  499. pdevobj = (PDEVOBJ)dhpdev;
  500. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  501. //
  502. // turn around to call PS if this is not the font that OEM enumerated.
  503. //
  504. return (((PFN_DrvQueryFontData)(poempdev->pfnPS[UD_DrvQueryFontData])) (
  505. dhpdev,
  506. pfo,
  507. iMode,
  508. hg,
  509. pgd,
  510. pv,
  511. cjSize));
  512. }
  513. //
  514. // OEMQueryAdvanceWidths
  515. //
  516. BOOL APIENTRY
  517. OEMQueryAdvanceWidths(
  518. DHPDEV dhpdev,
  519. FONTOBJ *pfo,
  520. ULONG iMode,
  521. HGLYPH *phg,
  522. PVOID pvWidths,
  523. ULONG cGlyphs
  524. )
  525. {
  526. PDEVOBJ pdevobj;
  527. POEMPDEV poempdev;
  528. VERBOSE(DLLTEXT("OEMQueryAdvanceWidths() entry.\r\n"));
  529. pdevobj = (PDEVOBJ)dhpdev;
  530. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  531. //
  532. // turn around to call PS if this is not the font that OEM enumerated.
  533. //
  534. return (((PFN_DrvQueryAdvanceWidths)
  535. (poempdev->pfnPS[UD_DrvQueryAdvanceWidths])) (
  536. dhpdev,
  537. pfo,
  538. iMode,
  539. phg,
  540. pvWidths,
  541. cGlyphs));
  542. }
  543. //
  544. // OEMFontManagement
  545. //
  546. ULONG APIENTRY
  547. OEMFontManagement(
  548. SURFOBJ *pso,
  549. FONTOBJ *pfo,
  550. ULONG iMode,
  551. ULONG cjIn,
  552. PVOID pvIn,
  553. ULONG cjOut,
  554. PVOID pvOut
  555. )
  556. {
  557. PDEVOBJ pdevobj;
  558. POEMPDEV poempdev;
  559. VERBOSE(DLLTEXT("OEMFontManagement() entry.\r\n"));
  560. //
  561. // Note that PS will not call OEM DLL for iMode==QUERYESCSUPPORT.
  562. // So pso is not NULL for sure.
  563. //
  564. pdevobj = (PDEVOBJ)pso->dhpdev;
  565. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  566. //
  567. // turn around to call PS if this is not the font that OEM enumerated.
  568. //
  569. return (((PFN_DrvFontManagement)(poempdev->pfnPS[UD_DrvFontManagement])) (
  570. pso,
  571. pfo,
  572. iMode,
  573. cjIn,
  574. pvIn,
  575. cjOut,
  576. pvOut));
  577. }
  578. //
  579. // OEMGetGlyphMode
  580. //
  581. ULONG APIENTRY
  582. OEMGetGlyphMode(
  583. DHPDEV dhpdev,
  584. FONTOBJ *pfo
  585. )
  586. {
  587. PDEVOBJ pdevobj;
  588. POEMPDEV poempdev;
  589. VERBOSE(DLLTEXT("OEMGetGlyphMode() entry.\r\n"));
  590. pdevobj = (PDEVOBJ)dhpdev;
  591. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  592. //
  593. // turn around to call PS if this is not the font that OEM enumerated.
  594. //
  595. return (((PFN_DrvGetGlyphMode)(poempdev->pfnPS[UD_DrvGetGlyphMode])) (
  596. dhpdev,
  597. pfo));
  598. }
  599. //
  600. // OEMStretchBltROP
  601. //
  602. BOOL APIENTRY
  603. OEMStretchBltROP(
  604. SURFOBJ *psoDest,
  605. SURFOBJ *psoSrc,
  606. SURFOBJ *psoMask,
  607. CLIPOBJ *pco,
  608. XLATEOBJ *pxlo,
  609. COLORADJUSTMENT *pca,
  610. POINTL *pptlHTOrg,
  611. RECTL *prclDest,
  612. RECTL *prclSrc,
  613. POINTL *pptlMask,
  614. ULONG iMode,
  615. BRUSHOBJ *pbo,
  616. ROP4 rop4
  617. )
  618. {
  619. PDEVOBJ pdevobj;
  620. POEMPDEV poempdev;
  621. VERBOSE(DLLTEXT("OEMStretchBltROP() entry.\r\n"));
  622. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  623. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  624. //
  625. // turn around to call PS
  626. //
  627. return (((PFN_DrvStretchBltROP)(poempdev->pfnPS[UD_DrvStretchBltROP])) (
  628. psoDest,
  629. psoSrc,
  630. psoMask,
  631. pco,
  632. pxlo,
  633. pca,
  634. pptlHTOrg,
  635. prclDest,
  636. prclSrc,
  637. pptlMask,
  638. iMode,
  639. pbo,
  640. rop4
  641. ));
  642. }
  643. //
  644. // OEMPlgBlt
  645. //
  646. BOOL APIENTRY
  647. OEMPlgBlt(
  648. SURFOBJ *psoDst,
  649. SURFOBJ *psoSrc,
  650. SURFOBJ *psoMask,
  651. CLIPOBJ *pco,
  652. XLATEOBJ *pxlo,
  653. COLORADJUSTMENT *pca,
  654. POINTL *pptlBrushOrg,
  655. POINTFIX *pptfixDest,
  656. RECTL *prclSrc,
  657. POINTL *pptlMask,
  658. ULONG iMode
  659. )
  660. {
  661. PDEVOBJ pdevobj;
  662. POEMPDEV poempdev;
  663. VERBOSE(DLLTEXT("OEMPlgBlt() entry.\r\n"));
  664. pdevobj = (PDEVOBJ)psoDst->dhpdev;
  665. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  666. //
  667. // turn around to call PS
  668. //
  669. return (((PFN_DrvPlgBlt)(poempdev->pfnPS[UD_DrvPlgBlt])) (
  670. psoDst,
  671. psoSrc,
  672. psoMask,
  673. pco,
  674. pxlo,
  675. pca,
  676. pptlBrushOrg,
  677. pptfixDest,
  678. prclSrc,
  679. pptlMask,
  680. iMode));
  681. }
  682. //
  683. // OEMAlphaBlend
  684. //
  685. BOOL APIENTRY
  686. OEMAlphaBlend(
  687. SURFOBJ *psoDest,
  688. SURFOBJ *psoSrc,
  689. CLIPOBJ *pco,
  690. XLATEOBJ *pxlo,
  691. RECTL *prclDest,
  692. RECTL *prclSrc,
  693. BLENDOBJ *pBlendObj
  694. )
  695. {
  696. PDEVOBJ pdevobj;
  697. POEMPDEV poempdev;
  698. VERBOSE(DLLTEXT("OEMAlphaBlend() entry.\r\n"));
  699. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  700. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  701. //
  702. // turn around to call PS
  703. //
  704. return (((PFN_DrvAlphaBlend)(poempdev->pfnPS[UD_DrvAlphaBlend])) (
  705. psoDest,
  706. psoSrc,
  707. pco,
  708. pxlo,
  709. prclDest,
  710. prclSrc,
  711. pBlendObj
  712. ));
  713. }
  714. //
  715. // OEMGradientFill
  716. //
  717. BOOL APIENTRY
  718. OEMGradientFill(
  719. SURFOBJ *psoDest,
  720. CLIPOBJ *pco,
  721. XLATEOBJ *pxlo,
  722. TRIVERTEX *pVertex,
  723. ULONG nVertex,
  724. PVOID pMesh,
  725. ULONG nMesh,
  726. RECTL *prclExtents,
  727. POINTL *pptlDitherOrg,
  728. ULONG ulMode
  729. )
  730. {
  731. PDEVOBJ pdevobj;
  732. POEMPDEV poempdev;
  733. VERBOSE(DLLTEXT("OEMGradientFill() entry.\r\n"));
  734. pdevobj = (PDEVOBJ)psoDest->dhpdev;
  735. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  736. //
  737. // turn around to call PS
  738. //
  739. return (((PFN_DrvGradientFill)(poempdev->pfnPS[UD_DrvGradientFill])) (
  740. psoDest,
  741. pco,
  742. pxlo,
  743. pVertex,
  744. nVertex,
  745. pMesh,
  746. nMesh,
  747. prclExtents,
  748. pptlDitherOrg,
  749. ulMode
  750. ));
  751. }
  752. BOOL APIENTRY
  753. OEMTransparentBlt(
  754. SURFOBJ *psoDst,
  755. SURFOBJ *psoSrc,
  756. CLIPOBJ *pco,
  757. XLATEOBJ *pxlo,
  758. RECTL *prclDst,
  759. RECTL *prclSrc,
  760. ULONG iTransColor,
  761. ULONG ulReserved
  762. )
  763. {
  764. PDEVOBJ pdevobj;
  765. POEMPDEV poempdev;
  766. VERBOSE(DLLTEXT("OEMTransparentBlt() entry.\r\n"));
  767. pdevobj = (PDEVOBJ)psoDst->dhpdev;
  768. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  769. //
  770. // turn around to call PS
  771. //
  772. return (((PFN_DrvTransparentBlt)(poempdev->pfnPS[UD_DrvTransparentBlt])) (
  773. psoDst,
  774. psoSrc,
  775. pco,
  776. pxlo,
  777. prclDst,
  778. prclSrc,
  779. iTransColor,
  780. ulReserved
  781. ));
  782. }
  783. HANDLE APIENTRY
  784. OEMIcmCreateColorTransform(
  785. DHPDEV dhpdev,
  786. LPLOGCOLORSPACEW pLogColorSpace,
  787. PVOID pvSourceProfile,
  788. ULONG cjSourceProfile,
  789. PVOID pvDestProfile,
  790. ULONG cjDestProfile,
  791. PVOID pvTargetProfile,
  792. ULONG cjTargetProfile,
  793. DWORD dwReserved
  794. )
  795. {
  796. PDEVOBJ pdevobj;
  797. POEMPDEV poempdev;
  798. VERBOSE(DLLTEXT("OEMCreateColorTransform() entry.\r\n"));
  799. pdevobj = (PDEVOBJ)dhpdev;
  800. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  801. //
  802. // turn around to call PS
  803. //
  804. return (((PFN_DrvIcmCreateColorTransform)(poempdev->pfnPS[UD_DrvIcmCreateColorTransform])) (
  805. dhpdev,
  806. pLogColorSpace,
  807. pvSourceProfile,
  808. cjSourceProfile,
  809. pvDestProfile,
  810. cjDestProfile,
  811. pvTargetProfile,
  812. cjTargetProfile,
  813. dwReserved
  814. ));
  815. }
  816. BOOL APIENTRY
  817. OEMIcmDeleteColorTransform(
  818. DHPDEV dhpdev,
  819. HANDLE hcmXform
  820. )
  821. {
  822. PDEVOBJ pdevobj;
  823. POEMPDEV poempdev;
  824. VERBOSE(DLLTEXT("OEMDeleteColorTransform() entry.\r\n"));
  825. pdevobj = (PDEVOBJ)dhpdev;
  826. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  827. //
  828. // turn around to call PS
  829. //
  830. return (((PFN_DrvIcmDeleteColorTransform)(poempdev->pfnPS[UD_DrvIcmDeleteColorTransform])) (
  831. dhpdev,
  832. hcmXform
  833. ));
  834. }
  835. BOOL APIENTRY
  836. OEMQueryDeviceSupport(
  837. SURFOBJ *pso,
  838. XLATEOBJ *pxlo,
  839. XFORMOBJ *pxo,
  840. ULONG iType,
  841. ULONG cjIn,
  842. PVOID pvIn,
  843. ULONG cjOut,
  844. PVOID pvOut
  845. )
  846. {
  847. PDEVOBJ pdevobj;
  848. POEMPDEV poempdev;
  849. VERBOSE(DLLTEXT("OEMQueryDeviceSupport() entry.\r\n"));
  850. pdevobj = (PDEVOBJ)pso->dhpdev;
  851. poempdev = (POEMPDEV)pdevobj->pdevOEM;
  852. //
  853. // turn around to call PS
  854. //
  855. return (((PFN_DrvQueryDeviceSupport)(poempdev->pfnPS[UD_DrvQueryDeviceSupport])) (
  856. pso,
  857. pxlo,
  858. pxo,
  859. iType,
  860. cjIn,
  861. pvIn,
  862. cjOut,
  863. pvOut
  864. ));
  865. }