1 | #ifndef __OSLIBSPL_H__
|
---|
2 | #define __OSLIBSPL_H__
|
---|
3 |
|
---|
4 |
|
---|
5 | /*******************************************************************************
|
---|
6 | * Structures and Typedefs *
|
---|
7 | *******************************************************************************/
|
---|
8 | typedef struct
|
---|
9 | {
|
---|
10 | ULONG flType;
|
---|
11 | LPSTR pszComputerName;
|
---|
12 | LPSTR pszPrintDestinationName;
|
---|
13 | LPSTR pszDescription;
|
---|
14 | LPSTR pszLocalName;
|
---|
15 | } OSLIB_PRINTERINFO, *POSLIB_PRINTERINFO;
|
---|
16 |
|
---|
17 | typedef struct
|
---|
18 | {
|
---|
19 | LONG cb;
|
---|
20 | LONG lVersion;
|
---|
21 | CHAR szDeviceName[32];
|
---|
22 | CHAR abGeneralData[1];
|
---|
23 | } OSLIB_DRIVDATA;
|
---|
24 |
|
---|
25 | typedef struct
|
---|
26 | {
|
---|
27 | LPSTR pszName;
|
---|
28 | USHORT uPriority;
|
---|
29 | USHORT uStartTime;
|
---|
30 | USHORT uUntilTime;
|
---|
31 | USHORT fsType;
|
---|
32 | LPSTR pszSepFile;
|
---|
33 | LPSTR pszPrProc;
|
---|
34 | LPSTR pszParms;
|
---|
35 | LPSTR pszComment;
|
---|
36 | USHORT fsStatus;
|
---|
37 | USHORT cJobs;
|
---|
38 | LPSTR pszPrinters;
|
---|
39 | LPSTR pszDriverName;
|
---|
40 | OSLIB_DRIVDATA *pDriverData;
|
---|
41 | } OSLIB_PRQINFO3, *POSLIB_PRQINFO3;
|
---|
42 |
|
---|
43 | typedef struct {
|
---|
44 | LPSTR pszPrinterName; /* Print device name. */
|
---|
45 | LPSTR pszUserName; /* User who submitted job. */
|
---|
46 | LPSTR pszLogAddr; /* Logical address (for example LPT1). */
|
---|
47 | USHORT uJobId; /* Identity of current job. */
|
---|
48 | USHORT fsStatus; /* Print destination status. */
|
---|
49 | LPSTR pszStatus; /* Print device comment while printing. */
|
---|
50 | LPSTR pszComment; /* Print device description. */
|
---|
51 | LPSTR pszDrivers; /* Drivers supported by print device. */
|
---|
52 | USHORT time; /* Time job has been printing (minutes) */
|
---|
53 | USHORT usTimeOut; /* Device timeout (seconds) */
|
---|
54 | } OSLIB_PRDINFO3, *POSLIB_PRDINFO3;
|
---|
55 |
|
---|
56 | typedef struct
|
---|
57 | {
|
---|
58 | LPSTR pszLogAddress;
|
---|
59 | LPSTR pszDriverName;
|
---|
60 | void * pdriv;
|
---|
61 | LPSTR pszDataType;
|
---|
62 | LPSTR pszComment;
|
---|
63 | LPSTR pszQueueProcName;
|
---|
64 | LPSTR pszQueueProcParams;
|
---|
65 | LPSTR pszSpoolerParams;
|
---|
66 | LPSTR pszNetworkParams;
|
---|
67 | } OSLIB_DEVOPENSTRUC, *POSLIB_DEVOPENSTRUC;
|
---|
68 |
|
---|
69 | /*** Flags for flType in PRINTERINFO and SplEnumPrinter *************/
|
---|
70 | #define OSLIB_SPL_PR_QUEUE 0x00000001 /* include queues */
|
---|
71 | #define OSLIB_SPL_PR_DIRECT_DEVICE 0x00000002 /* unattached devices */
|
---|
72 | #define OSLIB_SPL_PR_QUEUED_DEVICE 0x00000004 /* queued devices */
|
---|
73 | #define OSLIB_SPL_PR_LOCAL_ONLY 0x00000100 /* exclude remote queues */
|
---|
74 |
|
---|
75 | #define OSLIB_SPL_PR_ALL (OSLIB_SPL_PR_QUEUE|OSLIB_SPL_PR_DIRECT_DEVICE|OSLIB_SPL_PR_QUEUED_DEVICE)
|
---|
76 |
|
---|
77 | #define OSLIB_PRQ3_TYPE_RAW 0x0001 /* spools printer-specific data */
|
---|
78 | #define OSLIB_PRQ3_TYPE_BYPASS 0x0002 /* allow print while spooling */
|
---|
79 | #define OSLIB_PRQ3_TYPE_APPDEFAULT 0x0004 /* set for Application default Q*/
|
---|
80 |
|
---|
81 | void * OSLibSplEnumPrinter(LPSTR pszComputer, DWORD flType, PDWORD pcReturned, PDWORD pcTotal);
|
---|
82 | void * OSLibSplEnumDevice(LPSTR pszComputer, DWORD ulLevel, DWORD *pcReturned, DWORD *pcTotal);
|
---|
83 | void * OSLibSplEnumQueue(LPSTR pszComputer, DWORD ulLevel, DWORD *pcReturned, DWORD *pcTotal);
|
---|
84 |
|
---|
85 | BOOL ExportPrintersToRegistry(void);
|
---|
86 | ULONG OSLibShowPrinterDialog(HWND, LPSTR printerName);
|
---|
87 |
|
---|
88 | BOOL OSLibSplFindDefaultPrinter(LPSTR lpszPortName, LPSTR lpszDriverName, LPSTR lpszQueueName);
|
---|
89 | void * OSLibSplQueryQueue(LPSTR pszComputerName, LPSTR pszQueueName, ULONG ulLevel);
|
---|
90 |
|
---|
91 | HANDLE OSLibSplQmOpen(LPSTR pszToken, LONG lCount, LPSTR* pqmdopData);
|
---|
92 | BOOL OSLibSplQmClose(HANDLE hspl);
|
---|
93 | BOOL OSLibSplQmStartDoc(HANDLE hspl, LPSTR pszDocName);
|
---|
94 | BOOL OSLibSplQmEndDoc(HANDLE hspl);
|
---|
95 | BOOL OSLibSplQmWrite(HANDLE hspl, LONG cbData, PVOID pvData);
|
---|
96 | BOOL OSLibSplQmNewPage(HANDLE hspl, ULONG ulPageNo);
|
---|
97 |
|
---|
98 | ULONG OSLibSplWinGetLastError(void);
|
---|
99 |
|
---|
100 | #endif
|
---|