Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1:/tmp/cvs-serv27601/win32/src
Modified Files:
win32pdhmodule.cpp
Log Message:
Handle Windows XP differences in determining buffer sizes.
Index: win32pdhmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32pdhmodule.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** win32pdhmodule.cpp 1 Sep 2003 08:09:00 -0000 1.9
--- win32pdhmodule.cpp 6 Oct 2003 13:00:33 -0000 1.10
***************
*** 386,390 ****
Py_END_ALLOW_THREADS
! if (pdhStatus != ERROR_SUCCESS) {
PyWinObject_FreeTCHAR(strMachine);
return PyWin_SetAPIError("EnumObjects for buffer size", pdhStatus);
--- 386,392 ----
Py_END_ALLOW_THREADS
! // it appears NT/2k will return 0, while XP will return
! // PDH_MORE_DATA
! if (pdhStatus != ERROR_SUCCESS && pdhStatus != PDH_MORE_DATA) {
PyWinObject_FreeTCHAR(strMachine);
return PyWin_SetAPIError("EnumObjects for buffer size", pdhStatus);
|