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.

101 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1992,1993 Microsoft Corporation
  3. Module Name:
  4. psexe.h
  5. Abstract:
  6. This module defines the items required by the main component of pstodib,
  7. that acts as the mediator between the spooler and actually getting data
  8. out on a target printer.
  9. Author:
  10. James Bratsanos (v-jimbr) 8-Dec-1992
  11. 6-21-93 v-jimbr Added a flag to track if something was printed.
  12. --*/
  13. //
  14. // Some defines for creating the error page
  15. //
  16. #define PS_XINCH G
  17. #define PS_INCH 100
  18. #define PS_HALF_INCH (PS_INCH / 2)
  19. #define PS_QUART_INCH (PS_INCH / 4 )
  20. #define PS_ERR_FONT_SIZE (PS_INCH / 7)
  21. #define PS_ERR_HEADER_FONT_SIZE (PS_INCH / 6)
  22. #define PS_ERR_LINE_WIDTH (PS_INCH / 20)
  23. #define PS_ERR_LINE_LEN (PS_INCH * 6)
  24. #define PS_PRINT_EMULATE_COPIES 0x00000001
  25. #define PS_PRINT_FREE_DEVMODE 0x00000002
  26. #define PS_PRINT_STARTDOC_INITIATED 0x00000004
  27. typedef struct {
  28. DWORD dwFlags;
  29. LPDEVMODE lpDevmode;
  30. } PRINT_ENVIRONMENT, *PPRINT_ENVIRONMENT;
  31. typedef struct {
  32. DWORD signature;
  33. DWORD fsStatus;
  34. HANDLE semPaused;
  35. DWORD uType;
  36. LPTSTR pPrinterName;
  37. HANDLE hPrinter;
  38. LPTSTR pDocument;
  39. LPTSTR pDocumentPrintDocName;
  40. LPTSTR pDatatype;
  41. LPTSTR pParameters;
  42. LPDWORD pdwFlags;
  43. DWORD JobId;
  44. BOOL bNeedToFreeDevmode;
  45. PRINT_ENVIRONMENT printEnv;
  46. HDC hDC;
  47. HANDLE hShared;
  48. PPSPRINT_SHARED_MEMORY pShared;
  49. LPBYTE lpBinaryPosToReadFrom; //The place we should start copying from
  50. BYTE BinaryBuff[512]; //Temp storage for data read from job
  51. DWORD cbBinaryBuff; //Number of bytes in temp storage
  52. } PSEXEDATA, *PPSEXEDATA;
  53. #define PSEXE_SIGNATURE 0x00010001
  54. //
  55. // Function prototypes
  56. //
  57. PPSEXEDATA ValidateHandle(HANDLE hPrintProcessor);
  58. BOOL CALLBACK PsPrintCallBack(PPSDIBPARMS,PPSEVENTSTRUCT);
  59. BOOL PsPrintGeneratePage( PPSDIBPARMS pPsToDib, PPSEVENTSTRUCT pPsEvent);
  60. BOOL PsGenerateErrorPage( PPSDIBPARMS pPsToDib, PPSEVENTSTRUCT pPsEvent);
  61. BOOL PsHandleScaleEvent( PPSDIBPARMS pPsToDib, PPSEVENTSTRUCT pPsEvent);
  62. BOOL PsHandleStdInputRequest( PPSDIBPARMS pPsToDib,PPSEVENTSTRUCT pPsEvent);
  63. BOOL PsCheckForWaitAndAbort(PPSEXEDATA pData );
  64. VOID PsCleanUpAndExitProcess( PPSEXEDATA pData, BOOL bAbort);
  65. BOOL PsGetDefaultDevmode( PPSEXEDATA );
  66. VOID PsMakeDefaultDevmodeModsAndSetupResolution( PPSEXEDATA pData,
  67. PPSDIBPARMS ppsDibParms );
  68. VOID PsInitPrintEnv( PPSEXEDATA pData, LPDEVMODE lpDevmode );
  69. BOOL CALLBACK PsPrintAbortProc( HDC hdc, int iError );
  70. BOOL PsGetCurrentPageType( PPSDIBPARMS pPsToDib, PPSEVENTSTRUCT pPsEvent);
  71. BOOL PsPrintStretchTheBitmap( PPSEXEDATA pData,
  72. PPSEVENT_PAGE_READY_STRUCT ppsPageReady );
  73. BOOL PsVerifyDCExistsAndCreateIfRequired( PPSEXEDATA pData );
  74. VOID PsLogEventAndIncludeLastError( DWORD dwErrorEvent, BOOL bError );
  75. BOOL PsLogNonPsError(IN PPSDIBPARMS pPsToDib,IN PPSEVENTSTRUCT pPsEvent );
  76. BOOL PsHandleBinaryFileLogicAndReturnBinaryStatus( PPSEXEDATA pData );
  77. BOOL IsJobFromMac( PPSEXEDATA pData );
  78.