Update of /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23680
Modified Files:
PyIScheduledWorkItem.cpp
Log Message:
Count for GetRunTimes is a WORD
Convert Creator and Comment as WCHAR instead of BSTR
Index: PyIScheduledWorkItem.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src/PyIScheduledWorkItem.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PyIScheduledWorkItem.cpp 3 Jun 2007 14:53:07 -0000 1.5
--- PyIScheduledWorkItem.cpp 14 Oct 2008 22:16:56 -0000 1.6
***************
*** 156,160 ****
PyObject *ret=NULL, *run_time_obj=NULL;
PyObject *obstart_time=NULL, *obend_time=NULL;
! if (!PyArg_ParseTuple(args, "l|OO:GetRunTimes", &wCount, &obstart_time, &obend_time))
return NULL;
if ((obstart_time==NULL)||(obstart_time==Py_None))
--- 156,160 ----
PyObject *ret=NULL, *run_time_obj=NULL;
PyObject *obstart_time=NULL, *obend_time=NULL;
! if (!PyArg_ParseTuple(args, "h|OO:GetRunTimes", &wCount, &obstart_time, &obend_time))
return NULL;
if ((obstart_time==NULL)||(obstart_time==Py_None))
***************
*** 389,399 ****
if ( !PyArg_ParseTuple(args, "O:SetComment", &obpwszComment) )
return NULL;
! BOOL bPythonIsHappy = TRUE;
! if (bPythonIsHappy && !PyWinObject_AsBstr(obpwszComment, &pwszComment)) bPythonIsHappy = FALSE;
! if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISWI->SetComment( pwszComment );
! SysFreeString(pwszComment);
PY_INTERFACE_POSTCALL;
--- 389,399 ----
if ( !PyArg_ParseTuple(args, "O:SetComment", &obpwszComment) )
return NULL;
!
! if (!PyWinObject_AsWCHAR(obpwszComment, &pwszComment))
! return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISWI->SetComment( pwszComment );
! PyWinObject_FreeWCHAR(pwszComment);
PY_INTERFACE_POSTCALL;
***************
*** 439,449 ****
if ( !PyArg_ParseTuple(args, "O:SetCreator", &obpwszCreator) )
return NULL;
! BOOL bPythonIsHappy = TRUE;
! if (bPythonIsHappy && !PyWinObject_AsBstr(obpwszCreator, &pwszCreator)) bPythonIsHappy = FALSE;
! if (!bPythonIsHappy) return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISWI->SetCreator( pwszCreator );
! SysFreeString(pwszCreator);
PY_INTERFACE_POSTCALL;
--- 439,448 ----
if ( !PyArg_ParseTuple(args, "O:SetCreator", &obpwszCreator) )
return NULL;
! if (!PyWinObject_AsWCHAR(obpwszCreator, &pwszCreator))
! return NULL;
HRESULT hr;
PY_INTERFACE_PRECALL;
hr = pISWI->SetCreator( pwszCreator );
! PyWinObject_FreeWCHAR(pwszCreator);
PY_INTERFACE_POSTCALL;
|