[pywin32-checkins] pywin32/win32/src/win32print win32print.cpp, 1.21, 1.22
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2006-12-08 09:26:48
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32print In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14729/win32/src/win32print Modified Files: win32print.cpp Log Message: Add FlushPrinter, GetDefaultPrinterW, SetDefaultPrinterW and some more constants Return printer handles as PyHANDLE subclass Stop parsing handles with 'i' and 'l' formats Use 'k' format for DWORDS Index: win32print.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32print/win32print.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** win32print.cpp 15 Feb 2005 16:39:04 -0000 1.21 --- win32print.cpp 8 Dec 2006 09:26:46 -0000 1.22 *************** *** 44,50 **** --- 44,89 ---- typedef BOOL (WINAPI *DeletePrinterDriverExfunc)(LPWSTR, LPWSTR, LPWSTR, DWORD, DWORD); static DeletePrinterDriverExfunc pfnDeletePrinterDriverEx=NULL; + typedef BOOL (WINAPI *FlushPrinterfunc)(HANDLE, LPVOID, DWORD, LPDWORD, DWORD); + static FlushPrinterfunc pfnFlushPrinter=NULL; + typedef BOOL (WINAPI *GetDefaultPrinterfunc)(LPWSTR, LPDWORD); + static GetDefaultPrinterfunc pfnGetDefaultPrinter=NULL; + typedef BOOL (WINAPI *SetDefaultPrinterfunc)(LPWSTR); + static SetDefaultPrinterfunc pfnSetDefaultPrinter=NULL; [...1363 lines suppressed...] + AddConstant(dict, "PORT_STATUS_TONER_LOW",PORT_STATUS_TONER_LOW); + AddConstant(dict, "PORT_STATUS_WARMING_UP",PORT_STATUS_WARMING_UP); + AddConstant(dict, "PORT_STATUS_POWER_SAVE",PORT_STATUS_POWER_SAVE); + + AddConstant(dict, "PORT_STATUS_TYPE_ERROR",PORT_STATUS_TYPE_ERROR); + AddConstant(dict, "PORT_STATUS_TYPE_WARNING",PORT_STATUS_TYPE_WARNING); + AddConstant(dict, "PORT_STATUS_TYPE_INFO",PORT_STATUS_TYPE_INFO); + HMODULE hmodule=LoadLibrary("winspool.drv"); if (hmodule!=NULL){ *************** *** 2504,2507 **** --- 2686,2692 ---- pfnGetPrinterDriverDirectory=(GetPrintProcessorDirectoryfunc)GetProcAddress(hmodule,"GetPrinterDriverDirectoryW"); pfnDeletePrinterDriverEx=(DeletePrinterDriverExfunc)GetProcAddress(hmodule,"DeletePrinterDriverExW"); + pfnFlushPrinter=(FlushPrinterfunc)GetProcAddress(hmodule, "FlushPrinter"); + pfnGetDefaultPrinter=(GetDefaultPrinterfunc)GetProcAddress(hmodule, "GetDefaultPrinterW"); + pfnSetDefaultPrinter=(SetDefaultPrinterfunc)GetProcAddress(hmodule, "SetDefaultPrinterW"); } dummy_tuple=PyTuple_New(0); |