Update of /cvsroot/pywin32/pywin32/win32/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21318/win32/src
Modified Files:
PyHANDLE.cpp PyOVERLAPPED.cpp PyWinTypes.h _winxptheme.i
win2krasmodule.cpp win32api_display.cpp win32apimodule.cpp
win32clipboardmodule.cpp win32consolemodule.cpp
win32credmodule.cpp win32crypt.i win32file.i win32gui.i
win32inet.i win32job.i win32pdhmodule.cpp win32process.i
win32profilemodule.cpp win32security.i win32security_ds.cpp
win32service.i win32transactionmodule.cpp win32tsmodule.cpp
Log Message:
PyWinObject_AsHANDLE losts its 3rd param - None is always OK (zero always
was, so the distinction is futile
Index: win32process.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32process.i,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** win32process.i 6 Mar 2007 19:44:06 -0000 1.28
--- win32process.i 3 Jun 2007 14:53:07 -0000 1.29
***************
*** 204,208 ****
{
HANDLE htmp;
! if (!PyWinObject_AsHANDLE(v, &htmp, TRUE))
return -1;
*ph=htmp;
--- 204,208 ----
{
HANDLE htmp;
! if (!PyWinObject_AsHANDLE(v, &htmp))
return -1;
*ph=htmp;
***************
*** 430,434 ****
&flags)) // @pyparm int|flags||
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obFunc, (void **)&Func))
--- 430,434 ----
&flags)) // @pyparm int|flags||
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess))
return NULL;
if (!PyWinLong_AsVoidPtr(obFunc, (void **)&Func))
***************
*** 828,832 ****
&obth)) // @pyparm <o PyHANDLE>|Process||Handle to a process
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnGetProcessPriorityBoost)(th, &ret))
--- 828,832 ----
&obth)) // @pyparm <o PyHANDLE>|Process||Handle to a process
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnGetProcessPriorityBoost)(th, &ret))
***************
*** 846,850 ****
&disable)) // @pyparm boolean|DisablePriorityBoost||True to disable or False to enable
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnSetProcessPriorityBoost)(th, disable))
--- 846,850 ----
&disable)) // @pyparm boolean|DisablePriorityBoost||True to disable or False to enable
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnSetProcessPriorityBoost)(th, disable))
***************
*** 864,868 ****
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnGetThreadPriorityBoost)(th, &ret))
--- 864,868 ----
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnGetThreadPriorityBoost)(th, &ret))
***************
*** 882,886 ****
&disable)) // @pyparm boolean|DisablePriorityBoost||True to disable or False to enable
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnSetThreadPriorityBoost)(th, disable))
--- 882,886 ----
&disable)) // @pyparm boolean|DisablePriorityBoost||True to disable or False to enable
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnSetThreadPriorityBoost)(th, disable))
***************
*** 900,904 ****
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnGetThreadPriorityBoost)(th, &ret))
--- 900,904 ----
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnGetThreadPriorityBoost)(th, &ret))
***************
*** 917,921 ****
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE))
return NULL;
if (!(*pfnGetThreadTimes)(th, &ft[0], &ft[1], &ft[2], &ft[3]))
--- 917,921 ----
&obth)) // @pyparm <o PyHANDLE>|Thread||Handle to a thread
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
if (!(*pfnGetThreadTimes)(th, &ft[0], &ft[1], &ft[2], &ft[3]))
***************
*** 945,949 ****
&obhprocess)) // @pyparm <o PyHANDLE>|Process||Handle to a process
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess, FALSE))
return NULL;
pid=(*pfnGetProcessId)(hprocess);
--- 945,949 ----
&obhprocess)) // @pyparm <o PyHANDLE>|Process||Handle to a process
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess))
return NULL;
pid=(*pfnGetProcessId)(hprocess);
***************
*** 1006,1010 ****
&obhProcess)) // @pyparm <o PyHANDLE>|hProcess||handle to the process of interest
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
if (!GetProcessAffinityMask(hProcess, &processmask, &systemmask))
--- 1006,1010 ----
&obhProcess)) // @pyparm <o PyHANDLE>|hProcess||handle to the process of interest
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
if (!GetProcessAffinityMask(hProcess, &processmask, &systemmask))
***************
*** 1035,1039 ****
&dwMask)) // @pyparm int|mask||a processor affinity mask
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
if (!(*pfnSetProcessAffinityMask)(hProcess, dwMask))
--- 1035,1039 ----
&dwMask)) // @pyparm int|mask||a processor affinity mask
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
if (!(*pfnSetProcessAffinityMask)(hProcess, dwMask))
***************
*** 1060,1064 ****
&dwMask)) // @pyparm int|ThreadAffinityMask||a processor affinity mask
return NULL;
! if (!PyWinObject_AsHANDLE(obhThread, &hThread, FALSE))
return NULL;
prevMask=SetThreadAffinityMask(hThread, dwMask);
--- 1060,1064 ----
&dwMask)) // @pyparm int|ThreadAffinityMask||a processor affinity mask
return NULL;
! if (!PyWinObject_AsHANDLE(obhThread, &hThread))
return NULL;
prevMask=SetThreadAffinityMask(hThread, dwMask);
***************
*** 1187,1191 ****
if (!PyArg_ParseTuple(args, "O:EnumProcessModules", &obhprocess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess, FALSE))
return NULL;
bytes_allocated=nbr_hmods_allocated*sizeof(HMODULE);
--- 1187,1191 ----
if (!PyArg_ParseTuple(args, "O:EnumProcessModules", &obhprocess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess))
return NULL;
bytes_allocated=nbr_hmods_allocated*sizeof(HMODULE);
***************
*** 1247,1253 ****
if (!PyArg_ParseTuple(args, "OO:GetModuleFileNameEx", &obhprocess, &obhmod))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess, FALSE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhmod, (HANDLE *)&hmod, FALSE))
return NULL;
--- 1247,1253 ----
if (!PyArg_ParseTuple(args, "OO:GetModuleFileNameEx", &obhprocess, &obhmod))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhmod, (HANDLE *)&hmod))
return NULL;
***************
*** 1294,1298 ****
if (!PyArg_ParseTuple(args, "O:GetProcessMemoryInfo", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
--- 1294,1298 ----
if (!PyArg_ParseTuple(args, "O:GetProcessMemoryInfo", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
***************
*** 1327,1331 ****
if (!PyArg_ParseTuple(args, "O:GetProcessTimes", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
--- 1327,1331 ----
if (!PyArg_ParseTuple(args, "O:GetProcessTimes", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
***************
*** 1356,1360 ****
if (!PyArg_ParseTuple(args, "O:GetProcessIoCounters", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
if (!(*pfnGetProcessIoCounters)(hProcess, &ioc)){
--- 1356,1360 ----
if (!PyArg_ParseTuple(args, "O:GetProcessIoCounters", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
if (!(*pfnGetProcessIoCounters)(hProcess, &ioc)){
***************
*** 1391,1395 ****
if (!PyArg_ParseTuple(args, "O:GetProcessWorkingSetSize", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
if (!(*pfnGetProcessWorkingSetSize)(hProcess, &MinimumWorkingSetSize, &MaximumWorkingSetSize)){
--- 1391,1395 ----
if (!PyArg_ParseTuple(args, "O:GetProcessWorkingSetSize", &obhProcess))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
if (!(*pfnGetProcessWorkingSetSize)(hProcess, &MinimumWorkingSetSize, &MaximumWorkingSetSize)){
***************
*** 1425,1429 ****
&MaximumWorkingSetSize)) // @pyparm int|MaximumWorkingSetSize||Maximum number of bytes to keep in physical memory
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess, FALSE))
return NULL;
if (!(*pfnSetProcessWorkingSetSize)(hProcess, MinimumWorkingSetSize, MaximumWorkingSetSize))
--- 1425,1429 ----
&MaximumWorkingSetSize)) // @pyparm int|MaximumWorkingSetSize||Maximum number of bytes to keep in physical memory
return NULL;
! if (!PyWinObject_AsHANDLE(obhProcess, &hProcess))
return NULL;
if (!(*pfnSetProcessWorkingSetSize)(hProcess, MinimumWorkingSetSize, MaximumWorkingSetSize))
***************
*** 1487,1491 ****
if (!PyArg_ParseTuple(args, "Ok:GetGuiResources", &obhprocess, &flags))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess, FALSE))
return NULL;
handle_cnt=(*pfnGetGuiResources)(hprocess, flags);
--- 1487,1491 ----
if (!PyArg_ParseTuple(args, "Ok:GetGuiResources", &obhprocess, &flags))
return NULL;
! if (!PyWinObject_AsHANDLE(obhprocess, &hprocess))
return NULL;
handle_cnt=(*pfnGetGuiResources)(hprocess, flags);
Index: win32inet.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32inet.i,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** win32inet.i 16 Jan 2007 19:04:21 -0000 1.5
--- win32inet.i 3 Jun 2007 14:53:07 -0000 1.6
***************
*** 74,88 ****
%typemap(python,in) HINTERNET {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE))
return NULL;
}
%typemap(python,in) PyHINTERNET {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, FALSE))
return NULL;
}
%typemap(python,in) PyHINTERNET INPUT_NULLOK {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target, TRUE))
return NULL;
}
--- 74,88 ----
%typemap(python,in) HINTERNET {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target))
return NULL;
}
%typemap(python,in) PyHINTERNET {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target))
return NULL;
}
%typemap(python,in) PyHINTERNET INPUT_NULLOK {
! if (!PyWinObject_AsHANDLE($source, (HANDLE *)&$target))
return NULL;
}
***************
*** 251,255 ****
if (!PyArg_ParseTuple(args, "OOOi:InternetOpenUrl", &obH, &obURL, &obHeaders, &flags))
return NULL;
! if (!PyWinObject_AsHANDLE(obH, (HANDLE *)&hiin, FALSE))
goto done;
if (!PyWinObject_AsString(obURL, &szURL, FALSE))
--- 251,255 ----
if (!PyArg_ParseTuple(args, "OOOi:InternetOpenUrl", &obH, &obURL, &obHeaders, &flags))
return NULL;
! if (!PyWinObject_AsHANDLE(obH, (HANDLE *)&hiin))
goto done;
if (!PyWinObject_AsString(obURL, &szURL, FALSE))
***************
*** 389,393 ****
return NULL;
}
! if (!PyWinObject_AsHANDLE(obH, (HANDLE *)&hiin, FALSE))
goto done;
Py_BEGIN_ALLOW_THREADS
--- 389,393 ----
return NULL;
}
! if (!PyWinObject_AsHANDLE(obH, (HANDLE *)&hiin))
goto done;
Py_BEGIN_ALLOW_THREADS
Index: win32apimodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** win32apimodule.cpp 1 Jun 2007 14:57:19 -0000 1.76
--- win32apimodule.cpp 3 Jun 2007 14:53:07 -0000 1.77
***************
*** 306,310 ****
&iFileNum)) // @pyparm int|fileNum|0xFFFFFFFF|Specifies the index of the file to query.
return NULL;
! if (!PyWinObject_AsHANDLE(obhDrop, (HANDLE *)&hDrop, FALSE))
return NULL;
if (iFileNum<0)
--- 306,310 ----
&iFileNum)) // @pyparm int|fileNum|0xFFFFFFFF|Specifies the index of the file to query.
return NULL;
! if (!PyWinObject_AsHANDLE(obhDrop, (HANDLE *)&hDrop))
return NULL;
if (iFileNum<0)
***************
*** 333,337 ****
if (!PyArg_ParseTuple(args, "O:DragFinish", &obhDrop))
return NULL;
! if (!PyWinObject_AsHANDLE(obhDrop, (HANDLE *)&hDrop, FALSE))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 333,337 ----
if (!PyArg_ParseTuple(args, "O:DragFinish", &obhDrop))
return NULL;
! if (!PyWinObject_AsHANDLE(obhDrop, (HANDLE *)&hDrop))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 551,555 ****
if (!PyArg_ParseTuple(args, "O:FindNextChangeNotification", &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 551,555 ----
if (!PyArg_ParseTuple(args, "O:FindNextChangeNotification", &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 571,575 ****
if (!PyArg_ParseTuple(args, "O:FindCloseChangeNotification", &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 571,575 ----
if (!PyArg_ParseTuple(args, "O:FindCloseChangeNotification", &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 623,627 ****
return NULL;
if (flags & FORMAT_MESSAGE_FROM_HMODULE) {
! if (!PyWinObject_AsHANDLE(obSource, (HANDLE *)&pSource, TRUE))
return NULL;
} else if (flags & FORMAT_MESSAGE_FROM_STRING) {
--- 623,627 ----
return NULL;
if (flags & FORMAT_MESSAGE_FROM_HMODULE) {
! if (!PyWinObject_AsHANDLE(obSource, (HANDLE *)&pSource))
return NULL;
} else if (flags & FORMAT_MESSAGE_FROM_STRING) {
***************
*** 704,708 ****
goto cleanup;
if (flags & FORMAT_MESSAGE_FROM_HMODULE) {
! if (!PyWinObject_AsHANDLE(obSource, (HANDLE *)&pSource, TRUE))
goto cleanup;
} else if (flags & FORMAT_MESSAGE_FROM_STRING) {
--- 704,708 ----
goto cleanup;
if (flags & FORMAT_MESSAGE_FROM_HMODULE) {
! if (!PyWinObject_AsHANDLE(obSource, (HANDLE *)&pSource))
goto cleanup;
} else if (flags & FORMAT_MESSAGE_FROM_STRING) {
***************
*** 1124,1128 ****
&obhCursor)) // @pyparm <o PyHANDLE>|hCursor||The new cursor. Can be None to remove cursor.
return NULL;
! if (!PyWinObject_AsHANDLE(obhCursor, (HANDLE *)&hCursor, TRUE))
return NULL;
// @pyseeapi SetCursor
--- 1124,1128 ----
&obhCursor)) // @pyparm <o PyHANDLE>|hCursor||The new cursor. Can be None to remove cursor.
return NULL;
! if (!PyWinObject_AsHANDLE(obhCursor, (HANDLE *)&hCursor))
return NULL;
// @pyseeapi SetCursor
***************
*** 1145,1149 ****
&obid)) // @pyparm <o PyResourceId>|cursorid||The ID of the cursor. Can be a resource id or for system cursors, one of win32con.IDC_*
return NULL;
! if (!PyWinObject_AsHANDLE(obhInstance, (HANDLE *)&hInstance, TRUE))
return NULL;
if (!PyWinObject_AsResourceId(obid, &id))
--- 1145,1149 ----
&obid)) // @pyparm <o PyResourceId>|cursorid||The ID of the cursor. Can be a resource id or for system cursors, one of win32con.IDC_*
return NULL;
! if (!PyWinObject_AsHANDLE(obhInstance, (HANDLE *)&hInstance))
return NULL;
if (!PyWinObject_AsResourceId(obid, &id))
***************
*** 1352,1356 ****
&obhkl)) // @pyparm <o PyHANDLE>|hkl||Handle to a keyboard layout at returned by <om win32api.LoadKeyboardLayout>
return (NULL);
! if (!PyWinObject_AsHANDLE(obhkl, (HANDLE *)&hkl, FALSE))
return NULL;
int ret;
--- 1352,1356 ----
&obhkl)) // @pyparm <o PyHANDLE>|hkl||Handle to a keyboard layout at returned by <om win32api.LoadKeyboardLayout>
return (NULL);
! if (!PyWinObject_AsHANDLE(obhkl, (HANDLE *)&hkl))
return NULL;
int ret;
***************
*** 1420,1424 ****
if (!PyArg_ParseTuple(args, "O:GetModuleFileName", &obhMod))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhMod, (HANDLE *)&hMod, TRUE))
return NULL;
// @pyseeapi GetModuleFileName
--- 1420,1424 ----
if (!PyArg_ParseTuple(args, "O:GetModuleFileName", &obhMod))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhMod, (HANDLE *)&hMod))
return NULL;
// @pyseeapi GetModuleFileName
***************
*** 1441,1445 ****
if (!PyArg_ParseTuple(args, "O:GetModuleFileNameW", &obhMod))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhMod, (HANDLE *)&hMod, TRUE))
return NULL;
// @pyseeapi GetModuleFileName
--- 1441,1445 ----
if (!PyArg_ParseTuple(args, "O:GetModuleFileNameW", &obhMod))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhMod, (HANDLE *)&hMod))
return NULL;
// @pyseeapi GetModuleFileName
***************
*** 1632,1636 ****
if (!PyArg_ParseTuple(args, "sOl:LoadLibraryEx", &fname, &obhandle, &flags))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, &handle, TRUE))
return NULL;
// @pyseeapi LoadLibraryEx
--- 1632,1636 ----
if (!PyArg_ParseTuple(args, "sOl:LoadLibraryEx", &fname, &obhandle, &flags))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, &handle))
return NULL;
// @pyseeapi LoadLibraryEx
***************
*** 1652,1656 ****
if (!PyArg_ParseTuple(args, "O:FreeLibrary", &obhandle))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, (HANDLE *)&handle, FALSE))
return NULL;
// @pyseeapi FreeLibrary
--- 1652,1656 ----
if (!PyArg_ParseTuple(args, "O:FreeLibrary", &obhandle))
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, (HANDLE *)&handle))
return NULL;
// @pyseeapi FreeLibrary
***************
*** 1676,1680 ****
&obfnName)) // @pyparm <o PyResourceId>|functionName||Specifies the name of the procedure, or its ordinal value
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, (HANDLE *)&handle, FALSE))
return NULL;
// GetProcAddress is char only
--- 1676,1680 ----
&obfnName)) // @pyparm <o PyResourceId>|functionName||Specifies the name of the procedure, or its ordinal value
return (NULL);
! if (!PyWinObject_AsHANDLE(obhandle, (HANDLE *)&handle))
return NULL;
// GetProcAddress is char only
***************
*** 2452,2456 ****
&oblParam)) // @pyparm int|lParam|None|The lParam for the message
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
if (!PyWinObject_AsPARAM(obwParam, &wParam))
--- 2452,2456 ----
&oblParam)) // @pyparm int|lParam|None|The lParam for the message
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (!PyWinObject_AsPARAM(obwParam, &wParam))
***************
*** 2682,2686 ****
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, FALSE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans, FALSE)
&&PyWinObject_AsWCHAR(obclass, &class_name, TRUE)
&&PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE)){
--- 2682,2686 ----
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, FALSE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans)
&&PyWinObject_AsWCHAR(obclass, &class_name, TRUE)
&&PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE)){
***************
*** 2749,2753 ****
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, FALSE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans, FALSE)){
rc=(*pfnRegDeleteKeyTransacted)(hKey, subKey, access, reserved, htrans, extparam);
if (rc!=ERROR_SUCCESS)
--- 2749,2753 ----
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, FALSE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans)){
rc=(*pfnRegDeleteKeyTransacted)(hKey, subKey, access, reserved, htrans, extparam);
if (rc!=ERROR_SUCCESS)
***************
*** 3001,3005 ****
if (!PyWinObject_AsHKEY(obreghandle, ®handle))
return NULL;
! if (!PyWinObject_AsHANDLE(obevent, &hevent, TRUE)) // handle should be NULL if asynch is False
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 3001,3005 ----
if (!PyWinObject_AsHKEY(obreghandle, ®handle))
return NULL;
! if (!PyWinObject_AsHANDLE(obevent, &hevent)) // handle should be NULL if asynch is False
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 3417,3421 ****
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, TRUE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans, FALSE)){
rc=(*pfnRegOpenKeyTransacted)(hKey, subKey, options, access, &retKey, htrans, extparam);
if (rc!=ERROR_SUCCESS)
--- 3417,3421 ----
if (PyWinObject_AsHKEY(obKey, &hKey)
&&PyWinObject_AsWCHAR(obsubKey, &subKey, TRUE)
! &&PyWinObject_AsHANDLE(obtrans, &htrans)){
rc=(*pfnRegOpenKeyTransacted)(hKey, subKey, options, access, &retKey, htrans, extparam);
if (rc!=ERROR_SUCCESS)
***************
*** 3935,3939 ****
&oblParam)) // @pyparm int/string|lParam|None|The lParam for the message
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
if (!PyWinObject_AsPARAM(obwParam, &wParam))
--- 3935,3939 ----
&oblParam)) // @pyparm int/string|lParam|None|The lParam for the message
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (!PyWinObject_AsPARAM(obwParam, &wParam))
***************
*** 4039,4043 ****
&show))// @pyparm int|bShow||Specifies whether the application is shown when it is opened. If the lpszFile parameter specifies a document file, this parameter is zero.
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE))
return NULL;
if (dir==NULL)
--- 4039,4043 ----
&show))// @pyparm int|bShow||Specifies whether the application is shown when it is opened. If the lpszFile parameter specifies a document file, this parameter is zero.
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (dir==NULL)
***************
*** 4108,4112 ****
&dataOb)) // @pyparm int/string|data|0|Additional data specific to the help call.
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE))
return NULL;
if (dataOb==Py_None)
--- 4108,4112 ----
&dataOb)) // @pyparm int/string|data|0|Additional data specific to the help call.
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (dataOb==Py_None)
***************
*** 4213,4217 ****
if (!PyArg_ParseTuple(args, "Os|zli:MessageBox(Ex)", &obhwnd, &message, &title, &style, &langId))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, TRUE))
return NULL;
--- 4213,4217 ----
if (!PyArg_ParseTuple(args, "Os|zli:MessageBox(Ex)", &obhwnd, &message, &title, &style, &langId))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
***************
*** 4255,4259 ****
if (!PyArg_ParseTuple(args, "Oi:GetWindowLong", &obhwnd, &offset))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
--- 4255,4259 ----
if (!PyArg_ParseTuple(args, "Oi:GetWindowLong", &obhwnd, &offset))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
***************
*** 4278,4282 ****
if (!PyArg_ParseTuple(args, "OiO:SetWindowLong", &obhwnd, &offset, &obval))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obval, (void **)&newVal))
--- 4278,4282 ----
if (!PyArg_ParseTuple(args, "OiO:SetWindowLong", &obhwnd, &offset, &obval))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (!PyWinLong_AsVoidPtr(obval, (void **)&newVal))
***************
*** 4301,4305 ****
if (!PyArg_ParseTuple(args, "OiH:SetWindowWord", &obhwnd, &offset, &newVal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 4301,4305 ----
if (!PyArg_ParseTuple(args, "OiH:SetWindowWord", &obhwnd, &offset, &newVal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 4323,4327 ****
if (!PyArg_ParseTuple(args, "OiO:SetClassLong", &obhwnd, &offset, &obval))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obval, (void **)&newVal))
--- 4323,4327 ----
if (!PyArg_ParseTuple(args, "OiO:SetClassLong", &obhwnd, &offset, &obval))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
if (!PyWinLong_AsVoidPtr(obval, (void **)&newVal))
***************
*** 4347,4351 ****
if (!PyArg_ParseTuple(args, "OiH:SetClassWord", &obhwnd, &offset, &newVal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
--- 4347,4351 ----
if (!PyArg_ParseTuple(args, "OiH:SetClassWord", &obhwnd, &offset, &newVal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
PyW32_BEGIN_ALLOW_THREADS
***************
*** 4645,4649 ****
&numChars)) // @pyparm int|numChars|1024|Number of characters to allocate for the return buffer.
return NULL;
! if (!PyWinObject_AsHANDLE(obhModule, (HANDLE *)&hModule, FALSE))
return NULL;
int numBytes = sizeof(WCHAR) * numChars;
--- 4645,4649 ----
&numChars)) // @pyparm int|numChars|1024|Number of characters to allocate for the return buffer.
return NULL;
! if (!PyWinObject_AsHANDLE(obhModule, (HANDLE *)&hModule))
return NULL;
int numBytes = sizeof(WCHAR) * numChars;
***************
*** 4680,4684 ****
) )
return NULL;
! if (PyWinObject_AsHANDLE(obhModule, (HANDLE *)&hModule, TRUE)
&&PyWinObject_AsResourceId(obType, &lpType)
&&PyWinObject_AsResourceId(obName, &lpName)){
--- 4680,4684 ----
) )
return NULL;
! if (PyWinObject_AsHANDLE(obhModule, (HANDLE *)&hModule)
&&PyWinObject_AsResourceId(obType, &lpType)
&&PyWinObject_AsResourceId(obName, &lpName)){
***************
*** 4751,4755 ****
return NULL;
! if (PyWinObject_AsHANDLE(obhUpdate, (HANDLE *)&hUpdate, FALSE)
&&PyWinObject_AsResourceIdW(obType, &lpType)
&&PyWinObject_AsResourceIdW(obName, &lpName)
--- 4751,4755 ----
return NULL;
! if (PyWinObject_AsHANDLE(obhUpdate, (HANDLE *)&hUpdate)
&&PyWinObject_AsResourceIdW(obType, &lpType)
&&PyWinObject_AsResourceIdW(obName, &lpName)
***************
*** 4779,4783 ****
) )
return NULL;
! if (!PyWinObject_AsHANDLE(obhUpdate, (HANDLE *)&hUpdate, FALSE))
return NULL;
if ( !EndUpdateResource(hUpdate, fDiscard) )
--- 4779,4783 ----
) )
return NULL;
! if (!PyWinObject_AsHANDLE(obhUpdate, (HANDLE *)&hUpdate))
return NULL;
if ( !EndUpdateResource(hUpdate, fDiscard) )
***************
*** 4817,4821 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obhmodule, (HANDLE *)&hmodule, FALSE))
return NULL;
if (!PyWinObject_AsResourceId(obrestype, &restype))
--- 4817,4821 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obhmodule, (HANDLE *)&hmodule))
return NULL;
if (!PyWinObject_AsResourceId(obrestype, &restype))
Index: win32api_display.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32api_display.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** win32api_display.cpp 24 May 2007 06:01:05 -0000 1.5
--- win32api_display.cpp 3 Jun 2007 14:53:07 -0000 1.6
***************
*** 438,442 ****
&obrect)) // @pyparm <o PyRECT>|rcClip|None|Clipping rectangle, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obhdc, (HANDLE *)&hdc, TRUE))
return NULL;
if (obrect==Py_None)
--- 438,442 ----
&obrect)) // @pyparm <o PyRECT>|rcClip|None|Clipping rectangle, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obhdc, (HANDLE *)&hdc))
return NULL;
if (obrect==Py_None)
***************
*** 554,558 ****
&Flags)) // @pyparm int|Flags|0|Flags that determine default behaviour, one of MONITOR_DEFAULTTONEAREST,MONITOR_DEFAULTTONULL,MONITOR_DEFAULTTOPRIMARY
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd, FALSE))
return NULL;
hmonitor=(*pfnMonitorFromWindow)(hwnd, Flags);
--- 554,558 ----
&Flags)) // @pyparm int|Flags|0|Flags that determine default behaviour, one of MONITOR_DEFAULTTONEAREST,MONITOR_DEFAULTTONULL,MONITOR_DEFAULTTOPRIMARY
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hwnd))
return NULL;
hmonitor=(*pfnMonitorFromWindow)(hwnd, Flags);
Index: win32consolemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** win32consolemodule.cpp 24 May 2007 06:01:05 -0000 1.10
--- win32consolemodule.cpp 3 Jun 2007 14:53:07 -0000 1.11
***************
*** 1585,1589 ****
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
// Handle will be duplicated so caller is still responsible for original handle
--- 1585,1589 ----
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O", keywords, &obh))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
// Handle will be duplicated so caller is still responsible for original handle
Index: win32clipboardmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** win32clipboardmodule.cpp 1 Jun 2007 13:36:53 -0000 1.19
--- win32clipboardmodule.cpp 3 Jun 2007 14:53:07 -0000 1.20
***************
*** 62,68 ****
return NULL;
}
! if (!PyWinObject_AsHANDLE(obhWndRemove, (HANDLE *)&hWndRemove, FALSE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhWndNewNext, (HANDLE *)&hWndNewNext, TRUE))
return NULL;
--- 62,68 ----
return NULL;
}
! if (!PyWinObject_AsHANDLE(obhWndRemove, (HANDLE *)&hWndRemove))
return NULL;
! if (!PyWinObject_AsHANDLE(obhWndNewNext, (HANDLE *)&hWndNewNext))
return NULL;
***************
*** 466,470 ****
if (!PyArg_ParseTuple(args, "O", &obhglobal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhglobal, &hglobal, FALSE))
return NULL;
size_t size = GlobalSize(hglobal);
--- 466,470 ----
if (!PyArg_ParseTuple(args, "O", &obhglobal))
return NULL;
! if (!PyWinObject_AsHANDLE(obhglobal, &hglobal))
return NULL;
size_t size = GlobalSize(hglobal);
***************
*** 787,791 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obhWnd, (HANDLE *)&hWnd, TRUE))
return NULL;
BOOL rc;
--- 787,791 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obhWnd, (HANDLE *)&hWnd))
return NULL;
BOOL rc;
***************
*** 896,900 ****
&format, &obhandle))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle , &handle, TRUE)){
PyErr_Clear();
// @pyparmalt1 int|format||Specifies a clipboard format. For a description of
--- 896,900 ----
&format, &obhandle))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle , &handle)){
PyErr_Clear();
// @pyparmalt1 int|format||Specifies a clipboard format. For a description of
***************
*** 1017,1021 ****
if (!PyArg_ParseTuple(args, "O:SetClipboardViewer", &obhwnd))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hWndNewViewer, FALSE))
return NULL;
HWND rc;
--- 1017,1021 ----
if (!PyArg_ParseTuple(args, "O:SetClipboardViewer", &obhwnd))
return NULL;
! if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&hWndNewViewer))
return NULL;
HWND rc;
Index: win32profilemodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32profilemodule.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** win32profilemodule.cpp 13 Sep 2006 00:28:31 -0000 1.1
--- win32profilemodule.cpp 3 Jun 2007 14:53:07 -0000 1.2
***************
*** 126,130 ****
&&PyWinObject_AsWCHAR(obServerName, &pi->lpServerName,TRUE)
&&PyWinObject_AsWCHAR(obPolicyPath, &pi->lpPolicyPath,TRUE)
! &&PyWinObject_AsHANDLE(obhProfile, &pi->hProfile, TRUE);
Py_DECREF(dummy_args);
--- 126,130 ----
&&PyWinObject_AsWCHAR(obServerName, &pi->lpServerName,TRUE)
&&PyWinObject_AsWCHAR(obPolicyPath, &pi->lpPolicyPath,TRUE)
! &&PyWinObject_AsHANDLE(obhProfile, &pi->hProfile);
Py_DECREF(dummy_args);
***************
*** 151,155 ****
&obPROFILEINFO)) // @pyparm <o PyPROFILEINFO>|ProfileInfo||Dictionary representing a PROFILEINFO structure
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken, FALSE))
return NULL;
if (!PyWinObject_AsPROFILEINFO(obPROFILEINFO, &profileinfo))
--- 151,155 ----
&obPROFILEINFO)) // @pyparm <o PyPROFILEINFO>|ProfileInfo||Dictionary representing a PROFILEINFO structure
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken))
return NULL;
if (!PyWinObject_AsPROFILEINFO(obPROFILEINFO, &profileinfo))
***************
*** 177,183 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken, FALSE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProfile, &hProfile, FALSE))
return NULL;
if (!(*pfnUnloadUserProfile)(hToken, hProfile)){
--- 177,183 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken))
return NULL;
! if (!PyWinObject_AsHANDLE(obhProfile, &hProfile))
return NULL;
if (!(*pfnUnloadUserProfile)(hToken, hProfile)){
***************
*** 282,286 ****
&obhToken)) // @pyparm <o PyHANDLE>|Token||User token as returned by <om win32security.LogonUser>
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken, FALSE))
return NULL;
(*pfnGetUserProfileDirectory)(hToken, profile_path, &bufsize);
--- 282,286 ----
&obhToken)) // @pyparm <o PyHANDLE>|Token||User token as returned by <om win32security.LogonUser>
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken))
return NULL;
(*pfnGetUserProfileDirectory)(hToken, profile_path, &bufsize);
***************
*** 359,363 ****
&inherit)) // @pyparm boolean|Inherit||Indicates if environment of current process should be inherited
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken, TRUE))
return NULL;
if (!CreateEnvironmentBlock(&env, hToken, inherit))
--- 359,363 ----
&inherit)) // @pyparm boolean|Inherit||Indicates if environment of current process should be inherited
return NULL;
! if (!PyWinObject_AsHANDLE(obhToken, &hToken))
return NULL;
if (!CreateEnvironmentBlock(&env, hToken, inherit))
***************
*** 402,406 ****
&obsrc)) // @pyparm <o PyUnicode>|Src||String containing environment variables enclosed in % signs
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken, TRUE)
|| !PyWinObject_AsWCHAR(obsrc, &src, FALSE, &bufsize))
return NULL;
--- 402,406 ----
&obsrc)) // @pyparm <o PyUnicode>|Src||String containing environment variables enclosed in % signs
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken)
|| !PyWinObject_AsWCHAR(obsrc, &src, FALSE, &bufsize))
return NULL;
Index: win32security.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** win32security.i 28 May 2007 23:25:43 -0000 1.38
--- win32security.i 3 Jun 2007 14:53:07 -0000 1.39
***************
*** 222,226 ****
HANDLE lsahandle;
NTSTATUS err;
! if (!PyWinObject_AsHANDLE(obHandle, &lsahandle, FALSE))
return FALSE;
err=LsaClose(lsahandle);
--- 222,226 ----
HANDLE lsahandle;
NTSTATUS err;
! if (!PyWinObject_AsHANDLE(obHandle, &lsahandle))
return FALSE;
err=LsaClose(lsahandle);
***************
*** 244,248 ****
HANDLE lsahandle;
NTSTATUS err;
! if (!PyWinObject_AsHANDLE(obHandle, &lsahandle, FALSE))
return FALSE;
// function pointer checked in PyLsaDeregisterLogonProcess
--- 244,248 ----
HANDLE lsahandle;
NTSTATUS err;
! if (!PyWinObject_AsHANDLE(obHandle, &lsahandle))
return FALSE;
// function pointer checked in PyLsaDeregisterLogonProcess
***************
*** 1187,1191 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE ))
return NULL;
if (!PyWinObject_AsSID(obSidOwner, &pSidOwner, TRUE))
--- 1187,1191 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
if (!PyWinObject_AsSID(obSidOwner, &pSidOwner, TRUE))
***************
*** 1224,1228 ****
if (!PyArg_ParseTuple(args, "Oll:GetSecurityInfo",&obhandle, &object_type, &required_info))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &handle, FALSE))
return NULL;
--- 1224,1228 ----
if (!PyArg_ParseTuple(args, "Oll:GetSecurityInfo",&obhandle, &object_type, &required_info))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &handle))
return NULL;
***************
*** 1525,1529 ****
&obtg)) // @pyparm <o PyTOKEN_GROUPS>|NewState||Groups and attributes to be set for token
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &th, FALSE))
return NULL;
if (!PyWinObject_AsTOKEN_GROUPS(obtg, &newstate))
--- 1525,1529 ----
&obtg)) // @pyparm <o PyTOKEN_GROUPS>|NewState||Groups and attributes to be set for token
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &th))
return NULL;
if (!PyWinObject_AsTOKEN_GROUPS(obtg, &newstate))
***************
*** 1584,1588 ****
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
--- 1584,1588 ----
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
***************
*** 1752,1760 ****
phThread = NULL;
else {
! if (!PyWinObject_AsHANDLE(obThread, &hThread, FALSE))
return NULL;
phThread = &hThread;
}
! if (!PyWinObject_AsHANDLE(obToken, &hToken, TRUE))
return NULL;
BOOL ok;
--- 1752,1760 ----
phThread = NULL;
else {
! if (!PyWinObject_AsHANDLE(obThread, &hThread))
return NULL;
phThread = &hThread;
}
! if (!PyWinObject_AsHANDLE(obToken, &hToken))
return NULL;
BOOL ok;
***************
*** 2019,2023 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th, FALSE ))
return NULL;
--- 2019,2023 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obth, &th))
return NULL;
***************
*** 2732,2736 ****
&obHandle)) // @pyparm <o PyHANDLE>|NotificationEventHandle||Event handle to receives notification
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &hevent, FALSE))
return NULL;
err=(*pfnLsaRegisterPolicyChangeNotification)(info_class,hevent);
--- 2732,2736 ----
&obHandle)) // @pyparm <o PyHANDLE>|NotificationEventHandle||Event handle to receives notification
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &hevent))
return NULL;
err=(*pfnLsaRegisterPolicyChangeNotification)(info_class,hevent);
***************
*** 2759,2763 ****
&obHandle)) // @pyparm <o PyHANDLE>|NotificationEventHandle||Event handle previously registered to receive policy change events
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &hevent, FALSE))
return NULL;
err=(*pfnLsaUnregisterPolicyChangeNotification)(info_class,hevent);
--- 2759,2763 ----
&obHandle)) // @pyparm <o PyHANDLE>|NotificationEventHandle||Event handle previously registered to receive policy change events
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &hevent))
return NULL;
err=(*pfnLsaUnregisterPolicyChangeNotification)(info_class,hevent);
***************
*** 2905,2909 ****
&obsa)) // @pyparm <o PySECURITY_ATTRIBUTES>|TokenAttributes|None|Specifies security and inheritance for the new handle. None results in default DACL and no inheritance,
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken, FALSE))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
--- 2905,2909 ----
&obsa)) // @pyparm <o PySECURITY_ATTRIBUTES>|TokenAttributes|None|Specifies security and inheritance for the new handle. None results in default DACL and no inheritance,
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
***************
*** 2931,2935 ****
if (!PyArg_ParseTuple(args, "OO:CheckTokenMembership",&obtoken, &obsid))
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken, TRUE))
return NULL;
if (!PyWinObject_AsSID(obsid, &sid, FALSE))
--- 2931,2935 ----
if (!PyArg_ParseTuple(args, "OO:CheckTokenMembership",&obtoken, &obsid))
return NULL;
! if (!PyWinObject_AsHANDLE(obtoken, &htoken))
return NULL;
if (!PyWinObject_AsSID(obsid, &sid, FALSE))
***************
*** 2964,2968 ****
&obSidsToRestrict)) // @pyparm (<o PySID_AND_ATTRIBUTES>,...)|SidsToRestrict||Can be None, otherwise must be a sequence of <o PySID_AND_ATTRIBUTES> tuples (attributes must be 0)
return NULL;
! if (PyWinObject_AsHANDLE(obExistingTokenHandle, &ExistingTokenHandle, FALSE))
if (PyWinObject_AsSID_AND_ATTRIBUTESArray(obSidsToDisable, &SidsToDisable, &DisableSidCount))
if (PyWinObject_AsSID_AND_ATTRIBUTESArray(obSidsToRestrict, &SidsToRestrict, &RestrictedSidCount))
--- 2964,2968 ----
&obSidsToRestrict)) // @pyparm (<o PySID_AND_ATTRIBUTES>,...)|SidsToRestrict||Can be None, otherwise must be a sequence of <o PySID_AND_ATTRIBUTES> tuples (attributes must be 0)
return NULL;
! if (PyWinObject_AsHANDLE(obExistingTokenHandle, &ExistingTokenHandle))
if (PyWinObject_AsSID_AND_ATTRIBUTESArray(obSidsToDisable, &SidsToDisable, &DisableSidCount))
if (PyWinObject_AsSID_AND_ATTRIBUTESArray(obSidsToRestrict, &SidsToRestrict, &RestrictedSidCount))
***************
*** 3063,3067 ****
&obhandle, &obname))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &lsahandle, FALSE))
return NULL;
if (!PyWinObject_AsLSA_STRING(obname, &packagename))
--- 3063,3067 ----
&obhandle, &obname))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &lsahandle))
return NULL;
if (!PyWinObject_AsLSA_STRING(obname, &packagename))
***************
*** 3434,3438 ****
if (!PyArg_ParseTuple(args, "OllO:LsaCallAuthenticationPackage", &obhandle, &pkgid, &msgtype, &obinputbuf))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &lsahandle, FALSE))
return NULL;
--- 3434,3438 ----
if (!PyArg_ParseTuple(args, "OllO:LsaCallAuthenticationPackage", &obhandle, &pkgid, &msgtype, &obinputbuf))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &lsahandle))
return NULL;
Index: PyOVERLAPPED.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** PyOVERLAPPED.cpp 19 Jan 2007 23:05:30 -0000 1.12
--- PyOVERLAPPED.cpp 3 Jun 2007 14:53:07 -0000 1.13
***************
*** 175,179 ****
// Use an intermediate so the original isn't lost if conversion fails
HANDLE htmp;
! if (!PyWinObject_AsHANDLE(v, &htmp, FALSE))
return -1;
pO->m_overlapped.hEvent=htmp;
--- 175,179 ----
// Use an intermediate so the original isn't lost if conversion fails
HANDLE htmp;
! if (!PyWinObject_AsHANDLE(v, &htmp))
return -1;
pO->m_overlapped.hEvent=htmp;
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** PyWinTypes.h 3 Jun 2007 12:32:09 -0000 1.43
--- PyWinTypes.h 3 Jun 2007 14:53:07 -0000 1.44
***************
*** 495,499 ****
#define PyHANDLE_Check(ob) ((ob)->ob_type == &PyHANDLEType)
! PYWINTYPES_EXPORT BOOL PyWinObject_AsHANDLE(PyObject *ob, HANDLE *pRes, BOOL bNoneOK = FALSE);
// For handles that use PyHANDLE.
PYWINTYPES_EXPORT PyObject *PyWinObject_FromHANDLE(HANDLE h);
--- 495,500 ----
#define PyHANDLE_Check(ob) ((ob)->ob_type == &PyHANDLEType)
! // Convert an object to a HANDLE - None is always OK, as are ints, etc.
! PYWINTYPES_EXPORT BOOL PyWinObject_AsHANDLE(PyObject *ob, HANDLE *pRes);
// For handles that use PyHANDLE.
PYWINTYPES_EXPORT PyObject *PyWinObject_FromHANDLE(HANDLE h);
***************
*** 510,514 ****
PYWINTYPES_EXPORT BOOL PyWinObject_CloseHANDLE(PyObject *obHandle);
! PYWINTYPES_EXPORT BOOL PyWinObject_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK = FALSE);
PYWINTYPES_EXPORT PyObject *PyWinObject_FromHKEY(HKEY h);
PYWINTYPES_EXPORT BOOL PyWinObject_CloseHKEY(PyObject *obHandle);
--- 511,515 ----
PYWINTYPES_EXPORT BOOL PyWinObject_CloseHANDLE(PyObject *obHandle);
! PYWINTYPES_EXPORT BOOL PyWinObject_AsHKEY(PyObject *ob, HKEY *pRes);
PYWINTYPES_EXPORT PyObject *PyWinObject_FromHKEY(HKEY h);
PYWINTYPES_EXPORT BOOL PyWinObject_CloseHKEY(PyObject *obHandle);
Index: win32file.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** win32file.i 27 May 2007 17:32:14 -0000 1.82
--- win32file.i 3 Jun 2007 14:53:07 -0000 1.83
***************
*** 246,252 ****
return NULL;
HANDLE hFile, hExisting;
! if (!PyWinObject_AsHANDLE(obFileHandle, &hFile, FALSE))
return NULL;
! if (!PyWinObject_AsHANDLE(obExistingHandle, &hExisting, TRUE))
return NULL;
if (hExisting) {
--- 246,252 ----
return NULL;
HANDLE hFile, hExisting;
! if (!PyWinObject_AsHANDLE(obFileHandle, &hFile))
return NULL;
! if (!PyWinObject_AsHANDLE(obExistingHandle, &hExisting))
return NULL;
if (hExisting) {
***************
*** 1159,1163 ****
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
DWORD bytes = 0;
--- 1159,1163 ----
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
DWORD bytes = 0;
***************
*** 1191,1195 ****
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
OVERLAPPED *pOverlapped;
--- 1191,1195 ----
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
OVERLAPPED *pOverlapped;
***************
*** 1412,1416 ****
if (!PyWinObject_AsOVERLAPPED(obOverlapped, &pOverlapped))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &handle, FALSE))
return NULL;
// Todo: overlappedRoutine support.
--- 1412,1416 ----
if (!PyWinObject_AsOVERLAPPED(obOverlapped, &pOverlapped))
return NULL;
! if (!PyWinObject_AsHANDLE(obhandle, &handle))
return NULL;
// Todo: overlappedRoutine support.
***************
*** 1553,1557 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
long offHigh;
--- 1553,1557 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
long offHigh;
***************
*** 2401,2405 ****
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
BOOL rc;
--- 2401,2405 ----
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
BOOL rc;
***************
*** 2526,2530 ****
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle, FALSE))
return NULL;
PyOVERLAPPED *pyoverlapped;
--- 2526,2530 ----
return NULL;
HANDLE handle;
! if (!PyWinObject_AsHANDLE(obHandle, &handle))
return NULL;
PyOVERLAPPED *pyoverlapped;
***************
*** 2893,2897 ****
&trans_obj)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(trans_obj, &htrans, TRUE))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(sa_obj, &sa, TRUE))
--- 2893,2897 ----
&trans_obj)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(trans_obj, &htrans))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(sa_obj, &sa, TRUE))
***************
*** 2942,2946 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans){
--- 2942,2946 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans){
***************
*** 3519,3523 ****
if (!PyArg_ParseTuple(args, "OlOllO:BackupRead", &obh, &bytes_requested, &obbuf, &bAbort, &bProcessSecurity, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
--- 3519,3523 ----
if (!PyArg_ParseTuple(args, "OlOllO:BackupRead", &obh, &bytes_requested, &obbuf, &bAbort, &bProcessSecurity, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
***************
*** 3566,3570 ****
if (!PyArg_ParseTuple(args,"OOO:BackupSeek", &obh, &obbytes_to_seek, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
--- 3566,3570 ----
if (!PyArg_ParseTuple(args,"OOO:BackupSeek", &obh, &obbytes_to_seek, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
***************
*** 3608,3612 ****
if (!PyArg_ParseTuple(args, "OlOllO:BackupWrite", &obh, &bytes_to_write, &obbuf, &bAbort, &bProcessSecurity, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
--- 3608,3612 ----
if (!PyArg_ParseTuple(args, "OlOllO:BackupWrite", &obh, &bytes_to_write, &obbuf, &bAbort, &bProcessSecurity, &obctxt))
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
if (!PyWinLong_AsVoidPtr(obctxt, &ctxt))
***************
*** 3639,3643 ****
&obshortname)) // @pyparm <o PyUNICODE>|ShortName||The 8.3 name to be applied to the file
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h, FALSE))
return NULL;
if (!PyWinObject_AsWCHAR(obshortname, &shortname, FALSE))
--- 3639,3643 ----
&obshortname)) // @pyparm <o PyUNICODE>|ShortName||The 8.3 name to be applied to the file
return NULL;
! if (!PyWinObject_AsHANDLE(obh, &h))
return NULL;
if (!PyWinObject_AsWCHAR(obshortname, &shortname, FALSE))
***************
*** 3783,3787 ****
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, FALSE))
return NULL;
if (obcallback!=Py_None){
--- 3783,3787 ----
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (obcallback!=Py_None){
***************
*** 3896,3900 ****
&flags)) // @pyparm int|Flags|0|Combination of MOVEFILE_* flags
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htransaction, FALSE))
return NULL;
if (obcallback!=Py_None){
--- 3896,3900 ----
&flags)) // @pyparm int|Flags|0|Combination of MOVEFILE_* flags
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htransaction))
return NULL;
if (obcallback!=Py_None){
***************
*** 4211,4217 ****
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhtemplate, &htemplate, TRUE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhtransaction, &htransaction, FALSE))
return NULL;
if (obextendedparameter!=Py_None){
--- 4211,4217 ----
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
return NULL;
! if (!PyWinObject_AsHANDLE(obhtemplate, &htemplate))
return NULL;
! if (!PyWinObject_AsHANDLE(obhtransaction, &htransaction))
return NULL;
if (obextendedparameter!=Py_None){
***************
*** 4256,4260 ****
&obhtransaction)) // @pyparm <o PyHANDLE>|Transaction||Transaction handle as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obhtransaction, &htransaction, FALSE))
return NULL;
if (!PyWinObject_AsWCHAR(obfilename, &filename, FALSE))
--- 4256,4260 ----
&obhtransaction)) // @pyparm <o PyHANDLE>|Transaction||Transaction handle as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obhtransaction, &htransaction))
return NULL;
if (!PyWinObject_AsWCHAR(obfilename, &filename, FALSE))
***************
*** 4293,4297 ****
&lvl)) // @pyparm int|InfoLevelId|GetFileExInfoStandard|Level of information to return (GET_FILEEX_INFO_LEVELS enum)
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, FALSE))
return NULL;
switch (lvl){
--- 4293,4297 ----
&lvl)) // @pyparm int|InfoLevelId|GetFileExInfoStandard|Level of information to return (GET_FILEEX_INFO_LEVELS enum)
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
switch (lvl){
***************
*** 4339,4343 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction||Handle to the transaction. See <om win32transaction.CreateTransaction>.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, FALSE))
return NULL;
if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE))
--- 4339,4343 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction||Handle to the transaction. See <om win32transaction.CreateTransaction>.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (!PyWinObject_AsWCHAR(obfname, &fname, FALSE))
***************
*** 4371,4375 ****
&obsa)) // @pyparm <o PySECURITY_ATTRIBUTES>|SecurityAttributes|None|Security for new directory
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, FALSE))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
--- 4371,4375 ----
&obsa)) // @pyparm <o PySECURITY_ATTRIBUTES>|SecurityAttributes|None|Security for new directory
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (!PyWinObject_AsSECURITY_ATTRIBUTES(obsa, &psa, TRUE))
***************
*** 4406,4410 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction||Handle to the transaction. See <om win32transaction.CreateTransaction>.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, FALSE))
return NULL;
if (!PyWinObject_AsWCHAR(obdirname, &dirname, FALSE))
--- 4406,4410 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction||Handle to the transaction. See <om win32transaction.CreateTransaction>.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (!PyWinObject_AsWCHAR(obdirname, &dirname, FALSE))
***************
*** 4437,4441 ****
// If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans!=NULL)
--- 4437,4441 ----
// If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans!=NULL)
***************
*** 4509,4513 ****
// If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans!=NULL)
--- 4509,4513 ----
// If this parameter is not None, FindFirstFileTransacted will be called to perform a transacted search
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans!=NULL)
***************
*** 4570,4574 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans!=NULL)
--- 4570,4574 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans!=NULL)
***************
*** 4635,4639 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans!=NULL)
--- 4635,4639 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, can be None
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans!=NULL)
***************
*** 4732,4736 ****
&flags)) // @pyparm int|Flags||Specifies type of path to return. (win32con.FILE_NAME_NORMALIZED,FILE_NAME_OPENED,VOLUME_NAME_DOS,VOLUME_NAME_GUID,VOLUME_NAME_NONE,VOLUME_NAME_NT)
return NULL;
! if (!PyWinObject_AsHANDLE(obhfile, &hfile, FALSE))
return NULL;
--- 4732,4736 ----
&flags)) // @pyparm int|Flags||Specifies type of path to return. (win32con.FILE_NAME_NORMALIZED,FILE_NAME_OPENED,VOLUME_NAME_DOS,VOLUME_NAME_GUID,VOLUME_NAME_NONE,VOLUME_NAME_NT)
return NULL;
! if (!PyWinObject_AsHANDLE(obhfile, &hfile))
return NULL;
***************
*** 4830,4834 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction. If specified, GetLongPathNameTransacted will be called.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
if (htrans){
--- 4830,4834 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction. If specified, GetLongPathNameTransacted will be called.
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
if (htrans){
***************
*** 4896,4900 ****
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans, TRUE))
return NULL;
--- 4896,4900 ----
&obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction as returned by <om win32transaction.CreateTransaction>
return NULL;
! if (!PyWinObject_AsHANDLE(obtrans, &htrans))
return NULL;
Index: win32credmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32credmodule.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** win32credmodule.cpp 30 May 2007 06:48:02 -0000 1.6
--- win32credmodule.cpp 3 Jun 2007 14:53:07 -0000 1.7
***************
*** 342,347 ...
[truncated message content] |