Thread: [pywin32-checkins] pywin32/win32/src win32apimodule.cpp,1.34,1.35
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-03-30 04:35:40
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2324 Modified Files: win32apimodule.cpp Log Message: Exclude a number of functions when building under mainwin Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** win32apimodule.cpp 20 Jan 2004 22:57:53 -0000 1.34 --- win32apimodule.cpp 30 Mar 2004 04:24:01 -0000 1.35 *************** *** 682,685 **** --- 682,686 ---- } + #ifndef DONT_HAVE_GENERATE_CONSOLE_CTRL_EVENT // @pymethod int|win32api|GenerateConsoleCtrlEvent|Send a specified signal to a console process group that shares the console associated with the calling process. static PyObject * *************** *** 700,703 **** --- 701,705 ---- return Py_None; } + #endif // DONT_HAVE_GENERATE_CONSOLE_CTRL_EVENT // @pymethod int|win32api|GetLogicalDrives|Returns a bitmask representing the currently available disk drives. *************** *** 1216,1219 **** --- 1218,1222 ---- } + #ifndef DONT_HAVE_SYSTEM_SHUTDOWN // @pymethod |win32api|AbortSystemShutdown|Aborts a system shutdown static PyObject * *************** *** 1274,1277 **** --- 1277,1281 ---- return Py_None; } + #endif // DONT_HAVE_SYSTEM_SHUTDOWN // @pymethod |win32api|ExitWindows|Logs off the current user *************** *** 1518,1522 **** SYSTEM_INFO info; GetSystemInfo( &info ); ! return Py_BuildValue("iiiiiiii(ii)", info.dwOemId, info.dwPageSize, info.lpMinimumApplicationAddress, info.lpMaximumApplicationAddress, info.dwActiveProcessorMask, info.dwNumberOfProcessors, --- 1522,1532 ---- SYSTEM_INFO info; GetSystemInfo( &info ); ! return Py_BuildValue("iiiiiiii(ii)", ! #if !defined(MAINWIN) ! info.dwOemId, ! #else ! 0, ! #endif // MAINWIN ! info.dwPageSize, info.lpMinimumApplicationAddress, info.lpMaximumApplicationAddress, info.dwActiveProcessorMask, info.dwNumberOfProcessors, *************** *** 3956,3959 **** --- 3966,3970 ---- } + #ifndef MAINWIN // @pymethod object|win32api|Apply|Calls a Python function, but traps Win32 exceptions. static PyObject *PyApply(PyObject *self, PyObject *args) *************** *** 4021,4024 **** --- 4032,4036 ---- // or other diagnostics are printed) } + #endif // MAINWIN // @pymethod |GetFileVersionInfo||Retrieve version info for specified file *************** *** 4192,4197 **** --- 4204,4214 ---- // @module win32api|A module, encapsulating the Windows Win32 API. static struct PyMethodDef win32api_functions[] = { + #ifndef DONT_HAVE_SYSTEM_SHUTDOWN {"AbortSystemShutdown", PyAbortSystemShutdown,1}, // @pymeth AbortSystemShutdown|Aborts a system shutdown + {"InitiateSystemShutdown", PyInitiateSystemShutdown,1}, // @pymeth InitiateSystemShutdown|Initiates a shutdown and optional restart of the specified computer. + #endif + #ifndef MAINWIN {"Apply", PyApply, 1}, // @pymeth Apply|Calls a Python function, but traps Win32 exceptions. + #endif {"Beep", PyBeep, 1}, // @pymeth Beep|Generates a simple tone on the speaker. {"BeginUpdateResource", PyBeginUpdateResource, 1 }, // @pymeth BeginUpdateResource|Begins an update cycle for a PE file. *************** *** 4219,4223 **** --- 4236,4243 ---- {"FormatMessageW", PyFormatMessageW, 1}, // @pymeth FormatMessageW|Return an error message string (as a Unicode object). {"FreeLibrary", PyFreeLibrary,1}, // @pymeth FreeLibrary|Decrements the reference count of the loaded dynamic-link library (DLL) module. + #ifndef DONT_HAVE_GENERATE_CONSOLE_CTRL_EVENT {"GenerateConsoleCtrlEvent", PyGenerateConsoleCtrlEvent, 1}, // @pymeth GenerateConsoleCtrlEvent|Send a specified signal to a console process group that shares the console associated with the calling process. + #endif + {"GetAsyncKeyState", PyGetAsyncKeyState,1}, // @pymeth GetAsyncKeyState|Retrieves the asynch state of a virtual key code. {"GetCommandLine", PyGetCommandLine, 1}, // @pymeth GetCommandLine|Return the application's command line. *************** *** 4272,4276 **** {"GetUserDefaultLangID",PyGetUserDefaultLangID,1}, // @pymeth GetUserDefaultLangID|Retrieves the user default language identifier. {"GetUserDefaultLCID", PyGetUserDefaultLCID,1}, // @pymeth GetUserDefaultLCID|Retrieves the user default locale identifier. - {"InitiateSystemShutdown", PyInitiateSystemShutdown,1}, // @pymeth InitiateSystemShutdown|Initiates a shutdown and optional restart of the specified computer. {"keybd_event", Pykeybd_event, 1}, // @pymeth keybd_event|Simulate a keyboard event {"mouse_event", Pymouse_event, 1}, // @pymeth mouse_event|Simulate a mouse event --- 4292,4295 ---- |