home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / STDPRN.ZIP / STDPRN.TXT < prev   
Text File  |  1989-09-02  |  4KB  |  109 lines

  1. .context List Categories
  2. .list
  3. Printer functions
  4. .context Printer functions
  5. .list
  6. OpenDefaultPrinterDC        Open device context for current default printer.
  7. StartDocument               Signal spooler that a new print job is starting.
  8. EndDocument                 End current print job.
  9. .context OpenDefaultPrinterDC
  10. .ref StartDocument, EndDocument, DevOpenDC, DevCloseDC, DevEscape
  11. #define INCL_DEV
  12. #include <os2.h>
  13. #include <stdprn.h>
  14.  
  15. .paste Syntax
  16. HDC \bOpenDefaultPrinterDC\p( \ihab\p,\ipszAppName\p,\ipszRedirect\p )
  17. HAB \ihab\p;            /* anchor-block handle             */
  18. PSZ \ipszAppName\p;     /* application name                */
  19. PSZ \ipszRedirect\p;    /* printer output redirection file */
  20. .end
  21.  
  22. The \bOpenDefaultPrinterDC\p function opens a device context for the current
  23. default printer. Use the \bDevCloseDC\p function to close this device context
  24. when you are finished with it.
  25.  
  26. \bParameters      Description\p
  27. ────────────────────────────────────────────────────────────────────────────
  28. \ihab\p             Identifies the anchor block.
  29.  
  30. \ipszAppName\p      Points to a null-terminated string that contains the
  31.                 application name.
  32.  
  33. \ipszRedirect\p     Points to a null-terminated string that contains the
  34.                 name of the file to which printer output is to be
  35.                 redirected. This parameter is set to NULL if no output
  36.                 redirection is to take place.
  37.  
  38.  
  39. \bReturn Value\p
  40.  
  41. The return value identifies the opened printer device context if the
  42. function is successful. The return value is DEV_ERROR if the function
  43. is unsuccessful.
  44.  
  45.  
  46. \bSee Also\p
  47.  
  48. \bStartDocument\p, \bEndDocument\p, \bDevOpenDC\p, \bDevCloseDC\p, \bDevEscape\p
  49. .context StartDocument
  50. .ref OpenDefaultPrinterDC, EndDocument, DevOpenDC, DevCloseDC, DevEscape
  51. #define INCL_DEV
  52. #include <os2.h>
  53. #include <stdprn.h>
  54.  
  55. .paste Syntax
  56. LONG \bStartDocument\p( \ihdcPrinter\p,\ipszDocName\p )
  57. HDC \ihdcPrinter\p;     /* device-context handle */
  58. PSZ \ipszDocName\p;     /* document name         */
  59. .end
  60.  
  61. The \bStartDocument\p function signals the print spooler that a new print
  62. job is starting.
  63.  
  64. \bParameters      Description\p
  65. ────────────────────────────────────────────────────────────────────────────
  66. \ihdcPrinter\p      Identifies the printer device context.
  67.  
  68. \ipszDocName\p      Points to a null-terminated string containing the
  69.                 name of the document
  70.  
  71.  
  72. \bReturn Value\p
  73.  
  74. This function returns DEV_OK if no error occurred, otherwise it returns
  75. a value of DEVESC_ERROR or DEVESC_NOTIMPLEMENTED.
  76.  
  77.  
  78. \bSee Also\p
  79.  
  80. \bOpenDefaultPrinterDC\p, \bEndDocument\p, \bDevOpenDC\p, \bDevCloseDC\p, \bDevEscape\p
  81. .context EndDocument
  82. .ref OpenDefaultPrinterDC, StartDocument, DevOpenDC, DevCloseDC, DevEscape
  83. #define INCL_DEV
  84. #include <os2.h>
  85. #include <stdprn.h>
  86.  
  87. .paste Syntax
  88. LONG \bEndDocument\p( \ihdcPrinter\p )
  89. HDC \ihdcPrinter\p;     /* device-context handle */
  90. .end
  91.  
  92. The \bEndDocument\p function ends a print job started by the \bStartDocument\p
  93. function.
  94.  
  95. \bParameters      Description\p
  96. ────────────────────────────────────────────────────────────────────────────
  97. \ihdcPrinter\p      Identifies the printer device context.
  98.  
  99.  
  100. \bReturn Value\p
  101.  
  102. This function returns DEV_OK if no error occurred, otherwise it returns
  103. a value of DEVESC_ERROR or DEVESC_NOTIMPLEMENTED.
  104.  
  105.  
  106. \bSee Also\p
  107.  
  108. \bOpenDefaultPrinterDC\p, \bStartDocument\p, \bDevOpenDC\p, \bDevCloseDC\p, \bDevEscape\p
  109.