From: SourceForge.net <no...@so...> - 2003-10-02 02:39:56
|
Bugs item #816011, was opened at 2003-10-02 01:35 Message generated for change (Settings changed) made by infidel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=816011&group_id=2435 Category: w32api Group: Feature requests >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Joseph Remes (jremes) Assigned to: Luke Dunstan (infidel) Summary: Missing Win32 function in winspool Initial Comment: GetDefaultPrinter function is missing. This is a relatively new function supported in Win2000 and later. The MS Platform SDK defines it as BOOL GetDefaultPrinter( LPTSTR pszBuffer, // printer name buffer LPDWORD pcchBuffer // size of name buffer ); BTW If I had any idea how to add this myself I would. Sorry to bother you about this. ---------------------------------------------------------------------- Comment By: Luke Dunstan (infidel) Date: 2003-10-02 10:38 Message: Logged In: YES user_id=30442 To add this, you would supply a patch with a ChangeLog entry (I've checked this in): 2003-10-02 Luke Dunstan <in...@us...> * include/winspool.h (GetDefaultPrinter[AW]): Add functions. * lib/winspool.def (GetDefaultPrinter[AW]): Add stubs. Index: include/winspool.h ============================================== ===================== RCS file: /cvs/src/src/winsup/w32api/include/winspool.h,v retrieving revision 1.4 diff -u -p -r1.4 winspool.h --- include/winspool.h 2 Jan 2003 03:47:21 -0000 1.4 +++ include/winspool.h 2 Oct 2003 02:33:41 -0000 @@ -612,6 +612,10 @@ BOOL WINAPI FindClosePrinterChangeNotifi HANDLE WINAPI FindFirstPrinterChangeNotification (HANDLE,DWORD,DWORD,PVOID); HANDLE WINAPI FindNextPrinterChangeNotification (HANDLE,PDWORD,PVOID,PVOID*); BOOL WINAPI FreePrinterNotifyInfo(PPRINTER_NOTIFY_INFO); +#if _WIN32_WINNT >= 0x0500 +BOOL WINAPI GetDefaultPrinterA(LPSTR,LPDWORD); +BOOL WINAPI GetDefaultPrinterW(LPWSTR,LPDWORD); +#endif BOOL WINAPI GetFormA (HANDLE,LPSTR,DWORD,PBYTE,DWORD,PDWORD); BOOL WINAPI GetFormW (HANDLE,LPWSTR,DWORD,PBYTE,DWORD,PDWORD); BOOL WINAPI GetJobA (HANDLE,DWORD,DWORD,PBYTE,DWORD,PDWORD); @@ -698,6 +702,7 @@ typedef PRINTER_DEFAULTSW PRINTER_DEFAUL #define EnumPrinters EnumPrintersW #define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesW #define EnumPrintProcessors EnumPrintProcessorsW +#define GetDefaultPrinter GetDefaultPrinterW #define GetForm GetFormW #define GetJob GetJobW #define GetPrinter GetPrinterW @@ -762,6 +767,7 @@ typedef PRINTER_DEFAULTSA PRINTER_DEFAUL #define EnumPrinters EnumPrintersA #define EnumPrintProcessorDatatypes EnumPrintProcessorDatatypesA #define EnumPrintProcessors EnumPrintProcessorsA +#define GetDefaultPrinter GetDefaultPrinterA #define GetForm GetFormA #define GetJob GetJobA #define GetPrinter GetPrinterA Index: lib/winspool.def ============================================== ===================== RCS file: /cvs/src/src/winsup/w32api/lib/winspool.def,v retrieving revision 1.2 diff -u -p -r1.2 winspool.def --- lib/winspool.def 25 Sep 2003 11:22:22 -0000 1.2 +++ lib/winspool.def 2 Oct 2003 02:33:42 -0000 @@ -85,6 +85,8 @@ FindClosePrinterChangeNotification@4 FindFirstPrinterChangeNotification@16 FindNextPrinterChangeNotification@16 FreePrinterNotifyInfo@4 +GetDefaultPrinterA@8 +GetDefaultPrinterW@8 GetFormA@24 GetFormW@24 GetJobA@24 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=816011&group_id=2435 |