Corrected location of FAQ.
[wine] / misc / printdrv.c
1 /* 
2  * Implementation of some printer driver bits
3  * 
4  * Copyright 1996 John Harvey
5  * Copyright 1998 Andreas Mohr
6  */
7
8 #include <stdlib.h>
9 #include <string.h>
10 #include <ctype.h>
11 #include "winspool.h"
12 #include "ldt.h"
13 #include "winerror.h"
14 #include "winreg.h"
15 #include "debug.h"
16
17 static char PrinterModel[]      = "Printer Model";
18 static char DefaultDevMode[]    = "Default DevMode";
19 static char PrinterDriverData[] = "PrinterDriverData";
20 static char Printers[]          = "System\\CurrentControlSet\\Control\\Print\\Printers\\";
21
22 /******************************************************************
23  *                  StartDoc16  [GDI.377]
24  *
25  */
26 INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
27 {
28   INT16 retVal;
29   TRACE(print,"(%p)\n", lpdoc );
30   TRACE(print,"%d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
31         lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
32         lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
33   TRACE(print, "%d %s %s\n",lpdoc->cbSize,
34         (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
35         (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
36   retVal =  Escape16(hdc, STARTDOC,
37     strlen((LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName)), lpdoc->lpszDocName, 0);
38   TRACE(print,"Escape16 returned %d\n",retVal);
39   return retVal;
40 }
41
42 /******************************************************************
43  *                  EndPage16  [GDI.380]
44  *
45  */
46 INT16 WINAPI EndPage16( HDC16 hdc )
47 {
48   INT16 retVal;
49   retVal =  Escape16(hdc, NEWFRAME, 0, 0, 0);
50   TRACE(print,"Escape16 returned %d\n",retVal);
51   return retVal;
52 }
53
54 /******************************************************************
55  *                  StartDoc32A  [GDI32.347]
56  *
57  */
58 INT WINAPI StartDocA(HDC hdc ,const DOCINFOA* doc)
59 {
60   FIXME(gdi,"stub\n");
61   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 
62   return 0; /* failure*/
63 }
64
65 /*************************************************************************
66  *                  StartDoc32W [GDI32.348]
67  * 
68  */
69 INT WINAPI StartDocW(HDC hdc, const DOCINFOW* doc) {
70   FIXME(gdi,"stub\n");
71   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 
72   return 0; /* failure*/
73 }
74
75 /******************************************************************
76  *                  StartPage32  [GDI32.349]
77  *
78  */
79 INT WINAPI StartPage(HDC hdc)
80 {
81   FIXME(gdi,"stub\n");
82   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 
83   return 0; /* failure*/
84 }
85
86 /******************************************************************
87  *                  EndPage32  [GDI32.77]
88  *
89  */
90 INT WINAPI EndPage(HDC hdc)
91 {
92   FIXME(gdi,"stub\n");
93   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 
94   return 0; /* failure*/
95 }
96
97 /******************************************************************
98  *                  EndDoc16  [GDI.378]
99  *
100  */
101 INT16 WINAPI EndDoc16(HDC16 hdc)
102 {
103   return  Escape16(hdc, ENDDOC, 0, 0, 0);
104 }
105
106 /******************************************************************
107  *                  EndDoc32  [GDI32.76]
108  *
109  */
110 INT WINAPI EndDoc(HDC hdc)
111 {
112   FIXME(gdi,"stub\n");
113   SetLastError(ERROR_CALL_NOT_IMPLEMENTED); 
114   return 0; /* failure*/
115 }
116
117 /******************************************************************************
118  *                 AbortDoc16  [GDI.382]
119  */
120 INT16 WINAPI AbortDoc16(HDC16 hdc)
121 {
122   return Escape16(hdc, ABORTDOC, 0, 0, 0);
123 }
124
125 /******************************************************************************
126  *                 AbortDoc32  [GDI32.0]
127  */
128 INT WINAPI AbortDoc(HDC hdc)
129 {
130     FIXME(gdi, "(%d): stub\n", hdc);
131     return 1;
132 }
133
134 /******************************************************************
135  *                  DrvGetPrinterDataInternal
136  *
137  * Helper for DrvGetPrinterData
138  */
139 static DWORD DrvGetPrinterDataInternal(LPSTR RegStr_Printer,
140 LPBYTE lpPrinterData, int cbData, int what)
141 {
142     DWORD res = -1;
143     HKEY hkey;
144     DWORD dwType, cbQueryData;
145
146     if (!(RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey))) {
147         if (what == INT_PD_DEFAULT_DEVMODE) { /* "Default DevMode" */
148             if (!(RegQueryValueExA(hkey, DefaultDevMode, 0, &dwType, 0, &cbQueryData))) {
149                 if (!lpPrinterData)
150                     res = cbQueryData;
151                 else if ((cbQueryData) && (cbQueryData <= cbData)) {
152                     cbQueryData = cbData;
153                     if (RegQueryValueExA(hkey, DefaultDevMode, 0,
154                                 &dwType, lpPrinterData, &cbQueryData))
155                         res = cbQueryData;
156                 }
157             }
158         } else { /* "Printer Driver" */
159             cbQueryData = 32;
160             RegQueryValueExA(hkey, "Printer Driver", 0,
161                         &dwType, lpPrinterData, &cbQueryData);
162             res = cbQueryData;
163         }
164     }
165     if (hkey) RegCloseKey(hkey);
166     return res;
167 }
168
169 /******************************************************************
170  *                DrvGetPrinterData     [GDI.282]
171  *
172  */
173 DWORD WINAPI DrvGetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
174                                LPDWORD lpType, LPBYTE lpPrinterData,
175                                int cbData, LPDWORD lpNeeded)
176 {
177     LPSTR RegStr_Printer;
178     HKEY hkey = 0, hkey2 = 0;
179     DWORD res = 0;
180     DWORD dwType, PrinterAttr, cbPrinterAttr, SetData, size;
181
182     if (HIWORD(lpPrinter))
183             TRACE(print,"printer %s\n",lpPrinter);
184     else
185             TRACE(print,"printer %p\n",lpPrinter);
186     if (HIWORD(lpProfile))
187             TRACE(print,"profile %s\n",lpProfile);
188     else
189             TRACE(print,"profile %p\n",lpProfile);
190     TRACE(print,"lpType %p\n",lpType);
191
192     if ((!lpPrinter) || (!lpProfile) || (!lpNeeded))
193         return ERROR_INVALID_PARAMETER;
194
195     RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
196                                strlen(Printers) + strlen(lpPrinter) + 2);
197     strcpy(RegStr_Printer, Printers);
198     strcat(RegStr_Printer, lpPrinter);
199
200     if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
201     (!strcmp(lpProfile, DefaultDevMode)))) {
202         size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData,
203                                          INT_PD_DEFAULT_DEVMODE);
204         if (size+1) {
205             *lpNeeded = size;
206             if ((lpPrinterData) && (*lpNeeded > cbData))
207                 res = ERROR_MORE_DATA;
208         }
209         else res = ERROR_INVALID_PRINTER_NAME;
210     }
211     else
212     if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
213     (!strcmp(lpProfile, PrinterModel)))) {
214         *lpNeeded = 32;
215         if (!lpPrinterData) goto failed;
216         if (cbData < 32) {
217             res = ERROR_MORE_DATA;
218             goto failed;
219         }
220         size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData,
221                                          INT_PD_DEFAULT_MODEL);
222         if ((size+1) && (lpType))
223             *lpType = REG_SZ;
224         else
225             res = ERROR_INVALID_PRINTER_NAME;
226     }
227     else
228     {
229         if ((res = RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)))
230             goto failed;
231         cbPrinterAttr = 4;
232         if ((res = RegQueryValueExA(hkey, "Attributes", 0,
233                         &dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr)))
234             goto failed;
235         if ((res = RegOpenKeyA(hkey, PrinterDriverData, &hkey2)))
236             goto failed;
237         *lpNeeded = cbData;
238         res = RegQueryValueExA(hkey2, lpProfile, 0,
239                 lpType, lpPrinterData, lpNeeded);
240         if ((res != ERROR_CANTREAD) &&
241          ((PrinterAttr &
242         (PRINTER_ATTRIBUTE_ENABLE_BIDI|PRINTER_ATTRIBUTE_NETWORK))
243         == PRINTER_ATTRIBUTE_NETWORK))
244         {
245             if (!(res) && (*lpType == REG_DWORD) && (*(LPDWORD)lpPrinterData == -1))
246                 res = ERROR_INVALID_DATA;
247         }
248         else
249         {
250             SetData = -1;
251             RegSetValueExA(hkey2, lpProfile, 0, REG_DWORD, (LPBYTE)&SetData, 4); /* no result returned */
252         }
253     }
254         
255 failed:
256     if (hkey2) RegCloseKey(hkey2);
257     if (hkey) RegCloseKey(hkey);
258     HeapFree(GetProcessHeap(), 0, RegStr_Printer);
259     return res;
260 }
261
262
263 /******************************************************************
264  *                 DrvSetPrinterData     [GDI.281]
265  *
266  */
267 DWORD WINAPI DrvSetPrinterData16(LPSTR lpPrinter, LPSTR lpProfile,
268                                DWORD lpType, LPBYTE lpPrinterData,
269                                DWORD dwSize)
270 {
271     LPSTR RegStr_Printer;
272     HKEY hkey = 0;
273     DWORD res = 0;
274
275     if (HIWORD(lpPrinter))
276             TRACE(print,"printer %s\n",lpPrinter);
277     else
278             TRACE(print,"printer %p\n",lpPrinter);
279     if (HIWORD(lpProfile))
280             TRACE(print,"profile %s\n",lpProfile);
281     else
282             TRACE(print,"profile %p\n",lpProfile);
283     TRACE(print,"lpType %08lx\n",lpType);
284
285     if ((!lpPrinter) || (!lpProfile) ||
286     ((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) &&
287     (!strcmp(lpProfile, PrinterModel))))
288         return ERROR_INVALID_PARAMETER;
289
290     RegStr_Printer = HeapAlloc(GetProcessHeap(), 0,
291                         strlen(Printers) + strlen(lpPrinter) + 2);
292     strcpy(RegStr_Printer, Printers);
293     strcat(RegStr_Printer, lpPrinter);
294
295     if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) &&
296     (!strcmp(lpProfile, DefaultDevMode)))) {
297         if ( RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey) 
298              != ERROR_SUCCESS ||
299              RegSetValueExA(hkey, DefaultDevMode, 0, REG_BINARY, 
300                               lpPrinterData, dwSize) != ERROR_SUCCESS )
301                 res = ERROR_INVALID_PRINTER_NAME;
302     }
303     else
304     {
305         strcat(RegStr_Printer, "\\");
306
307         if( (res = RegOpenKeyA(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) ==
308             ERROR_SUCCESS ) {
309
310             if (!lpPrinterData) 
311                 res = RegDeleteValueA(hkey, lpProfile);
312             else
313                 res = RegSetValueExA(hkey, lpProfile, 0, lpType,
314                                        lpPrinterData, dwSize);
315         }
316     }
317
318     if (hkey) RegCloseKey(hkey);
319     HeapFree(GetProcessHeap(), 0, RegStr_Printer);
320     return res;
321 }
322
323
324 /******************************************************************
325  *              DeviceCapabilities32A    [WINSPOOL.151]
326  *
327  */
328 INT WINAPI DeviceCapabilitiesA(LPCSTR printer,LPCSTR target,WORD z,
329                                    LPSTR a,LPDEVMODEA b)
330 {
331     FIXME(print,"(%s,%s,%d,%p,%p):stub.\n",printer,target,z,a,b);
332     return 1;           
333 }
334
335
336 /*****************************************************************************
337  *          DeviceCapabilities32W 
338  */
339 INT WINAPI DeviceCapabilitiesW(LPCWSTR pDevice, LPCWSTR pPort,
340                                    WORD fwCapability, LPWSTR pOutput,
341                                    const DEVMODEW *pDevMode)
342 {
343     FIXME(print,"(%p,%p,%d,%p,%p): stub\n",
344           pDevice, pPort, fwCapability, pOutput, pDevMode);
345     return -1;
346 }
347
348 /******************************************************************
349  *              DocumentProperties32A   [WINSPOOL.155]
350  *
351  */
352 LONG WINAPI DocumentPropertiesA(HWND hWnd,HANDLE hPrinter,
353                                 LPSTR pDeviceName, LPDEVMODEA pDevModeOutput,
354                                   LPDEVMODEA pDevModeInput,DWORD fMode )
355 {
356     FIXME(print,"(%d,%d,%s,%p,%p,%ld):stub.\n",
357         hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode
358     );
359     return 1;
360 }
361
362
363 /*****************************************************************************
364  *          DocumentProperties32W 
365  */
366 LONG WINAPI DocumentPropertiesW(HWND hWnd, HANDLE hPrinter,
367                                   LPWSTR pDeviceName,
368                                   LPDEVMODEW pDevModeOutput,
369                                   LPDEVMODEW pDevModeInput, DWORD fMode)
370 {
371     FIXME(print,"(%d,%d,%s,%p,%p,%ld): stub\n",
372           hWnd,hPrinter,debugstr_w(pDeviceName),pDevModeOutput,pDevModeInput,
373           fMode);
374     return -1;
375 }
376
377
378 /******************************************************************
379  *              OpenPrinter32A        [WINSPOOL.196]
380  *
381  */
382 BOOL WINAPI OpenPrinterA(LPSTR lpPrinterName,HANDLE *phPrinter,
383                              LPPRINTER_DEFAULTSA pDefault)
384 {
385     FIXME(print,"(%s,%p,%p):stub\n",debugstr_a(lpPrinterName), phPrinter,
386           pDefault);
387     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
388     return FALSE;
389 }
390
391 /******************************************************************
392  *              OpenPrinter32W        [WINSPOOL.197]
393  *
394  */
395 BOOL WINAPI OpenPrinterW(LPWSTR lpPrinterName,HANDLE *phPrinter,
396                              LPPRINTER_DEFAULTSW pDefault)
397 {
398     FIXME(print,"(%s,%p,%p):stub\n",debugstr_w(lpPrinterName), phPrinter,
399           pDefault);
400     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
401     return FALSE;
402 }
403
404 /******************************************************************
405  *              EnumPrinters32A        [WINSPOOL.174]
406  *
407  */
408 BOOL  WINAPI EnumPrintersA(DWORD dwType, LPSTR lpszName,
409                                DWORD dwLevel, LPBYTE lpbPrinters,
410                                DWORD cbBuf, LPDWORD lpdwNeeded,
411                                LPDWORD lpdwReturned)
412 {
413     FIXME(print,"Nearly empty stub\n");
414     *lpdwReturned=0;
415     *lpdwNeeded = 0;
416     return TRUE;
417 }
418
419 /******************************************************************
420  *              EnumPrinters32W        [WINSPOOL.175]
421  *
422  */
423 BOOL  WINAPI EnumPrintersW(DWORD dwType, LPWSTR lpszName,
424                                DWORD dwLevel, LPBYTE lpbPrinters,
425                                DWORD cbBuf, LPDWORD lpdwNeeded,
426                                LPDWORD lpdwReturned)
427 {
428     FIXME(print,"Nearly empty stub\n");
429     *lpdwReturned=0;
430     *lpdwNeeded = 0;
431     return TRUE;
432 }
433
434 /******************************************************************
435  *              AddMonitor32A        [WINSPOOL.107]
436  *
437  */
438 BOOL WINAPI AddMonitorA(LPCSTR pName, DWORD Level, LPBYTE pMonitors)
439 {
440     FIXME(print, "(%s,%lx,%p):stub!\n", pName, Level, pMonitors);
441     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
442     return FALSE;
443 }
444
445 /******************************************************************
446  *              DeletePrinterDriver32A        [WINSPOOL.146]
447  *
448  */
449 BOOL WINAPI
450 DeletePrinterDriverA (LPSTR pName, LPSTR pEnvironment, LPSTR pDriverName)
451 {
452     FIXME(print,"(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment),
453           debugstr_a(pDriverName));
454     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
455     return FALSE;
456 }
457
458
459 /******************************************************************
460  *              DeleteMonitor32A        [WINSPOOL.135]
461  *
462  */
463 BOOL WINAPI
464 DeleteMonitorA (LPSTR pName, LPSTR pEnvironment, LPSTR pMonitorName)
465 {
466     FIXME(print,"(%s,%s,%s):stub\n",debugstr_a(pName),debugstr_a(pEnvironment),
467           debugstr_a(pMonitorName));
468     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
469     return FALSE;
470 }
471
472
473 /******************************************************************
474  *              DeletePort32A        [WINSPOOL.137]
475  *
476  */
477 BOOL WINAPI
478 DeletePortA (LPSTR pName, HWND hWnd, LPSTR pPortName)
479 {
480     FIXME(print,"(%s,0x%08x,%s):stub\n",debugstr_a(pName),hWnd,
481           debugstr_a(pPortName));
482     SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
483     return FALSE;
484 }
485
486 /******************************************************************************
487  *    SetPrinter32W  [WINSPOOL.214]
488  */
489 BOOL WINAPI
490 SetPrinterW(
491   HANDLE  hPrinter,
492   DWORD     Level,
493   LPBYTE    pPrinter,
494   DWORD     Command) {
495
496        FIXME(print,"():stub\n");
497   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
498        return FALSE;
499 }
500
501 /******************************************************************************
502  *    WritePrinter32  [WINSPOOL.223]
503  */
504 BOOL WINAPI
505 WritePrinter( 
506   HANDLE  hPrinter,
507   LPVOID  pBuf,
508   DWORD   cbBuf,
509   LPDWORD pcWritten) {
510
511        FIXME(print,"():stub\n");
512   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
513        return FALSE;
514 }
515
516 /*****************************************************************************
517  *          AddForm32A  [WINSPOOL.103]
518  */
519 BOOL WINAPI AddFormA(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
520 {
521     FIXME(print, "(%d,%ld,%p): stub\n", hPrinter, Level, pForm);
522     return 1;
523 }
524
525 /*****************************************************************************
526  *          AddForm32W  [WINSPOOL.104]
527  */
528 BOOL WINAPI AddFormW(HANDLE hPrinter, DWORD Level, LPBYTE pForm)
529 {
530     FIXME(print, "(%d,%ld,%p): stub\n", hPrinter, Level, pForm);
531     return 1;
532 }
533
534 /*****************************************************************************
535  *          AddJob32A  [WINSPOOL.105]
536  */
537 BOOL WINAPI AddJobA(HANDLE hPrinter, DWORD Level, LPBYTE pData,
538                         DWORD cbBuf, LPDWORD pcbNeeded)
539 {
540     FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf,
541           pcbNeeded);
542     return 1;
543 }
544
545 /*****************************************************************************
546  *          AddJob32W  [WINSPOOL.106]
547  */
548 BOOL WINAPI AddJobW(HANDLE hPrinter, DWORD Level, LPBYTE pData, DWORD cbBuf,
549                         LPDWORD pcbNeeded)
550 {
551     FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pData, cbBuf,
552           pcbNeeded);
553     return 1;
554 }
555
556 /*****************************************************************************
557  *          AddPrinter32A  [WINSPOOL.117]
558  */
559 HANDLE WINAPI AddPrinterA(LPSTR pName, DWORD Level, LPBYTE pPrinter)
560 {
561     FIXME(print, "(%s,%ld,%p): stub\n", pName, Level, pPrinter);
562     return 0;
563 }
564
565 /*****************************************************************************
566  *          AddPrinter32W  [WINSPOOL.122]
567  */
568 HANDLE WINAPI AddPrinterW(LPWSTR pName, DWORD Level, LPBYTE pPrinter)
569 {
570     FIXME(print, "(%p,%ld,%p): stub\n", pName, Level, pPrinter);
571     return 0;
572 }
573
574
575 /*****************************************************************************
576  *          ClosePrinter32  [WINSPOOL.126]
577  */
578 BOOL WINAPI ClosePrinter(HANDLE hPrinter)
579 {
580     FIXME(print, "(%d): stub\n", hPrinter);
581     return 1;
582 }
583
584 /*****************************************************************************
585  *          DeleteForm32A  [WINSPOOL.133]
586  */
587 BOOL WINAPI DeleteFormA(HANDLE hPrinter, LPSTR pFormName)
588 {
589     FIXME(print, "(%d,%s): stub\n", hPrinter, pFormName);
590     return 1;
591 }
592
593 /*****************************************************************************
594  *          DeleteForm32W  [WINSPOOL.134]
595  */
596 BOOL WINAPI DeleteFormW(HANDLE hPrinter, LPWSTR pFormName)
597 {
598     FIXME(print, "(%d,%s): stub\n", hPrinter, debugstr_w(pFormName));
599     return 1;
600 }
601
602 /*****************************************************************************
603  *          DeletePrinter32  [WINSPOOL.143]
604  */
605 BOOL WINAPI DeletePrinter(HANDLE hPrinter)
606 {
607     FIXME(print, "(%d): stub\n", hPrinter);
608     return 1;
609 }
610
611 /*****************************************************************************
612  *          SetPrinter32A  [WINSPOOL.211]
613  */
614 BOOL WINAPI SetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
615                            DWORD Command)
616 {
617     FIXME(print, "(%d,%ld,%p,%ld): stub\n",hPrinter,Level,pPrinter,Command);
618     return FALSE;
619 }
620
621 /*****************************************************************************
622  *          SetJob32A  [WINSPOOL.209]
623  */
624 BOOL WINAPI SetJobA(HANDLE hPrinter, DWORD JobId, DWORD Level,
625                        LPBYTE pJob, DWORD Command)
626 {
627     FIXME(print, "(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob,
628          Command);
629     return FALSE;
630 }
631
632 /*****************************************************************************
633  *          SetJob32W  [WINSPOOL.210]
634  */
635 BOOL WINAPI SetJobW(HANDLE hPrinter, DWORD JobId, DWORD Level,
636                        LPBYTE pJob, DWORD Command)
637 {
638     FIXME(print, "(%d,%ld,%ld,%p,%ld): stub\n",hPrinter,JobId,Level,pJob,
639          Command);
640     return FALSE;
641 }
642
643 /*****************************************************************************
644  *          GetForm32A  [WINSPOOL.181]
645  */
646 BOOL WINAPI GetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
647                  LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded)
648 {
649     FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pFormName,
650          Level,pForm,cbBuf,pcbNeeded); 
651     return FALSE;
652 }
653
654 /*****************************************************************************
655  *          GetForm32W  [WINSPOOL.182]
656  */
657 BOOL WINAPI GetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
658                  LPBYTE pForm, DWORD cbBuf, LPDWORD pcbNeeded)
659 {
660     FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,
661           debugstr_w(pFormName),Level,pForm,cbBuf,pcbNeeded);
662     return FALSE;
663 }
664
665 /*****************************************************************************
666  *          SetForm32A  [WINSPOOL.207]
667  */
668 BOOL WINAPI SetFormA(HANDLE hPrinter, LPSTR pFormName, DWORD Level,
669                         LPBYTE pForm)
670 {
671     FIXME(print, "(%d,%s,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm);
672     return FALSE;
673 }
674
675 /*****************************************************************************
676  *          SetForm32W  [WINSPOOL.208]
677  */
678 BOOL WINAPI SetFormW(HANDLE hPrinter, LPWSTR pFormName, DWORD Level,
679                         LPBYTE pForm)
680 {
681     FIXME(print, "(%d,%p,%ld,%p): stub\n",hPrinter,pFormName,Level,pForm);
682     return FALSE;
683 }
684
685 /*****************************************************************************
686  *          ReadPrinter32  [WINSPOOL.202]
687  */
688 BOOL WINAPI ReadPrinter(HANDLE hPrinter, LPVOID pBuf, DWORD cbBuf,
689                            LPDWORD pNoBytesRead)
690 {
691     FIXME(print, "(%d,%p,%ld,%p): stub\n",hPrinter,pBuf,cbBuf,pNoBytesRead);
692     return FALSE;
693 }
694
695 /*****************************************************************************
696  *          ResetPrinter32A  [WINSPOOL.203]
697  */
698 BOOL WINAPI ResetPrinterA(HANDLE hPrinter, LPPRINTER_DEFAULTSA pDefault)
699 {
700     FIXME(print, "(%d, %p): stub\n", hPrinter, pDefault);
701     return FALSE;
702 }
703
704 /*****************************************************************************
705  *          ResetPrinter32W  [WINSPOOL.204]
706  */
707 BOOL WINAPI ResetPrinterW(HANDLE hPrinter, LPPRINTER_DEFAULTSW pDefault)
708 {
709     FIXME(print, "(%d, %p): stub\n", hPrinter, pDefault);
710     return FALSE;
711 }
712
713 /*****************************************************************************
714  *          GetPrinter32A  [WINSPOOL.187]
715  */
716 BOOL WINAPI GetPrinterA(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
717                     DWORD cbBuf, LPDWORD pcbNeeded)
718 {
719     FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter, 
720          cbBuf, pcbNeeded);
721     return FALSE;
722 }
723
724 /*****************************************************************************
725  *          GetPrinter32W  [WINSPOOL.194]
726  */
727 BOOL WINAPI GetPrinterW(HANDLE hPrinter, DWORD Level, LPBYTE pPrinter,
728                     DWORD cbBuf, LPDWORD pcbNeeded)
729 {
730     FIXME(print, "(%d,%ld,%p,%ld,%p): stub\n", hPrinter, Level, pPrinter,
731           cbBuf, pcbNeeded);
732     return FALSE;
733 }
734
735 /*****************************************************************************
736  *          GetPrinterDriver32A  [WINSPOOL.190]
737  */
738 BOOL WINAPI GetPrinterDriverA(HANDLE hPrinter, LPSTR pEnvironment,
739                                  DWORD Level, LPBYTE pDriverInfo,
740                                  DWORD cbBuf, LPDWORD pcbNeeded)
741 {
742     FIXME(print, "(%d,%s,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment,
743          Level,pDriverInfo,cbBuf, pcbNeeded);
744     return FALSE;
745 }
746
747 /*****************************************************************************
748  *          GetPrinterDriver32W  [WINSPOOL.193]
749  */
750 BOOL WINAPI GetPrinterDriverW(HANDLE hPrinter, LPWSTR pEnvironment,
751                                   DWORD Level, LPBYTE pDriverInfo, 
752                                   DWORD cbBuf, LPDWORD pcbNeeded)
753 {
754     FIXME(print, "(%d,%p,%ld,%p,%ld,%p): stub\n",hPrinter,pEnvironment,
755           Level,pDriverInfo,cbBuf, pcbNeeded);
756     return FALSE;
757 }
758 /*****************************************************************************
759  *          AddPrinterDriver32A  [WINSPOOL.120]
760  */
761 BOOL WINAPI AddPrinterDriverA(LPSTR printerName,DWORD level, 
762                                    LPBYTE pDriverInfo)
763 {
764     FIXME(print, "(%s,%ld,%p): stub\n",printerName,level,pDriverInfo);
765     return FALSE;
766 }
767 /*****************************************************************************
768  *          AddPrinterDriver32W  [WINSPOOL.121]
769  */
770 BOOL WINAPI AddPrinterDriverW(LPWSTR printerName,DWORD level, 
771                                    LPBYTE pDriverInfo)
772 {
773     FIXME(print, "(%s,%ld,%p): stub\n",debugstr_w(printerName),
774           level,pDriverInfo);
775     return FALSE;
776 }
777
778
779