Release 980315
[wine/multimedia.git] / misc / printdrv.c
blob3c735810acd7b41821be811eb52bb0cbdf8de7cf
1 /*
2 * Implementation of some printer driver bits
3 *
4 * Copyright 1996 John Harvey
5 */
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
10 #include <ctype.h>
11 #include "windows.h"
12 #include "win.h"
13 #include "winerror.h"
16 INT16 WINAPI StartDoc16( HDC16 hdc, const DOCINFO16 *lpdoc )
18 INT16 retVal;
19 printf("In startdoc16(%p)\n", lpdoc );
20 printf("In StartDoc16 %d 0x%lx:0x%p 0x%lx:0x%p\n",lpdoc->cbSize,
21 lpdoc->lpszDocName,PTR_SEG_TO_LIN(lpdoc->lpszDocName),
22 lpdoc->lpszOutput,PTR_SEG_TO_LIN(lpdoc->lpszOutput));
23 printf("In StartDoc16 %d %s %s\n",lpdoc->cbSize,
24 (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName),
25 (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput));
26 retVal = Escape16(hdc, STARTDOC, sizeof(DOCINFO16), lpdoc->lpszDocName, 0);
27 printf("Escape16 returned %d\n",retVal);
28 return retVal;
31 INT16 WINAPI EndDoc16(HDC16 hdc)
33 return Escape16(hdc, ENDDOC, 0, 0, 0);
38 DWORD WINAPI DrvGetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
39 LPDWORD lpType, LPBYTE lpPrinterData,
40 int cbData, LPDWORD lpNeeded)
42 fprintf(stderr,"In DrvGetPrinterData ");
43 if (HIWORD(lpPrinter))
44 fprintf(stderr,"printer %s ",lpPrinter);
45 else
46 fprintf(stderr,"printer %p ",lpPrinter);
47 if (HIWORD(lpProfile))
48 fprintf(stderr,"profile %s ",lpProfile);
49 else
50 fprintf(stderr,"profile %p ",lpProfile);
51 fprintf(stderr,"lpType %p\n",lpType);
52 return 0;
57 DWORD WINAPI DrvSetPrinterData(LPSTR lpPrinter, LPSTR lpProfile,
58 LPDWORD lpType, LPBYTE lpPrinterData,
59 DWORD dwSize)
61 fprintf(stderr,"In DrvSetPrinterData ");
62 if (HIWORD(lpPrinter))
63 fprintf(stderr,"printer %s ",lpPrinter);
64 else
65 fprintf(stderr,"printer %p ",lpPrinter);
66 if (HIWORD(lpProfile))
67 fprintf(stderr,"profile %s ",lpProfile);
68 else
69 fprintf(stderr,"profile %p ",lpProfile);
70 fprintf(stderr,"lpType %p\n",lpType);
71 return 0;
75 INT32 WINAPI DeviceCapabilities32A(LPCSTR printer,LPCSTR target,WORD z,
76 LPSTR a,LPDEVMODE32A b)
78 fprintf(stderr,"DeviceCapabilitiesA(%s,%s,%d,%p,%p)\n",printer,target,z,a,b);
79 return 1;
82 LONG WINAPI DocumentProperties32A(HWND32 hWnd,HANDLE32 hPrinter,
83 LPSTR pDeviceName, LPDEVMODE32A pDevModeOutput,
84 LPDEVMODE32A pDevModeInput,DWORD fMode )
86 fprintf(stderr,"DocumentPropertiesA(%d,%d,%s,%p,%p,%ld)\n",
87 hWnd,hPrinter,pDeviceName,pDevModeOutput,pDevModeInput,fMode
89 return 1;
92 BOOL32 WINAPI OpenPrinter32A(LPSTR lpPrinterName,HANDLE32 *phPrinter,
93 LPPRINTER_DEFAULTS32A pDefault)
95 fprintf(stderr,"OpenPrinter32A(%s,%p,%p), stub\n",
96 lpPrinterName, phPrinter, pDefault);
97 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
98 return FALSE;
100 BOOL32 WINAPI EnumPrinters32A(DWORD dwType, LPSTR lpszName,
101 DWORD dwLevel, LPBYTE lpbPrinters,
102 DWORD cbBuf, LPDWORD lpdwNeeded,
103 LPDWORD lpdwReturned)
105 fprintf(stderr,"EnumPrinters32A nearly empty stub\n");
106 *lpdwReturned=0;
107 return TRUE;