• Application calls DevOpenDC to open an OD_QUEUED device for printing PM_Q_STD data.

  • Hardcopy driver calls SplStdOpen to open a recording.

  • Application calls DevEscape with DEVESC_STARTDOC.

      a.

        Hardcopy driver calls SplStdStart to start recording.
      b.
        Hardcopy driver calls SplQmOpen and SplQmStartDoc to open and start a spool file.
      c.
        Spooler records all Gpixxx calls and some escape codes in the spool buffer.

        Note: Recording does not stop the flow of Gpixxx calls through the system. These calls are processed and the resulting Grexxx calls are passed on to handling routines in the graphics engine and presentation driver. Special considerations apply for escape codes. For details, see the individual escape codes under GreEscape.

      d.
        Hardcopy driver DC is OD_INFO. The presentation driver tracks the current position, does any bounds calculation required, and responds to queries from the application. In particular, the presentation driver must be able to understand and reply to:
          
            DevQueryCaps
          
            DevQueryHardCopyCaps
          
            DevQueryDeviceNames
          
            DevPostDeviceModes
          4.
            Application calls DevEscape with DEVESC_NEWFRAME.

              a.

                Hardcopy driver resets current position and bounds.
              5.
                Application calls DevEscape with DEVESC_ENDDOC.

                  a.

                    Hardcopy driver calls SplStdStop to stop the recording.
                  b.
                    Hardcopy driver calls SplStdQueryLength to get the length, in bytes, of the spooled data.
                  c.
                    Hardcopy driver calls SplStdGetBits to get data from the spool buffer into memory that is owned by the presentation driver. (The driver might need to loop on this step and the next if the spooled data is larger than the available memory.)
                  d.
                    Hardcopy driver calls SplQmWrite to write the data in the spool file.
                  e.
                    Hardcopy driver calls SplStdDelete to delete the data in the spool buffer.
                  f.
                    Hardcopy driver calls SplQmEndDoc to stop the spool file, and returns the Job ID to the application's DevEscape with DEVESC_ENDDOC.
                  6.
                    Application calls DevEscape with DEVESC_STARTDOC (repeat Step 2).
                  7.
                    Application calls DevEscape with DEVESC_NEWFRAME (repeat Step 3).
                  8.
                    Application calls DevEscape with DEVESC_ENDDOC to spool the second job (repeat Step 4).
                  9.
                    Application calls DevCloseDC.

                      a.

                        Hardcopy driver calls SplStdClose and SplQmClose to close the spool buffer and the spool file.


                      [Back: PM_Q_STD]
                      [Next: End Sequence of Events:]