pywin32-checkins Mailing List for Python for Windows Extensions (Page 114)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2005-04-18 13:42:38
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18677 Modified Files: PyWinTypes.h Log Message: PyWinObject_AsAutoFreeBstr ignored bNoneOK param. Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PyWinTypes.h 6 Mar 2005 23:27:01 -0000 1.26 --- PyWinTypes.h 18 Apr 2005 13:42:30 -0000 1.27 *************** *** 414,418 **** // PyWin_AutoFreeBstr arg; // PyArg_ParseTuple("O", &obStr); ! // PyWin_PyObjectAsAutoFreeBstr(obStr, &arg); // CallTheFunction(arg); // Will correctly pass BSTR/OLECHAR // -- when the function goes out of scope, the string owned by "arg" will --- 414,418 ---- // PyWin_AutoFreeBstr arg; // PyArg_ParseTuple("O", &obStr); ! // PyWinObject_AsAutoFreeBstr(obStr, &arg); // CallTheFunction(arg); // Will correctly pass BSTR/OLECHAR // -- when the function goes out of scope, the string owned by "arg" will *************** *** 431,434 **** --- 431,438 ---- inline BOOL PyWinObject_AsAutoFreeBstr(PyObject *stringObject, PyWin_AutoFreeBstr *pResult, BOOL bNoneOK = FALSE) { + if (bNoneOK && stringObject == Py_None) { + pResult->SetBstr(NULL); + return TRUE; + } BSTR bs; if (!PyWinObject_AsBstr(stringObject, &bs, bNoneOK)) |
From: Mark H. <mha...@us...> - 2005-04-18 13:36:55
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15464/pywin/mfc Modified Files: activex.py Log Message: Allow PyCWnd.CreateControl to pass a license strings will NULL characters, and pass missing params to this function from the activex.py framework. Index: activex.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/activex.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** activex.py 10 Jan 2003 02:55:09 -0000 1.2 --- activex.py 18 Apr 2005 13:36:47 -0000 1.3 *************** *** 5,9 **** class Control(window.Wnd): ! """An ActiveX control base class. A new class must be derived from both this class and the Events class. See the demos for more details. """ --- 5,9 ---- class Control(window.Wnd): ! """An ActiveX control base class. A new class must be derived from both this class and the Events class. See the demos for more details. """ *************** *** 21,30 **** def CreateControl(self, windowTitle, style, rect, parent, id, lic_string=None): clsid = str(self._GetControlCLSID()) ! self.__dict__["_obj_"] = win32ui.CreateControl(clsid, windowTitle, style, rect, parent, id, lic_string) klass = self._GetDispatchClass() dispobj = klass(win32uiole.GetIDispatchForWindow(self._obj_)) self.HookOleEvents() self.__dict__["_dispobj_"] = dispobj ! def HookOleEvents(self): dict = self._GetEventMap() --- 21,30 ---- def CreateControl(self, windowTitle, style, rect, parent, id, lic_string=None): clsid = str(self._GetControlCLSID()) ! self.__dict__["_obj_"] = win32ui.CreateControl(clsid, windowTitle, style, rect, parent, id, None, False, lic_string) klass = self._GetDispatchClass() dispobj = klass(win32uiole.GetIDispatchForWindow(self._obj_)) self.HookOleEvents() self.__dict__["_dispobj_"] = dispobj ! def HookOleEvents(self): dict = self._GetEventMap() *************** *** 55,59 **** """Given a CoClass in a generated .py file, this function will return a Class object which can be used as an OCX control. ! This function is used when you do not want to handle any events from the OCX control. If you need events, then you should derive a class from both the --- 55,59 ---- """Given a CoClass in a generated .py file, this function will return a Class object which can be used as an OCX control. ! This function is used when you do not want to handle any events from the OCX control. If you need events, then you should derive a class from both the *************** *** 63,67 **** name = controlClass.__name__ return new.classobj("OCX" + name, (Control, controlClass), {}) ! def MakeControlInstance( controlClass, name = None ): """As for MakeControlClass(), but returns an instance of the class. --- 63,67 ---- name = controlClass.__name__ return new.classobj("OCX" + name, (Control, controlClass), {}) ! def MakeControlInstance( controlClass, name = None ): """As for MakeControlClass(), but returns an instance of the class. |
From: Mark H. <mha...@us...> - 2005-04-18 13:36:55
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15464 Modified Files: win32win.cpp Log Message: Allow PyCWnd.CreateControl to pass a license strings will NULL characters, and pass missing params to this function from the activex.py framework. Index: win32win.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32win.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32win.cpp 7 Oct 2004 07:45:57 -0000 1.8 --- win32win.cpp 18 Apr 2005 13:36:46 -0000 1.9 *************** *** 395,400 **** PyObject *obPersist = Py_None; int bStorage = FALSE; ! const char *szClass, *szWndName, *szLicKey = NULL; ! if (!PyArg_ParseTuple(args, "szi(iiii)Oi|Oiz", &szClass, // @pyparm string|classId||The class ID for the window. &szWndName, // @pyparm string|windowName||The title for the window. --- 395,401 ---- PyObject *obPersist = Py_None; int bStorage = FALSE; ! const char *szClass, *szWndName; ! PyObject *obLicKey = Py_None; ! if (!PyArg_ParseTuple(args, "szi(iiii)Oi|OiO", &szClass, // @pyparm string|classId||The class ID for the window. &szWndName, // @pyparm string|windowName||The title for the window. *************** *** 406,410 **** &obPersist, // @pyparm object|obPersist|None|Place holder for future support. &bStorage, // @pyparm int|bStorage|FALSE|Not used. ! &szLicKey ))// @pyparm string|licKey|None|The licence key for the control. return NULL; --- 407,411 ---- &obPersist, // @pyparm object|obPersist|None|Place holder for future support. &bStorage, // @pyparm int|bStorage|FALSE|Not used. ! &obLicKey ))// @pyparm string|licKey|None|The licence key for the control. return NULL; *************** *** 420,429 **** if (pWnd==NULL || pWndParent==NULL) return NULL; ! // This will cause MFC to die after dumping a message to the debugget! if (afxOccManager == NULL) RETURN_ERR("win32ui.EnableControlContainer() has not been called yet."); BOOL ok; GUI_BGN_SAVE; ! ok = pWnd->CreateControl(clsid, szWndName, style, rect, pWndParent, id, NULL, bStorage, T2OLE(szLicKey)); GUI_END_SAVE; if (!ok) --- 421,434 ---- if (pWnd==NULL || pWndParent==NULL) return NULL; ! PyWin_AutoFreeBstr bstrLicKey; ! if (obLicKey != Py_None && !PyWinObject_AsAutoFreeBstr(obLicKey, &bstrLicKey, TRUE)) ! return NULL; ! ! // This will cause MFC to die after dumping a message to the debugger! if (afxOccManager == NULL) RETURN_ERR("win32ui.EnableControlContainer() has not been called yet."); BOOL ok; GUI_BGN_SAVE; ! ok = pWnd->CreateControl(clsid, szWndName, style, rect, pWndParent, id, NULL, bStorage, bstrLicKey); GUI_END_SAVE; if (!ok) |
From: Roger U. <ru...@us...> - 2005-04-16 01:29:49
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14947/win32/src Modified Files: win32security.i Log Message: Add extra privilege constant names, use macro for existing names Set an error if UserRights parm for LsaAddAccountRights and LsaRemoveAccountRights is not a sequence Index: win32security.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** win32security.i 8 Mar 2005 13:13:03 -0000 1.23 --- win32security.i 16 Apr 2005 01:29:35 -0000 1.24 *************** *** 538,573 **** %init %{ // All errors raised by this module are of this type. Py_INCREF(PyWinExc_ApiError); PyDict_SetItemString(d, "error", PyWinExc_ApiError); ! PyDict_SetItemString(d,"SE_CREATE_TOKEN_NAME",PyUnicode_FromWideChar(SE_CREATE_TOKEN_NAME,wcslen(SE_CREATE_TOKEN_NAME))); ! PyDict_SetItemString(d,"SE_ASSIGNPRIMARYTOKEN_NAME",PyUnicode_FromWideChar(SE_ASSIGNPRIMARYTOKEN_NAME,wcslen(SE_ASSIGNPRIMARYTOKEN_NAME))); ! PyDict_SetItemString(d,"SE_LOCK_MEMORY_NAME",PyUnicode_FromWideChar(SE_LOCK_MEMORY_NAME,wcslen(SE_LOCK_MEMORY_NAME))); ! PyDict_SetItemString(d,"SE_INCREASE_QUOTA_NAME",PyUnicode_FromWideChar(SE_INCREASE_QUOTA_NAME,wcslen(SE_INCREASE_QUOTA_NAME))); ! PyDict_SetItemString(d,"SE_UNSOLICITED_INPUT_NAME",PyUnicode_FromWideChar(SE_UNSOLICITED_INPUT_NAME,wcslen(SE_UNSOLICITED_INPUT_NAME))); ! PyDict_SetItemString(d,"SE_MACHINE_ACCOUNT_NAME",PyUnicode_FromWideChar(SE_MACHINE_ACCOUNT_NAME,wcslen(SE_MACHINE_ACCOUNT_NAME))); ! PyDict_SetItemString(d,"SE_TCB_NAME",PyUnicode_FromWideChar(SE_TCB_NAME,wcslen(SE_TCB_NAME))); ! PyDict_SetItemString(d,"SE_SECURITY_NAME",PyUnicode_FromWideChar(SE_SECURITY_NAME,wcslen(SE_SECURITY_NAME))); ! PyDict_SetItemString(d,"SE_TAKE_OWNERSHIP_NAME",PyUnicode_FromWideChar(SE_TAKE_OWNERSHIP_NAME,wcslen(SE_TAKE_OWNERSHIP_NAME))); ! PyDict_SetItemString(d,"SE_LOAD_DRIVER_NAME",PyUnicode_FromWideChar(SE_LOAD_DRIVER_NAME,wcslen(SE_LOAD_DRIVER_NAME))); ! PyDict_SetItemString(d,"SE_SYSTEM_PROFILE_NAME",PyUnicode_FromWideChar(SE_SYSTEM_PROFILE_NAME,wcslen(SE_SYSTEM_PROFILE_NAME))); ! PyDict_SetItemString(d,"SE_SYSTEMTIME_NAME",PyUnicode_FromWideChar(SE_SYSTEMTIME_NAME,wcslen(SE_SYSTEMTIME_NAME))); ! PyDict_SetItemString(d,"SE_PROF_SINGLE_PROCESS_NAME",PyUnicode_FromWideChar(SE_PROF_SINGLE_PROCESS_NAME,wcslen(SE_PROF_SINGLE_PROCESS_NAME))); ! PyDict_SetItemString(d,"SE_INC_BASE_PRIORITY_NAME",PyUnicode_FromWideChar(SE_INC_BASE_PRIORITY_NAME,wcslen(SE_INC_BASE_PRIORITY_NAME))); ! PyDict_SetItemString(d,"SE_CREATE_PAGEFILE_NAME",PyUnicode_FromWideChar(SE_CREATE_PAGEFILE_NAME,wcslen(SE_CREATE_PAGEFILE_NAME))); ! PyDict_SetItemString(d,"SE_CREATE_PERMANENT_NAME",PyUnicode_FromWideChar(SE_CREATE_PERMANENT_NAME,wcslen(SE_CREATE_PERMANENT_NAME))); ! PyDict_SetItemString(d,"SE_BACKUP_NAME",PyUnicode_FromWideChar(SE_BACKUP_NAME,wcslen(SE_BACKUP_NAME))); ! PyDict_SetItemString(d,"SE_RESTORE_NAME",PyUnicode_FromWideChar(SE_RESTORE_NAME,wcslen(SE_RESTORE_NAME))); ! PyDict_SetItemString(d,"SE_SHUTDOWN_NAME",PyUnicode_FromWideChar(SE_SHUTDOWN_NAME,wcslen(SE_SHUTDOWN_NAME))); ! PyDict_SetItemString(d,"SE_DEBUG_NAME",PyUnicode_FromWideChar(SE_DEBUG_NAME,wcslen(SE_DEBUG_NAME))); ! PyDict_SetItemString(d,"SE_AUDIT_NAME",PyUnicode_FromWideChar(SE_AUDIT_NAME,wcslen(SE_AUDIT_NAME))); ! PyDict_SetItemString(d,"SE_SYSTEM_ENVIRONMENT_NAME",PyUnicode_FromWideChar(SE_SYSTEM_ENVIRONMENT_NAME,wcslen(SE_SYSTEM_ENVIRONMENT_NAME))); ! PyDict_SetItemString(d,"SE_CHANGE_NOTIFY_NAME",PyUnicode_FromWideChar(SE_CHANGE_NOTIFY_NAME,wcslen(SE_CHANGE_NOTIFY_NAME))); ! PyDict_SetItemString(d,"SE_REMOTE_SHUTDOWN_NAME",PyUnicode_FromWideChar(SE_REMOTE_SHUTDOWN_NAME,wcslen(SE_REMOTE_SHUTDOWN_NAME))); ! PyDict_SetItemString(d,"SE_UNDOCK_NAME",PyUnicode_FromWideChar(SE_UNDOCK_NAME,wcslen(SE_UNDOCK_NAME))); ! PyDict_SetItemString(d,"SE_SYNC_AGENT_NAME",PyUnicode_FromWideChar(SE_SYNC_AGENT_NAME,wcslen(SE_SYNC_AGENT_NAME))); ! PyDict_SetItemString(d,"SE_ENABLE_DELEGATION_NAME",PyUnicode_FromWideChar(SE_ENABLE_DELEGATION_NAME,wcslen(SE_ENABLE_DELEGATION_NAME))); ! PyDict_SetItemString(d,"SE_MANAGE_VOLUME_NAME",PyUnicode_FromWideChar(SE_MANAGE_VOLUME_NAME,wcslen(SE_MANAGE_VOLUME_NAME))); PyDict_SetItemString(d,"MSV1_0_PACKAGE_NAME",PyString_FromString(MSV1_0_PACKAGE_NAME)); PyDict_SetItemString(d,"MICROSOFT_KERBEROS_NAME_A",PyString_FromString(MICROSOFT_KERBEROS_NAME_A)); --- 538,590 ---- %init %{ + PyObject *s; + #define ADD_UNICODE_CONSTANT(constant_name) \ + s=PyUnicode_FromWideChar(constant_name,wcslen(constant_name)); \ + PyDict_SetItemString(d,#constant_name,s); \ + Py_DECREF(s); + // All errors raised by this module are of this type. Py_INCREF(PyWinExc_ApiError); PyDict_SetItemString(d, "error", PyWinExc_ApiError); ! ADD_UNICODE_CONSTANT(SE_CREATE_TOKEN_NAME); ! ADD_UNICODE_CONSTANT(SE_ASSIGNPRIMARYTOKEN_NAME); ! ADD_UNICODE_CONSTANT(SE_LOCK_MEMORY_NAME); ! ADD_UNICODE_CONSTANT(SE_INCREASE_QUOTA_NAME); ! ADD_UNICODE_CONSTANT(SE_UNSOLICITED_INPUT_NAME); ! ADD_UNICODE_CONSTANT(SE_MACHINE_ACCOUNT_NAME); ! ADD_UNICODE_CONSTANT(SE_TCB_NAME); ! ADD_UNICODE_CONSTANT(SE_SECURITY_NAME); ! ADD_UNICODE_CONSTANT(SE_TAKE_OWNERSHIP_NAME); ! ADD_UNICODE_CONSTANT(SE_LOAD_DRIVER_NAME); ! ADD_UNICODE_CONSTANT(SE_SYSTEM_PROFILE_NAME); ! ADD_UNICODE_CONSTANT(SE_SYSTEMTIME_NAME); ! ADD_UNICODE_CONSTANT(SE_PROF_SINGLE_PROCESS_NAME); ! ADD_UNICODE_CONSTANT(SE_INC_BASE_PRIORITY_NAME); ! ADD_UNICODE_CONSTANT(SE_CREATE_PAGEFILE_NAME); ! ADD_UNICODE_CONSTANT(SE_CREATE_PERMANENT_NAME); ! ADD_UNICODE_CONSTANT(SE_BACKUP_NAME); ! ADD_UNICODE_CONSTANT(SE_RESTORE_NAME); ! ADD_UNICODE_CONSTANT(SE_SHUTDOWN_NAME); ! ADD_UNICODE_CONSTANT(SE_DEBUG_NAME); ! ADD_UNICODE_CONSTANT(SE_AUDIT_NAME); ! ADD_UNICODE_CONSTANT(SE_SYSTEM_ENVIRONMENT_NAME); ! ADD_UNICODE_CONSTANT(SE_CHANGE_NOTIFY_NAME); ! ADD_UNICODE_CONSTANT(SE_REMOTE_SHUTDOWN_NAME); ! ADD_UNICODE_CONSTANT(SE_UNDOCK_NAME); ! ADD_UNICODE_CONSTANT(SE_SYNC_AGENT_NAME); ! ADD_UNICODE_CONSTANT(SE_ENABLE_DELEGATION_NAME); ! ADD_UNICODE_CONSTANT(SE_MANAGE_VOLUME_NAME); ! ADD_UNICODE_CONSTANT(SE_INTERACTIVE_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_NETWORK_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_BATCH_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_SERVICE_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_DENY_INTERACTIVE_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_DENY_NETWORK_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_DENY_BATCH_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_DENY_SERVICE_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_REMOTE_INTERACTIVE_LOGON_NAME); ! ADD_UNICODE_CONSTANT(SE_DENY_REMOTE_INTERACTIVE_LOGON_NAME); ! PyDict_SetItemString(d,"MSV1_0_PACKAGE_NAME",PyString_FromString(MSV1_0_PACKAGE_NAME)); PyDict_SetItemString(d,"MICROSOFT_KERBEROS_NAME_A",PyString_FromString(MICROSOFT_KERBEROS_NAME_A)); *************** *** 2152,2159 **** if (!PyWinObject_AsSID(obsid, &psid, FALSE)) return NULL; ! if (!PySequence_Check(privs)) return NULL; priv_cnt=PySequence_Length(privs); plsau_start=(PLSA_UNICODE_STRING)calloc(priv_cnt,sizeof(LSA_UNICODE_STRING)); plsau=plsau_start; for (priv_ind=0; priv_ind<priv_cnt; priv_ind++){ --- 2169,2180 ---- if (!PyWinObject_AsSID(obsid, &psid, FALSE)) return NULL; ! if (!PySequence_Check(privs)){ ! PyErr_SetString(PyExc_TypeError,"UserRights must be a sequence of unicode or string objects"); return NULL; + } priv_cnt=PySequence_Length(privs); plsau_start=(PLSA_UNICODE_STRING)calloc(priv_cnt,sizeof(LSA_UNICODE_STRING)); + if (plsau_start==NULL) + return PyErr_Format(PyExc_MemoryError,"LsaAddAccountRights: Unable to allocate %d bytes", priv_cnt*sizeof(LSA_UNICODE_STRING)); plsau=plsau_start; for (priv_ind=0; priv_ind<priv_cnt; priv_ind++){ *************** *** 2214,2221 **** if (!PyWinObject_AsSID(obsid, &psid, FALSE)) return NULL; ! if (!PySequence_Check(privs)) return NULL; priv_cnt=PySequence_Length(privs); plsau_start=(PLSA_UNICODE_STRING)calloc(priv_cnt,sizeof(LSA_UNICODE_STRING)); plsau=plsau_start; for (priv_ind=0; priv_ind<priv_cnt; priv_ind++){ --- 2235,2246 ---- if (!PyWinObject_AsSID(obsid, &psid, FALSE)) return NULL; ! if (!PySequence_Check(privs)){ ! PyErr_SetString(PyExc_TypeError,"UserRights must be a sequence of unicode or string objects"); return NULL; + } priv_cnt=PySequence_Length(privs); plsau_start=(PLSA_UNICODE_STRING)calloc(priv_cnt,sizeof(LSA_UNICODE_STRING)); + if (plsau_start==NULL) + return PyErr_Format(PyExc_MemoryError,"LsaRemoveAccountRights: Unable to allocate %d bytes", priv_cnt*sizeof(LSA_UNICODE_STRING)); plsau=plsau_start; for (priv_ind=0; priv_ind<priv_cnt; priv_ind++){ |
From: Mark H. <mha...@us...> - 2005-04-12 08:03:46
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11513 Modified Files: win32gui.i Log Message: New functions SetMenuInfo and GetMenuInfo prevented importing under NT - now only in winxpgui Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** win32gui.i 12 Apr 2005 06:05:03 -0000 1.61 --- win32gui.i 12 Apr 2005 08:03:36 -0000 1.62 *************** *** 2927,2931 **** --- 2927,2933 ---- ); + %ifdef WINXPGUI // @pyswig |SetMenuInfo|Sets information for a specified menu. + // @comm To avoid complications with Windows NT, this function only exists in winxpgui (not win32gui) BOOLAPI SetMenuInfo( HMENU hmenu, // @pyparm int|hmenu||handle to menu *************** *** 2934,2942 **** ); ! // @pyswig |GetMenuInfo|Sets information about a specified menu. BOOLAPI GetMenuInfo( HMENU hMenu, // @pyparm int|hmenu||handle to menu MENUINFO *BOTH // @pyparm buffer|info||A buffer to fill with the information. ); --- 2936,2946 ---- ); ! // @pyswig |GetMenuInfo|Gets information about a specified menu. ! // @comm To avoid complications with Windows NT, this function only exists in winxpgui (not win32gui) BOOLAPI GetMenuInfo( HMENU hMenu, // @pyparm int|hmenu||handle to menu MENUINFO *BOTH // @pyparm buffer|info||A buffer to fill with the information. ); + %endif |
From: Mark H. <mha...@us...> - 2005-04-12 07:26:49
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921 Modified Files: setup.py Log Message: Build 204 Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** setup.py 7 Mar 2005 01:19:06 -0000 1.6 --- setup.py 12 Apr 2005 07:26:40 -0000 1.7 *************** *** 1,3 **** ! build_number=203 # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) --- 1,3 ---- ! build_number=204 # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) |
From: Mark H. <mha...@us...> - 2005-04-12 06:18:08
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20642/AutoDuck Modified Files: pywin32.mak Log Message: Auto-extract some comments from the SSPI module. Index: pywin32.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32.mak,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pywin32.mak 1 Dec 2004 23:13:01 -0000 1.10 --- pywin32.mak 12 Apr 2005 06:17:53 -0000 1.11 *************** *** 88,92 **** $(ISAPI_SOURCE_DIR)\*.cpp $(ISAPI_SOURCE_DIR)\*.h $(GENDIR)\isapi_modules.d ! SOURCE=$(WIN32_SOURCE) $(WIN32COM_SOURCE) $(PYTHONWIN_SOURCE) $(ISAPI_SOURCE) DOCUMENT_FILE = pywin32-document.xml --- 88,94 ---- $(ISAPI_SOURCE_DIR)\*.cpp $(ISAPI_SOURCE_DIR)\*.h $(GENDIR)\isapi_modules.d ! GENERATED_D = $(GENDIR)\sspi.d ! ! SOURCE=$(WIN32_SOURCE) $(WIN32COM_SOURCE) $(PYTHONWIN_SOURCE) $(ISAPI_SOURCE) $(GENERATED_D) DOCUMENT_FILE = pywin32-document.xml *************** *** 108,111 **** --- 110,116 ---- $(PYTHON) py2d.py isapi isapi.install isapi.simple isapi.threaded_extension isapi.isapicon > $(GENDIR)\isapi_modules.d + $(GENDIR)\sspi.d: py2d.py pseudo + $(PYTHON) py2d.py sspi > $(GENDIR)\sspi.d + "$(GENDIR)\$(TARGET).hhc" : $(SOURCE) Dump2HHC.py $(DOCUMENT_FILE) rem Run autoduck over each category so we can create a nested TOC. |
From: Mark H. <mha...@us...> - 2005-04-12 06:17:11
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20034/com/win32com/test Modified Files: testmakepy.py Log Message: Allow '-q' on the command line to prevent progress messages. Index: testmakepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testmakepy.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testmakepy.py 25 Jan 2005 10:52:41 -0000 1.4 --- testmakepy.py 12 Apr 2005 06:17:02 -0000 1.5 *************** *** 52,54 **** if __name__=='__main__': ! TestAll(1) --- 52,54 ---- if __name__=='__main__': ! TestAll("-q" not in sys.argv) |
From: Mark H. <mha...@us...> - 2005-04-12 06:14:13
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19004 Modified Files: win32timezone.py Log Message: Move __future__ statement to the top of the file. Index: win32timezone.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32timezone.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32timezone.py 7 Sep 2004 10:22:56 -0000 1.2 --- win32timezone.py 12 Apr 2005 06:14:01 -0000 1.3 *************** *** 64,67 **** --- 64,68 ---- """ + from __future__ import generators __author__ = 'Jason R. Coombs <ja...@ja...>' *************** *** 70,74 **** __date__ = '$Modtime: 04-04-14 10:52 $'[10:-2] - from __future__ import generators import os, win32api, win32con, struct, datetime --- 71,74 ---- |
From: Mark H. <mha...@us...> - 2005-04-12 06:05:12
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15279 Modified Files: win32gui.i Log Message: Autoduck corrections. Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** win32gui.i 12 Apr 2005 03:41:35 -0000 1.60 --- win32gui.i 12 Apr 2005 06:05:03 -0000 1.61 *************** *** 1986,1990 **** BOOLAPI DeleteObject(HANDLE h); // @pyparm int|handle||handle to the object to delete. ! // @pyswig |BitBlt||Performs a bit-block transfer of the color data corresponding // to a rectangle of pixels from the specified source device context into a // destination device context. --- 1986,1990 ---- BOOLAPI DeleteObject(HANDLE h); // @pyparm int|handle||handle to the object to delete. ! // @pyswig |BitBlt|Performs a bit-block transfer of the color data corresponding // to a rectangle of pixels from the specified source device context into a // destination device context. *************** *** 2001,2005 **** ); ! // @pyswig |StretchBlt||Copies a bitmap from a source rectangle into a destination // rectangle, stretching or compressing the bitmap to fit the dimensions of the // destination rectangle, if necessary --- 2001,2005 ---- ); ! // @pyswig |StretchBlt|Copies a bitmap from a source rectangle into a destination // rectangle, stretching or compressing the bitmap to fit the dimensions of the // destination rectangle, if necessary |
From: Mark H. <mha...@us...> - 2005-04-12 06:02:44
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14240 Modified Files: win32assoc.cpp Log Message: Change the wording of that obscure "existing object not the same type" error, and include the names of the types involved. Index: win32assoc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32assoc.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32assoc.cpp 7 Sep 2004 02:26:20 -0000 1.6 --- win32assoc.cpp 12 Apr 2005 06:02:34 -0000 1.7 *************** *** 267,272 **** ret = (ui_assoc_object*) handleMgr.GetAssocObject(search); if (ret) { ! if (!ret->is_uiobject(&makeType)) ! RETURN_ERR("Internal error - existing object is not of same type as requested new object"); DOINCREF( ret ); return ret; --- 267,276 ---- ret = (ui_assoc_object*) handleMgr.GetAssocObject(search); if (ret) { ! if (!ret->is_uiobject(&makeType)) { ! PyErr_Format(ui_module_error, ! "Internal error - existing object has type '%s', but '%s' was requested.", ! ret->ob_type->tp_name, makeType.tp_name); ! return NULL; ! } DOINCREF( ret ); return ret; |
From: Mark H. <mha...@us...> - 2005-04-12 05:33:34
|
Update of /cvsroot/pywin32/pywin32/isapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1078 Modified Files: pyISAPI.cpp Log Message: Add a comment pointing to http://sf.net/support/tracker.php?aid=1173795 to indicate we know the filter terminate function is not called, but don't know why. Index: pyISAPI.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/pyISAPI.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyISAPI.cpp 6 Oct 2004 05:11:54 -0000 1.1 --- pyISAPI.cpp 12 Apr 2005 05:33:24 -0000 1.2 *************** *** 207,210 **** --- 207,212 ---- } + // Hmm - this appears to never be called!?!? + // http://sf.net/support/tracker.php?aid=1173795 BOOL WINAPI TerminateFilter(DWORD status) { |
From: Mark H. <mha...@us...> - 2005-04-12 05:06:35
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18729 Modified Files: win32con.py Log Message: Add FILE_SHARE_DELETE Index: win32con.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32con.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** win32con.py 10 Feb 2005 13:55:38 -0000 1.11 --- win32con.py 12 Apr 2005 05:06:24 -0000 1.12 *************** *** 2121,2124 **** --- 2121,2125 ---- FILE_SHARE_READ = 1 FILE_SHARE_WRITE = 2 + FILE_SHARE_DELETE = 4 FILE_ATTRIBUTE_READONLY = 1 FILE_ATTRIBUTE_HIDDEN = 2 |
From: Mark H. <mha...@us...> - 2005-04-12 05:02:17
|
Update of /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15938 Modified Files: verstamp.py Log Message: Make this useful as a stand-alone script. Index: verstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/verstamp.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** verstamp.py 24 Oct 2003 07:06:25 -0000 1.4 --- verstamp.py 12 Apr 2005 05:02:06 -0000 1.5 *************** *** 1,40 **** ! # ! # stamp a file with version information ! # ! # USAGE: python verstamp.py <major> <minor> <version> <fname> <desc> \ ! # [<debug>] [<is_dll>] ! # ! # For example: ! # C> python verstamp.py 1 4 103 pywintypes.dll "Common Python types for Win32" ! # ! # This will store version "1.4.0.103" (ie, build 103 for Python 1.4) ! # ! # ! # <debug> : 0 or 1 based on whether it's a debug build (DEFAULT == 0) ! # <is_dll> : 0 or 1 to indicate the file type: DLL vs EXE (DEFAULT == 1) ! # from win32api import BeginUpdateResource, UpdateResource, EndUpdateResource, Unicode - import win32api - #print "Win32api is at", win32api.__file__ U = Unicode import os - import sys import struct ! import string ! import win32api ! import pythoncom ! VS_FFI_SIGNATURE = 0xFEEF04BD VS_FFI_STRUCVERSION = 0x00010000 VS_FFI_FILEFLAGSMASK = 0x0000003f VOS_NT_WINDOWS32 = 0x00040004 - g_productname = 'Python' - g_company = '' - g_copyright = 'Copyright (C) A Few Assorted People 1995-1998. All rights reserved.' - g_trademarks = '' - # # Set VS_FF_PRERELEASE and DEBUG if Debug --- 1,19 ---- ! """ Stamp a Win32 binary with version information. ! """ from win32api import BeginUpdateResource, UpdateResource, EndUpdateResource, Unicode U = Unicode import os import struct ! import glob ! import optparse ! ! VS_FFI_SIGNATURE = -17890115 # 0xFEEF04BD VS_FFI_STRUCVERSION = 0x00010000 VS_FFI_FILEFLAGSMASK = 0x0000003f VOS_NT_WINDOWS32 = 0x00040004 # # Set VS_FF_PRERELEASE and DEBUG if Debug *************** *** 129,133 **** return addlen(result) ! def stamp(vars, pathname, desc, verbose=0, debug=0, is_dll=1): # For some reason, the API functions report success if the file is open # but doesnt work! Try and open the file for writing, just to see if it is --- 108,112 ---- return addlen(result) ! def stamp(pathname, options): # For some reason, the API functions report success if the file is open # but doesnt work! Try and open the file for writing, just to see if it is *************** *** 139,175 **** print "WARNING: File %s could not be opened - %s" % (pathname, why) try: ! maj = int(vars.get("major")) ! min = int(vars.get("minor")) ! sub = int(vars.get("sub", 0)) ! build = int(vars.get("build")) ! except (IndexError, TypeError): ! raise RuntimeError, "The version params must be integers" ! ! company = vars.get("company", g_company) ! copyright = vars.get("copyright", g_copyright) ! trademarks = vars.get("trademarks", g_trademarks) ! productname = vars.get("product", g_productname) ! - vsn = '%s.%s.%s.%s' % (maj, min, sub, build) - dir, fname = os.path.split(pathname) - fname = string.upper(fname) sdata = { ! 'Comments' : desc, ! 'CompanyName' : company, ! 'FileDescription' : desc, ! 'FileVersion' : vsn, ! 'InternalName' : fname, ! 'LegalCopyright' : copyright, ! 'LegalTrademarks' : trademarks, ! 'OriginalFilename' : fname, ! 'ProductName' : productname, ! 'ProductVersion' : vsn, } vdata = { 'Translation' : struct.pack('hh', 0x409, 1200), } ! vs = VS_VERSION_INFO(maj, min, sub, build, sdata, vdata, debug, is_dll) h = BeginUpdateResource(pathname, 0) --- 118,161 ---- print "WARNING: File %s could not be opened - %s" % (pathname, why) + ver = options.version try: ! bits = [int(i) for i in ver.split(".")] ! vmaj, vmin, vsub, vbuild = bits ! except (IndexError, TypeError, ValueError): ! parser.error("--version must be a.b.c.d (all integers)") ! ! ifn = options.internal_name ! if not ifn: ! ifn = os.path.basename(pathname) ! ofn = options.original_filename ! if not ofn: ! ofn = os.path.basename(pathname) sdata = { ! 'Comments' : options.comments, ! 'CompanyName' : options.company, ! 'FileDescription' : options.description, ! 'FileVersion' : ver, ! 'InternalName' : ifn, ! 'LegalCopyright' : options.copyright, ! 'LegalTrademarks' : options.trademarks, ! 'OriginalFilename' : ofn, ! 'ProductName' : options.product, ! 'ProductVersion' : ver, } vdata = { 'Translation' : struct.pack('hh', 0x409, 1200), } ! is_dll = options.dll ! if is_dll is None: ! is_dll = os.path.splitext(pathname)[1].lower() in '.dll .pyd'.split() ! is_debug = options.debug ! if is_debug is None: ! is_debug = os.path.splitext(pathname)[0].lower().endswith("_d") ! # convert None to blank strings ! for k, v in sdata.items(): ! if v is None: ! sdata[k] = "" ! vs = VS_VERSION_INFO(vmaj, vmin, vsub, vbuild, sdata, vdata, is_debug, is_dll) h = BeginUpdateResource(pathname, 0) *************** *** 177,199 **** EndUpdateResource(h, 0) ! if verbose: print "Stamped:", pathname if __name__ == '__main__': ! if len(sys.argv) < 6: ! print "ERROR: incorrect invocation. See comments in header of script." ! sys.exit(1) ! ! maj = string.atoi(sys.argv[1]) ! min = string.atoi(sys.argv[2]) ! ver = string.atoi(sys.argv[3]) ! ! verbose = 0 ! is_dll = 1 ! if len(sys.argv) > 6: ! debug = string.atoi(sys.argv[6]) ! if len(sys.argv) > 7: ! is_dll = string.atoi(sys.argv[7]) ! v={'major':maj,'minor':min,'build':ver} ! stamp(v, sys.argv[4], sys.argv[5], verbose, is_dll) --- 163,202 ---- EndUpdateResource(h, 0) ! if options.verbose: print "Stamped:", pathname if __name__ == '__main__': ! parser = optparse.OptionParser("%prog [options] filespec ...", ! description=__doc__) ! parser.add_option("-q", "--quiet", ! action="store_false", dest="verbose", default=True, ! help="don't print status messages to stdout") ! parser.add_option("", "--version", default="0.0.0.0", ! help="The version number as m.n.s.b") ! parser.add_option("", "--dll", ! help="""Stamp the file as a DLL. Default is to look at the ! file extension for .dll or .pyd.""") ! parser.add_option("", "--debug", help="""Stamp the file as a debug binary.""") ! parser.add_option("", "--product", help="""The product name to embed.""") ! parser.add_option("", "--company", help="""The company name to embed.""") ! parser.add_option("", "--trademarks", help="The trademark string to embed.") ! parser.add_option("", "--comments", help="The comments string to embed.") ! parser.add_option("", "--copyright", ! help="""The copyright message string to embed.""") ! parser.add_option("", "--description", metavar="DESC", ! help="The description to embed.") ! parser.add_option("", "--internal-name", metavar="NAME", ! help="""The internal filename to embed. If not specified ! the base filename is used.""") ! parser.add_option("", "--original-filename", ! help="""The original filename to embed. If not specified ! the base filename is used.""") ! ! options, args = parser.parse_args() ! if not args: ! parser.error("You must supply a file to stamp. Use --help for details.") ! ! for g in args: ! for f in glob.glob(g): ! stamp(f, options) |
From: Mark H. <mha...@us...> - 2005-04-12 04:28:52
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31382 Modified Files: dispatcher.py Log Message: Make a largely cosmetic change to prevent pychecker from warning. Index: dispatcher.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/dispatcher.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** dispatcher.py 7 Sep 2004 02:16:40 -0000 1.5 --- dispatcher.py 12 Apr 2005 04:28:44 -0000 1.6 *************** *** 27,30 **** --- 27,33 ---- self.logger = getattr(win32com, "logger", None) + # Note the "return self._HandleException_()" is purely to stop pychecker + # complaining - _HandleException_ will itself raise an exception for the + # pythoncom framework, so the result will never be seen. def _CreateInstance_(self, clsid, reqIID): try: *************** *** 32,36 **** return pythoncom.WrapObject(self, reqIID) except: ! self._HandleException_() def _QueryInterface_(self, iid): --- 35,39 ---- return pythoncom.WrapObject(self, reqIID) except: ! return self._HandleException_() def _QueryInterface_(self, iid): *************** *** 38,42 **** return self.policy._QueryInterface_(iid) except: ! self._HandleException_() def _Invoke_(self, dispid, lcid, wFlags, args): --- 41,45 ---- return self.policy._QueryInterface_(iid) except: ! return self._HandleException_() def _Invoke_(self, dispid, lcid, wFlags, args): *************** *** 44,48 **** return self.policy._Invoke_(dispid, lcid, wFlags, args) except: ! self._HandleException_() def _GetIDsOfNames_(self, names, lcid): --- 47,51 ---- return self.policy._Invoke_(dispid, lcid, wFlags, args) except: ! return self._HandleException_() def _GetIDsOfNames_(self, names, lcid): *************** *** 50,54 **** return self.policy._GetIDsOfNames_(names, lcid) except: ! self._HandleException_() def _GetTypeInfo_(self, index, lcid): --- 53,57 ---- return self.policy._GetIDsOfNames_(names, lcid) except: ! return self._HandleException_() def _GetTypeInfo_(self, index, lcid): *************** *** 56,60 **** return self.policy._GetTypeInfo_(index, lcid) except: ! self._HandleException_() def _GetTypeInfoCount_(self): --- 59,63 ---- return self.policy._GetTypeInfo_(index, lcid) except: ! return self._HandleException_() def _GetTypeInfoCount_(self): *************** *** 62,66 **** return self.policy._GetTypeInfoCount_() except: ! self._HandleException_() def _GetDispID_(self, name, fdex): --- 65,69 ---- return self.policy._GetTypeInfoCount_() except: ! return self._HandleException_() def _GetDispID_(self, name, fdex): *************** *** 68,72 **** return self.policy._GetDispID_(name, fdex) except: ! self._HandleException_() def _InvokeEx_(self, dispid, lcid, wFlags, args, kwargs, serviceProvider): --- 71,75 ---- return self.policy._GetDispID_(name, fdex) except: ! return self._HandleException_() def _InvokeEx_(self, dispid, lcid, wFlags, args, kwargs, serviceProvider): *************** *** 74,78 **** return self.policy._InvokeEx_(dispid, lcid, wFlags, args, kwargs, serviceProvider) except: ! self._HandleException_() def _DeleteMemberByName_(self, name, fdex): --- 77,81 ---- return self.policy._InvokeEx_(dispid, lcid, wFlags, args, kwargs, serviceProvider) except: ! return self._HandleException_() def _DeleteMemberByName_(self, name, fdex): *************** *** 80,84 **** return self.policy._DeleteMemberByName_(name, fdex) except: ! self._HandleException_() def _DeleteMemberByDispID_(self, id): --- 83,87 ---- return self.policy._DeleteMemberByName_(name, fdex) except: ! return self._HandleException_() def _DeleteMemberByDispID_(self, id): *************** *** 86,90 **** return self.policy._DeleteMemberByDispID_(id) except: ! self._HandleException_() def _GetMemberProperties_(self, id, fdex): --- 89,93 ---- return self.policy._DeleteMemberByDispID_(id) except: ! return self._HandleException_() def _GetMemberProperties_(self, id, fdex): *************** *** 92,96 **** return self.policy._GetMemberProperties_(id, fdex) except: ! self._HandleException_() def _GetMemberName_(self, dispid): --- 95,99 ---- return self.policy._GetMemberProperties_(id, fdex) except: ! return self._HandleException_() def _GetMemberName_(self, dispid): *************** *** 98,102 **** return self.policy._GetMemberName_(dispid) except: ! self._HandleException_() def _GetNextDispID_(self, fdex, flags): --- 101,105 ---- return self.policy._GetMemberName_(dispid) except: ! return self._HandleException_() def _GetNextDispID_(self, fdex, flags): *************** *** 104,108 **** return self.policy._GetNextDispID_(fdex, flags) except: ! self._HandleException_() def _GetNameSpaceParent_(self): --- 107,111 ---- return self.policy._GetNextDispID_(fdex, flags) except: ! return self._HandleException_() def _GetNameSpaceParent_(self): *************** *** 110,114 **** return self.policy._GetNameSpaceParent_() except: ! self._HandleException_() def _HandleException_(self): --- 113,117 ---- return self.policy._GetNameSpaceParent_() except: ! return self._HandleException_() def _HandleException_(self): |
From: Mark H. <mha...@us...> - 2005-04-12 04:27:18
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28542 Modified Files: genpy.py Log Message: worm around http://www.python.org/sf/1163244 by not generating a 'coding' line for Python 2.4+. This is temporary and will be reverted once that bug is fixed. Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** genpy.py 13 Feb 2005 12:05:46 -0000 1.45 --- genpy.py 12 Apr 2005 04:27:08 -0000 1.46 *************** *** 782,786 **** # until I get to the bottom of this, don't generate # a coding line when frozen. ! if not hasattr(sys, "frozen") and sys.platform.startswith("win"): print >> self.file, '# -*- coding: mbcs -*-' # Is this always correct? print >> self.file, '# Created by makepy.py version %s' % (makepy_version,) --- 782,789 ---- # until I get to the bottom of this, don't generate # a coding line when frozen. ! # *sigh* - and see http://www.python.org/sf/1163244 which is causing ! # problems for 2.4+ - avoiding a coding line seems to avoid it. ! if not hasattr(sys, "frozen") and sys.platform.startswith("win") and \ ! sys.hexversion < 0x2040000: print >> self.file, '# -*- coding: mbcs -*-' # Is this always correct? print >> self.file, '# Created by makepy.py version %s' % (makepy_version,) |
From: Mark H. <mha...@us...> - 2005-04-12 03:41:45
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9108 Modified Files: win32gui.i Log Message: Fix [ 1167608 ] win32gui.GetCapture seems broken Functions that returned HWND, HDC or other similar objects would raise an exception with "no error" whenever a handle of 0 was returned. We now only raise an exception when a real win32 error happens, and simply return the zero handle otherwise. Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** win32gui.i 12 Apr 2005 02:47:32 -0000 1.59 --- win32gui.i 12 Apr 2005 03:41:35 -0000 1.60 *************** *** 453,461 **** %typemap(python,except) HWND, HDC, HMENU, HICON, HBITMAP, HIMAGELIST { Py_BEGIN_ALLOW_THREADS $function Py_END_ALLOW_THREADS ! if ($source==0) { $cleanup ! return PyWin_SetAPIError("$name"); } } --- 453,463 ---- %typemap(python,except) HWND, HDC, HMENU, HICON, HBITMAP, HIMAGELIST { Py_BEGIN_ALLOW_THREADS + SetLastError(0); $function Py_END_ALLOW_THREADS ! DWORD le; ! if ($source==0 && (le=GetLastError())) { $cleanup ! return PyWin_SetAPIError("$name", le); } } |
From: Mark H. <mha...@us...> - 2005-04-12 03:33:59
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4745/lib Modified Files: win32gui_struct.py Log Message: Deal with fallout of commctrl having an insane value for PY_OU Index: win32gui_struct.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32gui_struct.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** win32gui_struct.py 12 Apr 2005 03:32:44 -0000 1.7 --- win32gui_struct.py 12 Apr 2005 03:33:45 -0000 1.8 *************** *** 36,40 **** buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam) hwndFrom, idFrom, code = struct.unpack(format, buf) - code += 0x4f0000 # hrm - wtf - commctrl uses this, and it works with mfc. *sigh* return hwndFrom, idFrom, code --- 36,39 ---- |
From: Mark H. <mha...@us...> - 2005-04-12 03:33:59
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4745/Demos Modified Files: win32gui_dialog.py Log Message: Deal with fallout of commctrl having an insane value for PY_OU Index: win32gui_dialog.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_dialog.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32gui_dialog.py 25 Jan 2005 13:41:47 -0000 1.5 --- win32gui_dialog.py 12 Apr 2005 03:33:46 -0000 1.6 *************** *** 301,305 **** hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged, actionx, actiony, lParam \ = struct.unpack(format, buf) ! code += 0x4f0000 # hrm - wtf - commctrl uses this, and it works with mfc. *sigh* if code == commctrl.NM_DBLCLK: print "Double click on item", iItem+1 --- 301,310 ---- hwndFrom, idFrom, code, iItem, iSubItem, uNewState, uOldState, uChanged, actionx, actiony, lParam \ = struct.unpack(format, buf) ! # *sigh* - work around a problem with old commctrl modules, which had a ! # bad value for PY_OU, which therefore cause most "control notification" ! # messages to be wrong. ! # Code that needs to work with both pre and post pywin32-204 must do ! # this too. ! code += commctrl.PY_0U if code == commctrl.NM_DBLCLK: print "Double click on item", iItem+1 |
From: Mark H. <mha...@us...> - 2005-04-12 03:32:57
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4086/lib Modified Files: win32gui_struct.py Log Message: Optimize PackLVITEM by 'inlining' _GetMaskAndVal Index: win32gui_struct.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32gui_struct.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** win32gui_struct.py 20 Jan 2005 06:49:08 -0000 1.6 --- win32gui_struct.py 12 Apr 2005 03:32:44 -0000 1.7 *************** *** 242,245 **** --- 242,249 ---- # Helpers for the ugly win32 structure packing/unpacking + # XXX - Note that functions using _GetMaskAndVal run 3x faster if they are + # 'inlined' into the function - see PackLVITEM. If the profiler points at + # _GetMaskAndVal(), you should nuke it (patches welcome once they have been + # tested) def _GetMaskAndVal(val, default, mask, flag): if val is None: *************** *** 351,369 **** extra = [] # objects we must keep references to mask = 0 ! mask, item = _GetMaskAndVal(item, 0, mask, None) ! mask, subItem = _GetMaskAndVal(subItem, 0, mask, None) ! mask, state = _GetMaskAndVal(state, 0, mask, commctrl.LVIF_STATE) ! if not mask & commctrl.LVIF_STATE: stateMask = 0 else: ! if stateMask is None: ! stateMask = state ! mask, text = _GetMaskAndVal(text, None, mask, commctrl.LVIF_TEXT) ! mask, image = _GetMaskAndVal(image, 0, mask, commctrl.LVIF_IMAGE) ! mask, param = _GetMaskAndVal(param, 0, mask, commctrl.LVIF_PARAM) ! mask, indent = _GetMaskAndVal(indent, 0, mask, commctrl.LVIF_INDENT) if text is None: text_addr = text_len = 0 else: if isinstance(text, unicode): text = text.encode("mbcs") --- 355,379 ---- extra = [] # objects we must keep references to mask = 0 ! # _GetMaskAndVal adds quite a bit of overhead to this function. ! if item is None: item = 0 # No mask for item ! if subItem is None: subItem = 0 # No mask for sibItem ! if state is None: ! state = 0 stateMask = 0 else: ! mask |= commctrl.LVIF_STATE ! if stateMask is None: stateMask = state ! ! if image is None: image = 0 ! else: mask |= commctrl.LVIF_IMAGE ! if param is None: param = 0 ! else: mask |= commctrl.LVIF_PARAM ! if indent is None: indent = 0 ! else: mask |= commctrl.LVIF_INDENT ! if text is None: text_addr = text_len = 0 else: + mask |= commctrl.LVIF_TEXT if isinstance(text, unicode): text = text.encode("mbcs") |
From: Mark H. <mha...@us...> - 2005-04-12 03:04:07
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23275 Modified Files: commctrl.py Log Message: Fix [ 1170769 ] commctrl.PY_0U should be 0 Was already done to win32con in rev 1.6 Index: commctrl.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/commctrl.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** commctrl.py 30 Jan 2005 22:57:29 -0000 1.5 --- commctrl.py 12 Apr 2005 03:03:53 -0000 1.6 *************** *** 19,23 **** ODT_TAB = 101 ODT_LISTVIEW = 102 ! PY_0U = 5177344 NM_FIRST = (PY_0U) # generic to all controls NM_LAST = (PY_0U- 99) --- 19,23 ---- ODT_TAB = 101 ODT_LISTVIEW = 102 ! PY_0U = 0 NM_FIRST = (PY_0U) # generic to all controls NM_LAST = (PY_0U- 99) |
From: Mark H. <mha...@us...> - 2005-04-12 02:56:59
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18491/src Modified Files: win32file.i Log Message: Fix [ 1178513 ] Invalid handle with win32file.CreateIoCompletionPort This function now correctly returns the existing handle when one is passed Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** win32file.i 7 Jan 2005 00:11:03 -0000 1.45 --- win32file.i 12 Apr 2005 02:56:44 -0000 1.46 *************** *** 226,236 **** #ifndef MS_WINCE // @pyswig <o PyHANDLE>|CreateIoCompletionPort|Can associate an instance of an opened file with a newly created or an existing input/output (I/O) completion port; or it can create an I/O completion port without associating it with a file. ! PyHANDLE CreateIoCompletionPort ( ! HANDLE FileHandle, // @pyparm <o PyHANDLE>|handle||file handle to associate with the I/O completion port ! HANDLE INPUT_NULLOK, // @pyparm <o PyHANDLE>|existing||handle to the I/O completion port ! DWORD CompletionKey, // @pyparm int|completionKey||per-file completion key for I/O completion packets ! DWORD NumberOfConcurrentThreads // @pyparm int|numThreads||number of threads allowed to execute concurrently ! ); // @pyswig |DefineDosDevice|Lets an application define, redefine, or delete MS-DOS device names. --- 226,275 ---- #ifndef MS_WINCE + // CreateIoCompletionPort gets special treatment due to its special result + // code handling. + + %{ // @pyswig <o PyHANDLE>|CreateIoCompletionPort|Can associate an instance of an opened file with a newly created or an existing input/output (I/O) completion port; or it can create an I/O completion port without associating it with a file. ! // @rdesc If an existing handle to a completion port is passed, the result ! // of this function will be that same handle. See MSDN for more details. ! PyObject *MyCreateIoCompletionPort(PyObject *self, PyObject *args) ! { ! PyObject *obFileHandle, *obExistingHandle; ! int key, nt; ! PyObject *obRet = NULL; ! if (!PyArg_ParseTuple(args, "OOii:CreateIoCompletionPort", ! &obFileHandle, // @pyparm <o PyHANDLE>|handle||file handle to associate with the I/O completion port ! &obExistingHandle, // @pyparm <o PyHANDLE>|existing||handle to the I/O completion port ! &key, // @pyparm int|completionKey||per-file completion key for I/O completion packets ! &nt)) // @pyparm int|numThreads||number of threads allowed to execute concurrently ! return NULL; ! HANDLE hFile, hExisting; ! if (!PyWinObject_AsHANDLE(obFileHandle, &hFile, FALSE)) ! return NULL; ! if (!PyWinObject_AsHANDLE(obExistingHandle, &hExisting, TRUE)) ! return NULL; ! if (hExisting) { ! obRet = obExistingHandle; ! Py_INCREF(obRet); ! } ! HANDLE hRet; ! Py_BEGIN_ALLOW_THREADS ! hRet = CreateIoCompletionPort(hFile, hExisting, key, nt); ! Py_END_ALLOW_THREADS ! if (!hRet) { ! Py_XDECREF(obRet); ! return PyWin_SetAPIError("CreateIoCompletionPort"); ! } ! if (obRet==NULL) // New handle returned ! obRet = PyWinObject_FromHANDLE(hRet); ! else ! // it better have returned the same object! ! assert(hRet == hExisting); ! return obRet; ! } ! ! %} ! ! %native (CreateIoCompletionPort) MyCreateIoCompletionPort; // @pyswig |DefineDosDevice|Lets an application define, redefine, or delete MS-DOS device names. |
From: Mark H. <mha...@us...> - 2005-04-12 02:56:58
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18491/test Modified Files: test_win32file.py Log Message: Fix [ 1178513 ] Invalid handle with win32file.CreateIoCompletionPort This function now correctly returns the existing handle when one is passed Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_win32file.py 9 Oct 2004 01:42:01 -0000 1.5 --- test_win32file.py 12 Apr 2005 02:56:45 -0000 1.6 *************** *** 149,152 **** --- 149,181 ---- h.Close() + def testCompletionPortsMultiple(self): + # Mainly checking that we can "associate" an existing handle. This + # failed in build 203. + import socket + + ioport = win32file.CreateIoCompletionPort(win32file.INVALID_HANDLE_VALUE, + 0, 0, 0) + socks = [] + for PORT in range(9123, 9125): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + sock.bind(('', PORT)) + sock.listen(1) + socks.append(sock) + new = win32file.CreateIoCompletionPort(sock.fileno(), ioport, PORT, 0) + assert new is ioport + for s in socks: + s.close() + hv = int(ioport) + ioport = new = None + # The handle itself should be closed now (unless we leak references!) + # Check that. + try: + win32file.CloseHandle(hv) + raise RuntimeError, "Expected close to fail!" + except win32file.error, (hr, func, msg): + self.failUnlessEqual(hr, winerror.ERROR_INVALID_HANDLE) + + class TestFindFiles(unittest.TestCase): def testIter(self): |
From: Mark H. <mha...@us...> - 2005-04-12 02:47:43
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14266 Modified Files: win32gui.i Log Message: * Autoduck corrections for FlashWindowEx * Add BitBlt, StretchBlt and MaskBlt Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** win32gui.i 5 Mar 2005 04:59:52 -0000 1.58 --- win32gui.i 12 Apr 2005 02:47:32 -0000 1.59 *************** *** 1246,1249 **** --- 1246,1250 ---- // @pyparm int|bInvert|| BOOL FlashWindow(HWND hwnd, BOOL bInvert); + // @pyswig int|FlashWindowEx|The FlashWindowEx function flashes the specified window a specified number of times. %{ *************** *** 1983,1986 **** --- 1984,2040 ---- BOOLAPI DeleteObject(HANDLE h); // @pyparm int|handle||handle to the object to delete. + // @pyswig |BitBlt||Performs a bit-block transfer of the color data corresponding + // to a rectangle of pixels from the specified source device context into a + // destination device context. + BOOLAPI BitBlt( + HDC hdcDest, // @pyparm int|hdcDest||handle to destination DC + int nXDest, // @pyparm int|x||x-coord of destination upper-left corner + int nYDest, // @pyparm int|t||y-coord of destination upper-left corner + int nWidth, // @pyparm int|width||width of destination rectangle + int nHeight, // @pyparm int|height||height of destination rectangle + HDC hdcSrc, // @pyparm int|hdcSrc||handle to source DC + int nXSrc, // @pyparm int|nXSrc||x-coordinate of source upper-left corner + int nYSrc, // @pyparm int|nYSrc||y-coordinate of source upper-left corner + DWORD dwRop // @pyparm int|dwRop||raster operation code + ); + + // @pyswig |StretchBlt||Copies a bitmap from a source rectangle into a destination + // rectangle, stretching or compressing the bitmap to fit the dimensions of the + // destination rectangle, if necessary + BOOLAPI StretchBlt( + HDC hdcDest, // handle to destination DC + int nXOriginDest, // x-coord of destination upper-left corner + int nYOriginDest, // y-coord of destination upper-left corner + int nWidthDest, // width of destination rectangle + int nHeightDest, // height of destination rectangle + HDC hdcSrc, // handle to source DC + int nXOriginSrc, // x-coord of source upper-left corner + int nYOriginSrc, // y-coord of source upper-left corner + int nWidthSrc, // width of source rectangle + int nHeightSrc, // height of source rectangle + DWORD dwRop // raster operation code + ); + + %ifdef WINXPGUI + // @pyswig |MaskBlt|Combines the color data for the source and destination + // bitmaps using the specified mask and raster operation. + // @comm This function is available only in winxpgui, as it is not supported + // on Win9x. + BOOLAPI MaskBlt( + HDC hdcDest, // handle to destination DC + int nXDest, // x-coord of destination upper-left corner + int nYDest, // y-coord of destination upper-left corner + int nWidth, // width of source and destination + int nHeight, // height of source and destination + HDC hdcSrc, // handle to source DC + int nXSrc, // x-coord of upper-left corner of source + int nYSrc, // y-coord of upper-left corner of source + HBITMAP hbmMask, // handle to monochrome bit mask + int xMask, // horizontal offset into mask bitmap + int yMask, // vertical offset into mask bitmap + DWORD dwRop // raster operation code + ); + %endif + // @pyswig int|ImageList_Add|Adds an image or images to an image list. // @rdesc Returns the index of the first new image if successful, or -1 otherwise. |
From: Mark H. <mha...@us...> - 2005-04-11 13:04:50
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1781/axdebug Modified Files: adb.py expressions.py stackframe.py Log Message: Patches from Kiriakos Vlahos, as described in [ 1119799 ] Active Debugging bugs. Index: expressions.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/expressions.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** expressions.py 6 Jan 2000 04:14:49 -0000 1.2 --- expressions.py 11 Apr 2005 13:04:42 -0000 1.3 *************** *** 68,83 **** return self.hresult, result ! def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid): name_vals = [] if hasattr(object, "has_key"): # If it is a dict. name_vals = object.items() infos = [] for name, val in name_vals: ! infos.append(GetPropertyInfo(name, val, dwFieldSpec, nRadix, 0)) return _wrap(EnumDebugPropertyInfo(infos), axdebug.IID_IEnumDebugPropertyInfo) ! def GetPropertyInfo(obname, obvalue, dwFieldSpec, nRadix, hresult=0): # returns a tuple ! name = typ = value = fullname = None if dwFieldSpec & axdebug.DBGPROP_INFO_VALUE: value = MakeNiceString(obvalue) --- 68,87 ---- return self.hresult, result ! def MakeEnumDebugProperty(object, dwFieldSpec, nRadix, iid, stackFrame = None): name_vals = [] if hasattr(object, "has_key"): # If it is a dict. name_vals = object.items() + dictionary = object + elif hasattr(object, "__dict__"): #object with dictionary, module + name_vals = object.__dict__.items() + dictionary = object.__dict__ infos = [] for name, val in name_vals: ! infos.append(GetPropertyInfo(name, val, dwFieldSpec, nRadix, 0, dictionary, stackFrame)) return _wrap(EnumDebugPropertyInfo(infos), axdebug.IID_IEnumDebugPropertyInfo) ! def GetPropertyInfo(obname, obvalue, dwFieldSpec, nRadix, hresult=0, dictionary = None, stackFrame = None): # returns a tuple ! name = typ = value = fullname = attrib = dbgprop = None if dwFieldSpec & axdebug.DBGPROP_INFO_VALUE: value = MakeNiceString(obvalue) *************** *** 94,98 **** if dwFieldSpec & axdebug.DBGPROP_INFO_FULLNAME: fullname = obname ! return name, typ, value, fullname from win32com.server.util import ListEnumeratorGateway --- 98,109 ---- if dwFieldSpec & axdebug.DBGPROP_INFO_FULLNAME: fullname = obname ! if dwFieldSpec & axdebug.DBGPROP_INFO_ATTRIBUTES: ! if hasattr(obvalue, "has_key") or hasattr(obvalue, "__dict__"): # If it is a dict or object ! attrib = axdebug.DBGPROP_ATTRIB_VALUE_IS_EXPANDABLE ! else: ! attrib = 0 ! if dwFieldSpec & axdebug.DBGPROP_INFO_DEBUGPROP: ! dbgprop = _wrap(DebugProperty(name, obvalue, None, hresult, dictionary, stackFrame), axdebug.IID_IDebugProperty) ! return name, typ, value, fullname, attrib, dbgprop from win32com.server.util import ListEnumeratorGateway *************** *** 117,128 **** 'EnumMembers', 'GetParent' ] ! def __init__(self, name, value, parent = None, hresult = 0): self.name = name self.value = value self.parent = parent self.hresult = hresult def GetPropertyInfo(self, dwFieldSpec, nRadix): ! return GetPropertyInfo(self.name, self.value, dwFieldSpec, nRadix, hresult=self.hresult) def GetExtendedInfo(self): ### Note - not in the framework. --- 128,141 ---- 'EnumMembers', 'GetParent' ] ! def __init__(self, name, value, parent = None, hresult = 0, dictionary = None, stackFrame = None): self.name = name self.value = value self.parent = parent self.hresult = hresult + self.dictionary = dictionary + self.stackFrame = stackFrame def GetPropertyInfo(self, dwFieldSpec, nRadix): ! return GetPropertyInfo(self.name, self.value, dwFieldSpec, nRadix, self.hresult, dictionary, stackFrame) def GetExtendedInfo(self): ### Note - not in the framework. *************** *** 130,139 **** def SetValueAsString(self, value, radix): ! # ! RaiseNotImpl("DebugProperty::SetValueAsString") def EnumMembers(self, dwFieldSpec, nRadix, iid): # Returns IEnumDebugPropertyInfo ! return MakeEnumDebugProperty(self.value, dwFieldSpec, nRadix, iid) def GetParent(self): --- 143,154 ---- def SetValueAsString(self, value, radix): ! if self.stackFrame and self.dictionary: ! self.dictionary[self.name]= eval(value,self.stackFrame.f_globals, self.stackFrame.f_locals) ! else: ! RaiseNotImpl("DebugProperty::SetValueAsString") def EnumMembers(self, dwFieldSpec, nRadix, iid): # Returns IEnumDebugPropertyInfo ! return MakeEnumDebugProperty(self.value, dwFieldSpec, nRadix, iid, self.stackFrame) def GetParent(self): Index: adb.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/adb.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** adb.py 6 Dec 2000 12:06:02 -0000 1.3 --- adb.py 11 Apr 2005 13:04:41 -0000 1.4 *************** *** 26,29 **** --- 26,39 ---- tracev = trace # verbose trace + class OutputReflector: + def __init__(self, file, writefunc): + self.writefunc = writefunc + self.file = file + def __getattr__(self,name): + return getattr(self.file, name) + def write(self,message): + self.writefunc(message) + self.file.write(message) + def _dumpf(frame): if frame is None: *************** *** 88,93 **** traceenter("stop_here", _dumpf(frame), _dumpf(self.stopframe)) # As per bdb.stop_here, except for logicalbotframe ! if self.stopframe is None: ! return 1 if frame is self.stopframe: return 1 --- 98,103 ---- traceenter("stop_here", _dumpf(frame), _dumpf(self.stopframe)) # As per bdb.stop_here, except for logicalbotframe ! ## if self.stopframe is None: ! ## return 1 if frame is self.stopframe: return 1 *************** *** 326,332 **** --- 336,352 ---- traceenter("OnConnectDebugger", appDebugger) self.appDebugger = appDebugger + # Reflect output to appDebugger + writefunc = lambda s: appDebugger.onDebugOutput(s) + sys.stdout = OutputReflector(sys.stdout, writefunc) + sys.stderr = OutputReflector(sys.stderr, writefunc) def OnDisconnectDebugger(self): traceenter("OnDisconnectDebugger") + # Stop reflecting output + if isinstance(sys.stdout, OutputReflector): + sys.stdout = sys.stdout.file + if isinstance(sys.stderr, OutputReflector): + sys.stderr = sys.stderr.file + self.appDebugger = None self.set_quit() *************** *** 375,381 **** # want to hit the debugger the instant we return if self.debuggingThreadStateHandle is not None and \ ! self.breakFlags and \ ! self.debuggingThread != win32api.GetCurrentThreadId(): ! axdebug.SetThreadStateTrace(self.debuggingThreadStateHandle, self.trace_dispatch) def _OnSetBreakPoint(self, key, codeContext, bps, lineNo): traceenter("_OnSetBreakPoint", self, key, codeContext, bps, lineNo) --- 395,401 ---- # want to hit the debugger the instant we return if self.debuggingThreadStateHandle is not None and \ ! self.breakFlags and \ ! self.debuggingThread != win32api.GetCurrentThreadId(): ! axdebug.SetThreadStateTrace(self.debuggingThreadStateHandle, self.trace_dispatch) def _OnSetBreakPoint(self, key, codeContext, bps, lineNo): traceenter("_OnSetBreakPoint", self, key, codeContext, bps, lineNo) Index: stackframe.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/stackframe.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** stackframe.py 6 Jan 2000 04:45:44 -0000 1.2 --- stackframe.py 11 Apr 2005 13:04:42 -0000 1.3 *************** *** 141,145 **** print "EnumMembers", dwFieldSpec, nRadix, iid import expressions ! return expressions.MakeEnumDebugProperty(self.frame.f_locals, dwFieldSpec, nRadix, iid) def GetParent(self): --- 141,145 ---- print "EnumMembers", dwFieldSpec, nRadix, iid import expressions ! return expressions.MakeEnumDebugProperty(self.frame.f_locals, dwFieldSpec, nRadix, iid, self.frame) def GetParent(self): |