StartDocPort

BOOL (WINAPI *pfnStartDocPort)(

    HANDLE  hPort,
   LPWSTR  pPrinterName,
   DWORD  JobId,
   DWORD  Level,
   LPBYTE  pDocInfo
  );

StartDocPort performs the tasks required to start a print job on the specified port.

Parameters

hPort

Handle that identifies the port to which the print job is being sent.

pPrinterName

Points to a zero-terminated string specifying the name of the printer to which the job is being sent.

JobId

Identifies the job being printed.

Level

Specifies the level of the structure pointed to by pDocInfo. This value can be one or two.

pDocInfo

Depending on Level, points to a DOC_INFO_1 or DOC_INFO_2 structure that describes the document to be printed.

Return Value

The return value is TRUE if the function is successful; FALSE if the function fails.

Comments

The spooler calls StartDocPort when it is ready to send a job to the printer. StartDocPort should perform whatever port setup is required in order to send data from subsequent WritePort calls to the printer.