winprint.h
上传用户:yuandong
上传日期:2022-08-08
资源大小:954k
文件大小:2k
源码类别:

Delphi控件源码

开发平台:

C++ Builder

  1. /*++
  2. Copyright (c) 1990-1998  Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5.    winprint.h
  6. --*/
  7. // for driver related defines and typedefs
  8. #include <winddiui.h>
  9. typedef struct _PRINTPROCESSORDATA {
  10.     DWORD   signature;
  11.     DWORD   cb;
  12.     struct _PRINTPROCESSORDATA *pNext;
  13.     DWORD   fsStatus;
  14.     HANDLE  semPaused;
  15.     DWORD   uDatatype;
  16.     HANDLE  hPrinter;
  17.     LPWSTR  pPrinterName;
  18.     LPWSTR  pDocument;
  19.     LPWSTR  pOutputFile;
  20.     LPWSTR  pDatatype;
  21.     LPWSTR  pParameters;
  22.     DWORD   JobId;
  23.     DWORD   Copies;         /** Number of copies to print **/
  24.     DWORD   TabSize;
  25.     HDC     hDC;
  26.     DEVMODEW *pDevmode;
  27.     LPWSTR  pPrinterNameFromOpenData;
  28. } PRINTPROCESSORDATA, *PPRINTPROCESSORDATA;
  29. #define PRINTPROCESSORDATA_SIGNATURE    0x5051  /* 'QP' is the signature value */
  30. /* Define flags for fsStatus field */
  31. #define PRINTPROCESSOR_ABORTED      0x0001
  32. #define PRINTPROCESSOR_CLOSED       0x0004
  33. #define PRINTPROCESSOR_PAUSED       0x0008
  34. #define PRINTPROCESSOR_RESERVED     0xFFF8
  35. /** Flags used for the GetKey routing **/
  36. #define VALUE_STRING    0x01
  37. #define VALUE_ULONG     0x02
  38. /** Buffer sizes we'll use **/
  39. #define READ_BUFFER_SIZE            4096
  40. #define BASE_PRINTER_BUFFER_SIZE    2048
  41. PPRINTPROCESSORDATA
  42. ValidateHandle(
  43.     HANDLE  hPrintProcessor
  44. );
  45. /** Data types we support **/
  46. #define PRINTPROCESSOR_TYPE_RAW         0
  47. #define PRINTPROCESSOR_TYPE_EMF_50_1    1
  48. #define PRINTPROCESSOR_TYPE_EMF_50_2    2
  49. #define PRINTPROCESSOR_TYPE_EMF_50_3    3
  50. #define PRINTPROCESSOR_TYPE_TEXT        4