typedef struct _PRINTPROVIDOR { BOOL (*fpOpenPrinter)(LPTSTR pPrinterName, LPHANDLE phPrinter, LPPRINTER_DEFAULTS pDefault); BOOL (*fpSetJob)(HANDLE hPrinter, DWORD JobId, DWORD Level, LPBYTE pJob, DWORD Command); BOOL (*fpGetJob)(HANDLE hPrinter, DWORD JobId, DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpEnumJobs)(HANDLE hPrinter, DWORD FirstJob, DWORD NoJobs, DWORD Level, LPBYTE pJob, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); HANDLE (*fpAddPrinter)(LPTSTR pName, DWORD Level, LPBYTE pPrinter); BOOL (*fpDeletePrinter)(HANDLE hPrinter); BOOL (*fpSetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, DWORD Command); BOOL (*fpGetPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpEnumPrinters)(DWORD Flags, LPTSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpAddPrinterDriver)(LPTSTR pName, DWORD Level, LPBYTE pDriverInfo); BOOL (*fpEnumPrinterDrivers)(LPTSTR pName, LPTSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpGetPrinterDriver)(HANDLE hPrinter, LPTSTR pEnvironment, DWORD Level, LPBYTE pDriverInfo, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpGetPrinterDriverDirectory)(LPTSTR pName, LPTSTR pEnvironment, DWORD Level, LPBYTE pDriverDirectory, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpDeletePrinterDriver)(LPTSTR pName, LPTSTR pEnvironment, LPTSTR pDriverName); BOOL (*fpAddPrintProcessor)(LPTSTR pName, LPTSTR pEnvironment, LPTSTR pPathName, LPTSTR pPrintProcessorName); BOOL (*fpEnumPrintProcessors)(LPTSTR pName, LPTSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpGetPrintProcessorDirectory)(LPTSTR pName, LPTSTR pEnvironment, DWORD Level, LPBYTE pPrintProcessorInfo, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpDeletePrintProcessor)(LPTSTR pName, LPTSTR pEnvironment, LPTSTR pPrintProcessorName); BOOL (*fpEnumPrintProcessorDatatypes)(LPTSTR pName, LPTSTR pPrintProcessorName, DWORD Level, LPBYTE pDataypes, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); DWORD (*fpStartDocPrinter)(HANDLE hPrinter, DWORD Level, LPBYTE pDocInfo); BOOL (*fpStartPagePrinter) (HANDLE hPrinter); BOOL (*fpWritePrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD pcWritten); BOOL (*fpEndPagePrinter)(HANDLE hPrinter); BOOL (*fpAbortPrinter)(HANDLE hPrinter); BOOL (*fpReadPrinter)(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD pNoBytesRead); BOOL (*fpEndDocPrinter)(HANDLE hPrinter); BOOL (*fpAddJob)(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpScheduleJob)(HANDLE hPrinter, DWORD JobId); DWORD (*fpGetPrinterData)(HANDLE hPrinter, LPTSTR pValueName, LPDWORD pType, LPBYTE pData, DWORD nSize, LPDWORD pcbNeeded); DWORD (*fpSetPrinterData)(HANDLE hPrinter, LPTSTR pValueName, DWORD Type, LPBYTE pData, DWORD cbData); DWORD (*fpWaitForPrinterChange)(HANDLE hPrinter, DWORD Flags); BOOL (*fpClosePrinter)(HANDLE hPrinter); BOOL (*fpAddForm)(HANDLE hPrinter, DWORD Level, LPBYTE pForm); BOOL (*fpDeleteForm)(HANDLE hPrinter, LPTSTR pFormName); BOOL (*fpGetForm)(HANDLE hPrinter, LPTSTR pFormName, DWORD Level, LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded); BOOL (*fpSetForm)(HANDLE hPrinter, LPTSTR pFormName, DWORD Level, LPBYTE pForm); BOOL (*fpEnumForms)(HANDLE hPrinter, DWORD Level, LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpEnumMonitors)(LPTSTR pName, DWORD Level, LPBYTE pMonitors, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpEnumPorts)(LPTSTR pName, DWORD Level, LPBYTE pPorts, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned); BOOL (*fpAddPort)(LPTSTR pName, HWND hWnd, LPTSTR pMonitorName); BOOL (*fpConfigurePort)(LPTSTR pName, HWND hWnd, LPTSTR pPortName); BOOL (*fpDeletePort)(LPTSTR pName, HWND hWnd, LPTSTR pPortName); HANDLE (*fpCreatePrinterIC)(HANDLE hPrinter, LPDEVMODEW pDevMode); BOOL (*fpPlayGdiScriptOnPrinterIC)(HANDLE hPrinterIC, LPBYTE pIn, DWORD cIn, LPBYTE pOut, DWORD cOut, DWORD ul); BOOL (*fpDeletePrinterIC)(HANDLE hPrinterIC); BOOL (*fpAddPrinterConnection)(LPTSTR pName); BOOL (*fpDeletePrinterConnection)(LPTSTR pName); DWORD (*fpPrinterMessageBox)(HANDLE hPrinter, DWORD Error, HWND hWnd, LPTSTR pText, LPTSTR pCaption, DWORD dwType); BOOL (*fpAddMonitor)(LPTSTR pName, DWORD Level, LPBYTE pMonitorInfo); BOOL (*fpDeleteMonitor)(LPTSTR pName, LPTSTR pEnvironment, LPTSTR pMonitorName); } PRINTPROVIDOR, FAR *LPPRINTPROVIDOR;
To initialize each NPP, the PRR calls InitializePrintProvidor by ordinal, with a pointer to an empty PRINTPROVIDOR structure, which is filled and returned by the provider. All calls from the PRR to the PP are made to the addresses specified in this structure.
Although some entry points are not used for Windows 95 print providers, they are preserved in this structure to maintain compatibility with Windows NT. For more information on this, see Functions Implemented As Stubs.