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.

90 lines
2.5 KiB

  1. #ifndef _PDEV_H
  2. #define _PDEV_H
  3. #include <minidrv.h>
  4. #include <stdio.h>
  5. #include <prcomoem.h>
  6. //
  7. // OEM Signature and version.
  8. //
  9. #define OEM_SIGNATURE 'CPPL' // CASIO CAPPL/B
  10. #define DLLTEXT(s) "CPPL: " s
  11. #define OEM_VERSION 0x00010000L
  12. #define VALID_PDEVOBJ(pdevobj) \
  13. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  14. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  15. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  16. //
  17. // ASSERT_VALID_PDEVOBJ can be used to verify the passed in "pdevobj". However,
  18. // it does NOT check "pdevOEM" and "pOEMDM" fields since not all OEM DLL's create
  19. // their own pdevice structure or need their own private devmode. If a particular
  20. // OEM DLL does need them, additional checks should be added. For example, if
  21. // an OEM DLL needs a private pdevice structure, then it should use
  22. // ASSERT(VALID_PDEVOBJ(pdevobj) && pdevobj->pdevOEM && ...)
  23. //
  24. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  25. // Debug text.
  26. #define ERRORTEXT(s) "ERROR " s
  27. ////////////////////////////////////////////////////////
  28. // OEM UD Type Defines
  29. ////////////////////////////////////////////////////////
  30. // For Cappl/Bace
  31. typedef struct tag_CPPL_EXTRADATA {
  32. OEM_DMEXTRAHEADER dmExtraHdr;
  33. } CPPL_EXTRADATA, *PCPPL_EXTRADATA;
  34. typedef struct {
  35. DWORD dwGeneral;
  36. SHORT sRes;
  37. BYTE jModel;
  38. struct st_cmd {
  39. char *cmd;
  40. WORD cmdlen;
  41. } cmdPaperSize;
  42. BYTE jFreePaper; // Yes(1). No(0)
  43. struct st_fps {
  44. WORD wX;
  45. WORD wY;
  46. WORD wXmm;
  47. WORD wYmm;
  48. } stFreePaperSize;
  49. BYTE jMPFSetting;
  50. BYTE jAutoSelect;
  51. WORD wOldX;
  52. WORD wOldY;
  53. } MYPDEV, *PMYPDEV;
  54. #define FG_HAS_EMUL 0x00000001
  55. #define MINIPDEV_DATA(p) ((p)->pdevOEM)
  56. #define POEMUD_EXTRADATA PCPPL_EXTRADATA
  57. #define OEMUD_EXTRADATA CPPL_EXTRADATA
  58. // Value for byModel
  59. #define MD_CP2000 0x00
  60. #define MD_CP3000 0x01
  61. // Value for byMPFSetting
  62. #define MPF_NOSET 0x00
  63. #define MPF_A3 0x01
  64. #define MPF_B4 0x02
  65. #define MPF_A4 0x03
  66. #define MPF_B5 0x04
  67. #define MPF_LETTER 0x05
  68. #define MPF_POSTCARD 0x06
  69. #define MPF_A5 0x07
  70. extern BOOL BInitOEMExtraData(POEMUD_EXTRADATA pOEMExtra);
  71. extern BMergeOEMExtraData(POEMUD_EXTRADATA pdmIn, POEMUD_EXTRADATA pdmOut);
  72. #endif // _PDEV_H