pywin32-checkins Mailing List for Python for Windows Extensions (Page 100)
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...> - 2006-09-22 14:31:35
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21985/src Modified Files: PyOVERLAPPED.cpp PyWinObjects.h Log Message: [ 1408485 ] OVERLAPPED not hashable Index: PyWinObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyWinObjects.h 2 Jun 2005 00:03:33 -0000 1.9 --- PyWinObjects.h 22 Sep 2006 14:31:32 -0000 1.10 *************** *** 156,159 **** --- 156,160 ---- static PyObject *getattr(PyObject *self, char *name); static int setattr(PyObject *self, char *name, PyObject *v); + static long hashFunc(PyObject *self); #ifdef _MSC_VER #pragma warning( disable : 4251 ) Index: PyOVERLAPPED.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyOVERLAPPED.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyOVERLAPPED.cpp 17 Mar 2006 01:53:22 -0000 1.10 --- PyOVERLAPPED.cpp 22 Sep 2006 14:31:32 -0000 1.11 *************** *** 78,82 **** 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! 0, 0, /* tp_call */ 0, /* tp_str */ --- 78,82 ---- 0, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! PyOVERLAPPED::hashFunc, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ *************** *** 204,207 **** --- 204,213 ---- } + /*static*/ long PyOVERLAPPED::hashFunc(PyObject *ob) + { + // Just use the address. + return _Py_HashPointer(ob); + } + /*static*/ void PyOVERLAPPED::deallocFunc(PyObject *ob) { |
From: Mark H. <mha...@us...> - 2006-09-22 14:19:12
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16784 Modified Files: build.py Log Message: Fix [ 1548903 ] Incomplete gen_py cache file results from missing typelib Index: build.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** build.py 22 Mar 2006 08:35:13 -0000 1.29 --- build.py 22 Sep 2006 14:19:03 -0000 1.30 *************** *** 25,28 **** --- 25,29 ---- import pythoncom from pywintypes import UnicodeType, TimeType + import winerror # A string ending with a quote can not be safely triple-quoted. *************** *** 450,454 **** return pythoncom.VT_CARRAY, None, None if indir_vt == pythoncom.VT_USERDEFINED: ! resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr) resultAttr = resultTypeInfo.GetTypeAttr() typeKind = resultAttr.typekind --- 451,463 ---- return pythoncom.VT_CARRAY, None, None if indir_vt == pythoncom.VT_USERDEFINED: ! try: ! resultTypeInfo = itypeinfo.GetRefTypeInfo(subrepr) ! except pythoncom.com_error, details: ! if details[0] in [winerror.TYPE_E_CANTLOADLIBRARY, ! winerror.TYPE_E_LIBNOTREGISTERED]: ! # an unregistered interface ! return pythoncom.VT_UNKNOWN, None, None ! raise ! resultAttr = resultTypeInfo.GetTypeAttr() typeKind = resultAttr.typekind |
From: Mark H. <mha...@us...> - 2006-09-22 13:31:29
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32738 Modified Files: policy.py Log Message: Fix [ 1457673 ] dispids can go wrong when using typelibs (by allowing existing dispids to be reused) Index: policy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/policy.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** policy.py 8 Jun 2005 05:19:03 -0000 1.21 --- policy.py 22 Sep 2006 13:31:27 -0000 1.22 *************** *** 510,514 **** self._dispid_to_func_[DISPID_EVALUATE] = '_Evaluate' ! dispid = self._allocnextdispid(999) # note: funcs have precedence over attrs (install attrs first) if hasattr(ob, '_public_attrs_'): --- 510,514 ---- self._dispid_to_func_[DISPID_EVALUATE] = '_Evaluate' ! next_dispid = self._allocnextdispid(999) # note: funcs have precedence over attrs (install attrs first) if hasattr(ob, '_public_attrs_'): *************** *** 518,531 **** readonly = [ ] for name in ob._public_attrs_: ! self._name_to_dispid_[string.lower(name)] = dispid self._dispid_to_get_[dispid] = name if name not in readonly: self._dispid_to_put_[dispid] = name - dispid = self._allocnextdispid(dispid) for name in getattr(ob, "_public_methods_", []): ! if not self._name_to_dispid_.has_key(string.lower(name)): ! self._name_to_dispid_[string.lower(name)] = dispid ! self._dispid_to_func_[dispid] = name ! dispid = self._allocnextdispid(dispid) self._typeinfos_ = None # load these on demand. --- 518,536 ---- readonly = [ ] for name in ob._public_attrs_: ! dispid = self._name_to_dispid_.get(name.lower()) ! if dispid is None: ! dispid = next_dispid ! self._name_to_dispid_[name.lower()] = dispid ! next_dispid = self._allocnextdispid(next_dispid) self._dispid_to_get_[dispid] = name if name not in readonly: self._dispid_to_put_[dispid] = name for name in getattr(ob, "_public_methods_", []): ! dispid = self._name_to_dispid_.get(name.lower()) ! if dispid is None: ! dispid = next_dispid ! self._name_to_dispid_[name.lower()] = dispid ! next_dispid = self._allocnextdispid(next_dispid) ! self._dispid_to_func_[dispid] = name self._typeinfos_ = None # load these on demand. |
From: Mark H. <mha...@us...> - 2006-09-09 03:35:59
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7697 Modified Files: win32apimodule.cpp Log Message: Add GetModuleFileNameW Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** win32apimodule.cpp 31 Aug 2006 02:50:01 -0000 1.63 --- win32apimodule.cpp 9 Sep 2006 03:35:57 -0000 1.64 *************** *** 1394,1398 **** if (rc==0) return ReturnAPIError("GetModuleFileName"); ! return Py_BuildValue("s",buf); } --- 1394,1416 ---- if (rc==0) return ReturnAPIError("GetModuleFileName"); ! return PyString_FromString(buf); ! } ! ! // @pymethod unicode|win32api|GetModuleFileNameW|Retrieves the unicode filename of the specified module. ! static PyObject * ! PyGetModuleFileNameW(PyObject * self, PyObject * args) ! { ! int iMod; ! wchar_t buf[_MAX_PATH]; ! // @pyparm int|hModule||Specifies the handle to the module. ! if (!PyArg_ParseTuple(args, "i:GetModuleFileNameW", &iMod)) ! return (NULL); ! // @pyseeapi GetModuleFileName ! PyW32_BEGIN_ALLOW_THREADS ! long rc = ::GetModuleFileNameW( (HMODULE)iMod, buf, sizeof(buf)); ! PyW32_END_ALLOW_THREADS ! if (rc==0) ! return ReturnAPIError("GetModuleFileNameW"); ! return PyUnicode_FromUnicode(buf, wcslen(buf)); } *************** *** 4906,4909 **** --- 4924,4928 ---- {"GetLogicalDriveStrings", PyGetLogicalDriveStrings, 1}, // @pymeth GetLogicalDriveStrings|Returns a list of strings for all the drives. {"GetModuleFileName", PyGetModuleFileName,1}, // @pymeth GetModuleFileName|Retrieves the filename of the specified module. + {"GetModuleFileNameW", PyGetModuleFileNameW,1}, // @pymeth GetModuleFileNameW|Retrieves the unicode filename of the specified module. {"GetModuleHandle", PyGetModuleHandle,1}, // @pymeth GetModuleHandle|Returns the handle of an already loaded DLL. {"GetProfileSection", PyGetProfileSection,1}, // @pymeth GetProfileSection|Returns a list of entries in an INI file. |
From: Mark H. <mha...@us...> - 2006-09-09 03:29:33
|
Update of /cvsroot/pywin32/pywin32/isapi/samples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4792 Modified Files: advanced.py Log Message: correct comment Index: advanced.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/samples/advanced.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** advanced.py 6 Oct 2004 05:11:53 -0000 1.1 --- advanced.py 9 Sep 2006 03:29:30 -0000 1.2 *************** *** 166,170 **** # Setup our custom option parser. from optparse import OptionParser ! parser = OptionParser('') # black usage, so isapi sets it. parser.add_option("", "--description", action="store", --- 166,170 ---- # Setup our custom option parser. from optparse import OptionParser ! parser = OptionParser('') # blank usage, so isapi sets it. parser.add_option("", "--description", action="store", |
From: Mark H. <mha...@us...> - 2006-08-30 12:34:00
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14576 Modified Files: win32file.i Log Message: Fix 1508459: AcceptEx needs to return anerror code win32file.AcceptEx now returns either 0, or ERROR_IO_PENDING Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** win32file.i 14 Aug 2006 03:33:11 -0000 1.61 --- win32file.i 30 Aug 2006 12:33:58 -0000 1.62 *************** *** 1835,1838 **** --- 1835,1841 ---- %{ // @pyswig |AcceptEx|Version of accept that uses Overlapped I/O + // @rdesc The result is 0 or ERROR_IO_PENDING. All other values will raise + // win32file.error. Specifically: if the win32 function returns FALSE, + // WSAGetLastError() is checked for ERROR_IO_PENDING. static PyObject *MyAcceptEx ( *************** *** 1853,1857 **** void *buf = NULL; DWORD cBytesRecvd = 0; ! int rc; int iMinBufferSize = (sizeof(SOCKADDR_IN) + 16) * 2; WSAPROTOCOL_INFO wsProtInfo; --- 1856,1861 ---- void *buf = NULL; DWORD cBytesRecvd = 0; ! BOOL ok; ! int rc = 0; int iMinBufferSize = (sizeof(SOCKADDR_IN) + 16) * 2; WSAPROTOCOL_INFO wsProtInfo; *************** *** 1931,1935 **** // Phew... finally, all the arguments are converted... Py_BEGIN_ALLOW_THREADS ! rc = AcceptEx( sListening, sAccepting, --- 1935,1939 ---- // Phew... finally, all the arguments are converted... Py_BEGIN_ALLOW_THREADS ! ok = AcceptEx( sListening, sAccepting, *************** *** 1941,1945 **** pOverlapped); Py_END_ALLOW_THREADS ! if (!rc) { rc = WSAGetLastError(); --- 1945,1949 ---- pOverlapped); Py_END_ALLOW_THREADS ! if (!ok) { rc = WSAGetLastError(); *************** *** 1950,1957 **** } } - Py_DECREF(pORB); ! Py_INCREF(Py_None); ! rv = Py_None; Cleanup: return rv; --- 1954,1959 ---- } } Py_DECREF(pORB); ! rv = PyInt_FromLong(rc); Cleanup: return rv; |
From: Mark H. <mha...@sk...> - 2006-08-30 11:17:24
|
FYI, recently all checkins from me cause the checkin message to bounce back with a confusing error. This has been happening for a while to Roger too, and we are the only 2 checking stuff in - which means this list is failing miserably :) I've opened a support request re mine, but if Roger's was anything to go by, I expect to find it is "not our fault" from the POV of SF - but we'll see. Cheers, Mark |
From: Mark H. <mha...@us...> - 2006-08-10 10:11:30
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26800 Modified Files: win32uiole.cpp Log Message: Add AfxOleInit, SetMessagePendingDelay, EnableNotRespondingDialog and EnableBusyDialog to the win32uiole module. Index: win32uiole.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiole.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** win32uiole.cpp 28 Jan 2005 22:40:01 -0000 1.5 --- win32uiole.cpp 10 Aug 2006 10:11:06 -0000 1.6 *************** *** 98,103 **** --- 98,150 ---- } + // @pymethod |win32uiole|SetMessagePendingDelay| + static PyObject *win32uiole_SetMessagePendingDelay(PyObject *self, PyObject *args) + { + // @pyparm int|delay|| + int delay; + if (!PyArg_ParseTuple(args, "i", &delay)) + return NULL; + AfxOleGetMessageFilter()->SetMessagePendingDelay(delay); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|EnableNotRespondingDialog| + static PyObject *win32uiole_EnableNotRespondingDialog(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + int enabled; + if (!PyArg_ParseTuple(args, "i", &enabled)) + return NULL; + AfxOleGetMessageFilter()->EnableNotRespondingDialog(enabled); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|EnableBusyDialog| + static PyObject *win32uiole_EnableBusyDialog(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + int enabled; + if (!PyArg_ParseTuple(args, "i", &enabled)) + return NULL; + AfxOleGetMessageFilter()->EnableBusyDialog(enabled); + Py_INCREF(Py_None); + return Py_None; + } + + // @pymethod |win32uiole|AfxOleInit| + static PyObject *win32uiole_AfxOleInit(PyObject *self, PyObject *args) + { + // @pyparm bool|enabled|| + if (!PyArg_ParseTuple(args, "")) + return NULL; + BOOL rc = AfxOleInit(); + return PyBool_FromLong(rc); + } + // @module win32uiole|A module, encapsulating the Microsoft Foundation Classes OLE functionality. static struct PyMethodDef uiole_functions[] = { + {"AfxOleInit", win32uiole_AfxOleInit, 1}, // @pymeth AfxOleInit| {"CreateInsertDialog", PyCOleInsertDialog::create, 1}, // @pymeth CreateInsertDialog|Creates a InsertObject dialog. {"CreateOleClientItem", PyCOleClientItem_Create, 1}, // @pymeth CreateOleClientItem|Creates a <o PyCOleClientItem> object. *************** *** 107,110 **** --- 154,160 ---- {"OleGetUserCtrl", win32uiole_get_user_ctrl, 1}, // @pymeth OleGetUserCtrl|Retrieves the current user-control flag. {"OleSetUserCtrl", win32uiole_set_user_ctrl, 1}, // @pymeth OleSetUserCtrl|Sets the current user-control flag. + {"SetMessagePendingDelay", win32uiole_SetMessagePendingDelay, 1}, // @pymeth SetMessagePendingDelay| + {"EnableNotRespondingDialog", win32uiole_EnableNotRespondingDialog, 1}, // @pymeth EnableNotRespondingDialog| + {"EnableBusyDialog", win32uiole_EnableBusyDialog, 1}, // @pymeth EnableNotRespondingDialog| {NULL, NULL} }; |
From: Mark H. <mha...@us...> - 2006-08-04 08:33:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21047 Modified Files: PyADSIUtil.cpp Log Message: Fix build error in py2.5 Index: PyADSIUtil.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyADSIUtil.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyADSIUtil.cpp 2 Jun 2005 06:27:24 -0000 1.5 --- PyADSIUtil.cpp 4 Aug 2006 08:33:44 -0000 1.6 *************** *** 1,4 **** --- 1,5 ---- // @doc #include "Python.h" + #include "pyerrors.h" // for PyErr_Warn in 2.5... #include "Windows.h" #include "PyWinTypes.h" |
From: Mark H. <mha...@us...> - 2006-08-04 08:32:52
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20691 Modified Files: win32netuser.cpp Log Message: Add support for USER_INFO_4 and correct autoduck for another element. Index: win32netuser.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netuser.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** win32netuser.cpp 18 May 2006 07:44:15 -0000 1.8 --- win32netuser.cpp 4 Aug 2006 08:32:48 -0000 1.9 *************** *** 19,22 **** --- 19,23 ---- #define UI2_ENTRY(name, t, r) { _T(#name), t, offsetof(USER_INFO_2, usri2_##name), r } #define UI3_ENTRY(name, t, r) { _T(#name), t, offsetof(USER_INFO_3, usri3_##name), r } + #define UI4_ENTRY(name, t, r) { _T(#name), t, offsetof(USER_INFO_4, usri4_##name), r } #define UI10_ENTRY(name, t, r) { _T(#name), t, offsetof(USER_INFO_10, usri10_##name), r } #define UI11_ENTRY(name, t, r) { _T(#name), t, offsetof(USER_INFO_11, usri11_##name), r } *************** *** 117,120 **** --- 118,155 ---- }; + // @object PyUSER_INFO_4|A dictionary holding the information in a Win32 USER_INFO_4 structure. + static struct PyNET_STRUCT_ITEM ui4[] = { + UI4_ENTRY(name, NSI_WSTR, 0), // @prop string/<o PyUnicode>|name| + UI4_ENTRY(password, NSI_WSTR, 0), // @prop string/<o PyUnicode>|password| + UI4_ENTRY(password_age, NSI_DWORD, 0), // @prop int|password_age| + UI4_ENTRY(priv, NSI_DWORD, 0), // @prop int|priv| + UI4_ENTRY(home_dir, NSI_WSTR, 0), // @prop string/<o PyUnicode>|home_dir| + UI4_ENTRY(comment, NSI_WSTR, 0), // @prop string/<o PyUnicode>|comment| + UI4_ENTRY(flags, NSI_DWORD, 0), // @prop int|flags| + UI4_ENTRY(script_path, NSI_WSTR, 0), // @prop string/<o PyUnicode>|script_path| + UI4_ENTRY(auth_flags, NSI_DWORD, 0), // @prop int|auth_flags| + UI4_ENTRY(full_name, NSI_WSTR, 0), // @prop string/<o PyUnicode>|full_name| + UI4_ENTRY(usr_comment,NSI_WSTR, 0), // @prop string/<o PyUnicode>|usr_comment| + UI4_ENTRY(parms, NSI_WSTR, 0), // @prop string/<o PyUnicode>|parms| + UI4_ENTRY(workstations, NSI_WSTR, 0), // @prop string/<o PyUnicode>|workstations| + UI4_ENTRY(last_logon, NSI_DWORD, 0), // @prop int|last_logon| + UI4_ENTRY(last_logoff, NSI_DWORD, 0), // @prop int|last_logoff| + UI4_ENTRY(acct_expires, NSI_DWORD, 0), // @prop int|acct_expires| + UI4_ENTRY(max_storage, NSI_DWORD, 0), // @prop int|max_storage| + UI4_ENTRY(units_per_week, NSI_DWORD, 0), // @prop int|units_per_week| + UI4_ENTRY(logon_hours, NSI_HOURS, 0), // @prop string|logon_hours| + UI4_ENTRY(bad_pw_count, NSI_DWORD, 0), // @prop int|bad_pw_count| + UI4_ENTRY(num_logons, NSI_DWORD, 0), // @prop int|num_logons| + UI4_ENTRY(logon_server, NSI_WSTR, 0), // @prop string/<o PyUnicode>|logon_server| + UI4_ENTRY(country_code, NSI_DWORD, 0), // @prop int|country_code| + UI4_ENTRY(code_page, NSI_DWORD, 0), // @prop int|code_page| + UI4_ENTRY(user_sid, NSI_SID, 0), // @prop <o PySID>|user_sid| + UI4_ENTRY(primary_group_id, NSI_DWORD, 0), // @prop int|primary_group_id| + UI4_ENTRY(profile, NSI_WSTR, 0), // @prop string/<o PyUnicode>|profile| + UI4_ENTRY(home_dir_drive, NSI_WSTR, 0), // @prop string/<o PyUnicode>|home_dir_drive| + UI4_ENTRY(password_expired, NSI_DWORD, 0), // @prop int|password_expired| + {NULL} + }; + // @object PyUSER_INFO_10|A dictionary holding the information in a Win32 USER_INFO_10 structure. static struct PyNET_STRUCT_ITEM ui10[] = { *************** *** 216,219 **** --- 251,255 ---- { 2, ui2, sizeof(USER_INFO_2) }, // @flag 2|<o PyUSER_INFO_2> { 3, ui3, sizeof(USER_INFO_3) }, // @flag 3|<o PyUSER_INFO_3> + { 4, ui4, sizeof(USER_INFO_4) }, // @flag 4|<o PyUSER_INFO_4> { 10, ui10, sizeof(USER_INFO_10) }, // @flag 10|<o PyUSER_INFO_10> { 11, ui11, sizeof(USER_INFO_11) }, // @flag 11|<o PyUSER_INFO_11> *************** *** 250,254 **** static struct PyNET_STRUCT_ITEM umi2[] = { UMI2_ENTRY(domain_name, NSI_WSTR, 0), // @prop string/<o PyUnicode>|domain_name| ! UMI2_ENTRY(domain_id, NSI_SID, 0), // @prop int|domain_id| {NULL} }; --- 286,290 ---- static struct PyNET_STRUCT_ITEM umi2[] = { UMI2_ENTRY(domain_name, NSI_WSTR, 0), // @prop string/<o PyUnicode>|domain_name| ! UMI2_ENTRY(domain_id, NSI_SID, 0), // @prop <o PySID>|domain_id| {NULL} }; |
From: Mark H. <mha...@us...> - 2006-08-03 02:46:32
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31040 Modified Files: PyWinTypes.h Log Message: Define PyObject_FromWIN32_FIND_DATA as either PyObject_FromWIN32_FIND_DATAW or PyObject_FromWIN32_FIND_DATAA Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** PyWinTypes.h 11 Jul 2006 11:30:08 -0000 1.29 --- PyWinTypes.h 3 Aug 2006 02:46:30 -0000 1.30 *************** *** 311,314 **** --- 311,319 ---- PYWINTYPES_EXPORT PyObject *PyObject_FromWIN32_FIND_DATAA(WIN32_FIND_DATAA *pData); PYWINTYPES_EXPORT PyObject *PyObject_FromWIN32_FIND_DATAW(WIN32_FIND_DATAW *pData); + #ifdef UNICODE + #define PyObject_FromWIN32_FIND_DATA PyObject_FromWIN32_FIND_DATAW + #else + #define PyObject_FromWIN32_FIND_DATA PyObject_FromWIN32_FIND_DATAA + #endif // POINT tuple, used in win32api_display.cpp and win32gui.i |
From: Mark H. <mha...@us...> - 2006-08-03 02:45:56
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30698 Modified Files: win32apimodule.cpp Log Message: Allow FormatMessage to accept longs that fit in 32bits (ie, 'k' format) Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** win32apimodule.cpp 16 Jul 2006 11:04:20 -0000 1.61 --- win32apimodule.cpp 3 Aug 2006 02:45:54 -0000 1.62 *************** *** 528,532 **** int errCode=0; // @pyparm int|errCode|0|The error code to return the message for, If this value is 0, then GetLastError() is called to determine the error code. ! if (PyArg_ParseTuple (args, "|i:FormatMessage", &errCode)) { if (errCode==0) // @pyseeapi GetLastError --- 528,532 ---- int errCode=0; // @pyparm int|errCode|0|The error code to return the message for, If this value is 0, then GetLastError() is called to determine the error code. ! if (PyArg_ParseTuple (args, "|k:FormatMessage", &errCode)) { if (errCode==0) // @pyseeapi GetLastError |
From: Mark H. <mha...@us...> - 2006-08-02 23:05:53
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17757 Modified Files: shell.cpp Log Message: Add DragQueryFileW and SHGetPathFromIDListW, and other changes that would allow things to build with UNICODE defined (but we still don't do that) Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** shell.cpp 12 Jul 2006 12:15:29 -0000 1.46 --- shell.cpp 2 Aug 2006 23:05:43 -0000 1.47 *************** *** 478,482 **** pci->lpVerb = PyString_AsString(obVerb); } else if (PyInt_Check(obVerb)) { ! pci->lpVerb = MAKEINTRESOURCE(PyInt_AsLong(obVerb)); } else { PyErr_Format(PyExc_TypeError, "verb must be an int or string"); --- 478,482 ---- pci->lpVerb = PyString_AsString(obVerb); } else if (PyInt_Check(obVerb)) { ! pci->lpVerb = MAKEINTRESOURCEA(PyInt_AsLong(obVerb)); } else { PyErr_Format(PyExc_TypeError, "verb must be an int or string"); *************** *** 836,840 **** goto error; ! if (!PyWinObject_AsTCHAR(obProgressTitle, (LPSTR *)&p->lpszProgressTitle, TRUE)) return FALSE; return TRUE; --- 836,840 ---- goto error; ! if (!PyWinObject_AsTCHAR(obProgressTitle, (LPTSTR *)&p->lpszProgressTitle, TRUE)) return FALSE; return TRUE; *************** *** 972,979 **** } ! // @pymethod string/<o PyUnicode>|shell|SHGetPathFromIDList|Converts an IDLIST to a path. static PyObject *PySHGetPathFromIDList(PyObject *self, PyObject *args) { ! TCHAR buffer[MAX_PATH]; PyObject *rc; LPITEMIDLIST pidl; --- 972,979 ---- } ! // @pymethod string|shell|SHGetPathFromIDList|Converts an IDLIST to a path. static PyObject *PySHGetPathFromIDList(PyObject *self, PyObject *args) { ! CHAR buffer[MAX_PATH]; PyObject *rc; LPITEMIDLIST pidl; *************** *** 987,991 **** PY_INTERFACE_PRECALL; ! BOOL ok = SHGetPathFromIDList(pidl, buffer); PY_INTERFACE_POSTCALL; if (!ok) { --- 987,991 ---- PY_INTERFACE_PRECALL; ! BOOL ok = SHGetPathFromIDListA(pidl, buffer); PY_INTERFACE_POSTCALL; if (!ok) { *************** *** 993,1002 **** rc = NULL; } else ! rc = PyWinObject_FromTCHAR(buffer); PyObject_FreePIDL(pidl); return rc; } ! // @pymethod string/<o PyUnicode>|shell|SHGetSpecialFolderPath|Retrieves the path of a special folder. static PyObject *PySHGetSpecialFolderPath(PyObject *self, PyObject *args) { --- 993,1028 ---- rc = NULL; } else ! rc = PyString_FromString(buffer); PyObject_FreePIDL(pidl); return rc; } ! // @pymethod <o PyUnicode>|shell|SHGetPathFromIDListW|Converts an IDLIST to a path. ! static PyObject *PySHGetPathFromIDListW(PyObject *self, PyObject *args) ! { ! WCHAR buffer[MAX_PATH]; ! PyObject *rc; ! LPITEMIDLIST pidl; ! PyObject *obPidl; ! ! if (!PyArg_ParseTuple(args, "O:SHGetPathFromIDListW", &obPidl)) ! // @pyparm <o PyIDL>|idl||The ITEMIDLIST ! return NULL; ! if (!PyObject_AsPIDL(obPidl, &pidl)) ! return NULL; ! ! PY_INTERFACE_PRECALL; ! BOOL ok = SHGetPathFromIDListW(pidl, buffer); ! PY_INTERFACE_POSTCALL; ! if (!ok) { ! OleSetOleError(E_FAIL); ! rc = NULL; ! } else ! rc = PyWinObject_FromWCHAR(buffer); ! PyObject_FreePIDL(pidl); ! return rc; ! } ! ! // @pymethod <o PyUnicode>|shell|SHGetSpecialFolderPath|Retrieves the path of a special folder. static PyObject *PySHGetSpecialFolderPath(PyObject *self, PyObject *args) { *************** *** 1443,1447 **** PFNSHChangeNotifyRegister pfnSHChangeNotifyRegister = NULL; // This isn't always exported by name - but by ordinal 2!! ! if (hmod) pfnSHChangeNotifyRegister=(PFNSHChangeNotifyRegister)GetProcAddress(hmod, MAKEINTRESOURCE(2)); if (pfnSHChangeNotifyRegister==NULL) return OleSetOleError(E_NOTIMPL); --- 1469,1473 ---- PFNSHChangeNotifyRegister pfnSHChangeNotifyRegister = NULL; // This isn't always exported by name - but by ordinal 2!! ! if (hmod) pfnSHChangeNotifyRegister=(PFNSHChangeNotifyRegister)GetProcAddress(hmod, MAKEINTRESOURCEA(2)); if (pfnSHChangeNotifyRegister==NULL) return OleSetOleError(E_NOTIMPL); *************** *** 1483,1487 **** PFNSHChangeNotifyDeregister pfnSHChangeNotifyDeregister = NULL; // This isn't always exported by name - but by ordinal 4!! ! if (hmod) pfnSHChangeNotifyDeregister=(PFNSHChangeNotifyDeregister)GetProcAddress(hmod, MAKEINTRESOURCE(4)); if (pfnSHChangeNotifyDeregister==NULL) return OleSetOleError(E_NOTIMPL); --- 1509,1513 ---- PFNSHChangeNotifyDeregister pfnSHChangeNotifyDeregister = NULL; // This isn't always exported by name - but by ordinal 4!! ! if (hmod) pfnSHChangeNotifyDeregister=(PFNSHChangeNotifyDeregister)GetProcAddress(hmod, MAKEINTRESOURCEA(4)); if (pfnSHChangeNotifyDeregister==NULL) return OleSetOleError(E_NOTIMPL); *************** *** 1501,1509 **** } ! // @pymethod string/int|shell|DragQueryFile|Notifies the shell that an ! // image in the system image list has changed. ! // @rdesc If the value for index is -1, the result is the number of ! // filenames available, otherwise the result is a string with the ! // requested filename. static PyObject *PyDragQueryFile(PyObject *self, PyObject *args) { --- 1527,1531 ---- } ! // @pymethod int|string|shell|DragQueryFile| static PyObject *PyDragQueryFile(PyObject *self, PyObject *args) { *************** *** 1524,1528 **** return PyErr_NoMemory(); nchars = ::DragQueryFile(hglobal, index, sz, nchars); ! PyObject *ret = PyWinObject_FromTCHAR(sz, nchars); free(sz); return ret; --- 1546,1574 ---- return PyErr_NoMemory(); nchars = ::DragQueryFile(hglobal, index, sz, nchars); ! PyObject *ret = PyString_FromStringAndSize(sz, nchars); ! free(sz); ! return ret; ! } ! ! // @pymethod int|<o PyUnicode>|shell|DragQueryFileW| ! static PyObject *PyDragQueryFileW(PyObject *self, PyObject *args) ! { ! int iglobal; ! UINT index; ! if(!PyArg_ParseTuple(args, "ii:DragQueryFileW", ! &iglobal, // @pyparm int|hglobal||The HGLOBAL object - generally obtained via the 'data_handle' property of a <o PySTGMEDIUM> object. ! &index)) // @pyparm int|index||The index to retrieve. If -1, the result if an integer representing the valid index values. ! return NULL; ! HDROP hglobal = (HDROP)iglobal; ! if (index==0xFFFFFFFF) { ! return PyInt_FromLong(DragQueryFileW(hglobal, index, NULL, 0)); ! } ! // get the buffer size ! UINT nchars = DragQueryFileW(hglobal, index, NULL, 0)+2; ! WCHAR *sz = (WCHAR *)malloc(nchars * sizeof(WCHAR)); ! if (sz==NULL) ! return PyErr_NoMemory(); ! nchars = ::DragQueryFileW(hglobal, index, sz, nchars); ! PyObject *ret = PyWinObject_FromWCHAR(sz, nchars); free(sz); return ret; *************** *** 2164,2169 **** --- 2210,2217 ---- { "AssocCreate", PyAssocCreate, 1 }, // @pymeth AssocCreate|Creates a <o PyIQueryAssociations> object { "DragQueryFile", PyDragQueryFile, 1 }, // @pymeth DragQueryFile|Retrieves the file names of dropped files that have resulted from a successful drag-and-drop operation. + { "DragQueryFileW", PyDragQueryFileW, 1 }, // @pymeth DragQueryFileW|Retrieves the file names of dropped files that have resulted from a successful drag-and-drop operation. { "DragQueryPoint", PyDragQueryPoint, 1}, // @pymeth DragQueryPoint|Retrieves the position of the mouse pointer at the time a file was dropped during a drag-and-drop operation. { "SHGetPathFromIDList", PySHGetPathFromIDList, 1 }, // @pymeth SHGetPathFromIDList|Converts an <o PyIDL> to a path. + { "SHGetPathFromIDListW", PySHGetPathFromIDListW, 1 }, // @pymeth SHGetPathFromIDListW|Converts an <o PyIDL> to a unicode path. { "SHBrowseForFolder", PySHBrowseForFolder, 1 }, // @pymeth SHBrowseForFolder|Displays a dialog box that enables the user to select a shell folder. { "SHGetFileInfo", PySHGetFileInfo, 1}, // @pymeth SHGetFileInfo|Retrieves information about an object in the file system, such as a file, a folder, a directory, or a drive root. |
From: Mark H. <mha...@us...> - 2006-08-02 23:04:48
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17713 Modified Files: setup.py Log Message: unofficial 209.1 builds Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** setup.py 16 Jul 2006 11:42:06 -0000 1.47 --- setup.py 2 Aug 2006 23:04:31 -0000 1.48 *************** *** 1,3 **** ! build_id="209" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) --- 1,3 ---- ! build_id="209.1" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) |
From: Mark H. <mha...@us...> - 2006-07-16 11:42:09
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23010 Modified Files: setup.py CHANGES.txt Log Message: Build 209 Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** setup.py 4 Jul 2006 09:35:49 -0000 1.46 --- setup.py 16 Jul 2006 11:42:06 -0000 1.47 *************** *** 1,3 **** ! build_id="208.1" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) --- 1,3 ---- ! build_id="209" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CHANGES.txt 20 Mar 2006 03:08:34 -0000 1.5 --- CHANGES.txt 16 Jul 2006 11:42:06 -0000 1.6 *************** *** 6,9 **** --- 6,41 ---- However contributors are encouraged to add their own entries for their work. + Build 209 + --------- + * Roger Upole added IEnumString, IShellLinkDataList, IUniformResourceLocator + and IActiveDesktop interfaces, win32gui.GetDlgItemText/GetDlgItemInt, + win32process.AttachThreadInput, win32api.Get/SetHandleInformation, amongst + others + * Roger added a new win32ts module, wrapping Terminal Service functions + * Roger enhanced/fixed win32api.GetLongPathName, PyIBindCtx, + win32gui.SystemParametersInfo/SetLayeredWindowAttributes/ + GetLayeredWindowAttributes, win32net.WNetGetResourceParent, various + win32job methods, shell.SHFileOperation and added many monitor and display + related functions. + * Stefan Rank and Roger enhanced DEVMODE support + * Add asynch (overlapped) support for ReadDirectoryChangesW + * Prevent warnings in later Python 2.5 releases. + * Makepy now generates working code when a method etc is named 'None' + * isapi package now handles site names with extended characters. + * Fix unwanted string value padding by using SQL_VARCHAR instead of SQL_CHAR + in ODBC module. + * Allow extended chars in comments in IE/ASP and other AXScript applications. + * win32api.GetShortPathName now handled unicode (callingGetShortPathNameW) + * When passing large integers via win32com, we now attempt to pass as a 64 + bit integer before falling back to a float. + * Added win32process.CreateRemoteThread, win32gui.ExtTextOut/SetBkColor/ + DrawAnimatedRects, win32api.SetLastError + * Fix return code from ConnectNamedPipe when the function succeeds. + * win32gui_menu demo shows how to do owner-draw menus. + * set_file_audit demo shows ACL inheritance. + * win32gui is no longer 'split' in the help file. + * Fix errors if a timer callback or win32ui Window handler removed themselves. + * Fix memory leaks related to win32ui.CreateWnd + Build 208 --------- |
From: Mark H. <mha...@us...> - 2006-07-16 11:04:40
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19384/test Modified Files: test_win32api.py Log Message: Add SetLastError Index: test_win32api.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32api.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test_win32api.py 21 Jun 2006 12:07:21 -0000 1.10 --- test_win32api.py 16 Jul 2006 11:04:20 -0000 1.11 *************** *** 152,155 **** --- 152,161 ---- self.assertEqual(result, "Hello Mark, how are you today?") + class Misc(unittest.TestCase): + def test_last_error(self): + for x in (0, 1, -1, winerror.TRUST_E_PROVIDER_UNKNOWN): + win32api.SetLastError(x) + self.failUnlessEqual(x, win32api.GetLastError()) + if __name__ == '__main__': unittest.main() |
From: Mark H. <mha...@us...> - 2006-07-16 11:04:39
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19384/src Modified Files: win32apimodule.cpp Log Message: Add SetLastError Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** win32apimodule.cpp 1 Jul 2006 06:45:37 -0000 1.60 --- win32apimodule.cpp 16 Jul 2006 11:04:20 -0000 1.61 *************** *** 1306,1310 **** } ! // @pymethod int|win32api|GetLastError|Retrieves the calling threads last error code value. static PyObject * PyGetLastError(PyObject * self, PyObject * args) --- 1306,1310 ---- } ! // @pymethod int|win32api|GetLastError|Retrieves the calling thread's last error code value. static PyObject * PyGetLastError(PyObject * self, PyObject * args) *************** *** 1314,1317 **** --- 1314,1330 ---- } + // @pymethod int|win32api|SetLastError|Sets the calling thread's last error code value. + static PyObject * + PySetLastError(PyObject * self, PyObject * args) + { + long errVal; + if (!PyArg_ParseTuple(args, "k", &errVal)) + return NULL; + // @pyseeapi SetLastError + ::SetLastError(errVal); + Py_INCREF(Py_None); + return Py_None; + } + // @pymethod string|win32api|GetLogicalDriveStrings|Returns a string with all logical drives currently mapped. static PyObject * PyGetLogicalDriveStrings (PyObject * self, PyObject *args) *************** *** 4945,4948 **** --- 4958,4962 ---- {"SetErrorMode", PySetErrorMode, 1}, // @pymeth SetErrorMode|Controls whether the system will handle the specified types of serious errors, or whether the process will handle them. {"SetFileAttributes", PySetFileAttributes,1}, // @pymeth SetFileAttributes|Sets the named file's attributes. + {"SetLastError", PySetLastError, 1}, // @pymeth SetLastError|Sets the last error code known for the current thread. {"SetSysColors", PySetSysColors, 1}, // @pymeth SetSysColors|Changes color of various window elements {"SetSystemTime", PySetSystemTime, 1}, // @pymeth SetSystemTime|Sets the system time. |
From: Mark H. <mha...@us...> - 2006-07-16 11:02:34
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18175/src Modified Files: win32pipe.i Log Message: Fix the return value from win32pipe.ConnectNamedPipe() when the function succeeds, as discussed on python-win32. Index: win32pipe.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32pipe.i,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** win32pipe.i 10 Jan 2006 00:21:28 -0000 1.13 --- win32pipe.i 16 Jul 2006 11:02:23 -0000 1.14 *************** *** 259,264 **** // @pyswig int|ConnectNamedPipe|Connects to a named pipe ! // @comm The result is the HRESULT from the underlying function. ! // If an overlapped object is passed, the result may be ERROR_IO_PENDING or ERROR_PIPE_CONNECTED. PyObject *MyConnectNamedPipe(PyObject *self, PyObject *args) { --- 259,267 ---- // @pyswig int|ConnectNamedPipe|Connects to a named pipe ! // @comm The result is zero if the function succeeds. If the function fails, ! // GetLastError() is called, and if the result is ERROR_IO_PENDING or ERROR_PIPE_CONNECTED ! // (common when passing an overlapped object), this value is returned. All ! // other error values raise a win32 exception (from which the error code ! // can be extracted) PyObject *MyConnectNamedPipe(PyObject *self, PyObject *args) { *************** *** 280,290 **** } BOOL ok; ! Py_BEGIN_ALLOW_THREADS ok = ConnectNamedPipe(hNamedPipe, pOverlapped); ! Py_END_ALLOW_THREADS ! DWORD rc = GetLastError(); // These error conditions are documented as "acceptable" - ie, // the function has still worked. ! if (!ok && rc!= 0 && rc != ERROR_IO_PENDING && rc != ERROR_PIPE_CONNECTED) return PyWin_SetAPIError("ConnectNamedPipe"); return PyInt_FromLong(rc); --- 283,293 ---- } BOOL ok; ! Py_BEGIN_ALLOW_THREADS ok = ConnectNamedPipe(hNamedPipe, pOverlapped); ! Py_END_ALLOW_THREADS ! DWORD rc = ok ? 0 : GetLastError(); // These error conditions are documented as "acceptable" - ie, // the function has still worked. ! if (!ok && rc != ERROR_IO_PENDING && rc != ERROR_PIPE_CONNECTED) return PyWin_SetAPIError("ConnectNamedPipe"); return PyInt_FromLong(rc); |
From: Mark H. <mha...@us...> - 2006-07-16 11:02:25
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18175/test Modified Files: test_win32pipe.py Log Message: Fix the return value from win32pipe.ConnectNamedPipe() when the function succeeds, as discussed on python-win32. Index: test_win32pipe.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32pipe.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_win32pipe.py 2 Jul 2003 04:01:28 -0000 1.1 --- test_win32pipe.py 16 Jul 2006 11:02:23 -0000 1.2 *************** *** 35,38 **** --- 35,39 ---- hr = win32pipe.ConnectNamedPipe(pipeHandle) + self.failUnlessEqual(0, hr) win32file.WriteFile(pipeHandle, "bar\0foo") hr, got = win32file.ReadFile(pipeHandle, 100) |
From: Mark H. <mha...@us...> - 2006-07-16 09:39:00
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21196 Modified Files: win32pdhutil.py Log Message: Ensure all 'constant' counter names are localized. Index: win32pdhutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32pdhutil.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** win32pdhutil.py 16 Jul 2006 09:33:14 -0000 1.11 --- win32pdhutil.py 16 Jul 2006 09:38:57 -0000 1.12 *************** *** 99,103 **** def ShowAllProcesses(): ! object = "Process" items, instances = win32pdh.EnumObjectItems(None,None,object, win32pdh.PERF_DETAIL_WIZARD) --- 99,103 ---- def ShowAllProcesses(): ! object = find_pdh_counter_localized_name("Process") items, instances = win32pdh.EnumObjectItems(None,None,object, win32pdh.PERF_DETAIL_WIZARD) *************** *** 111,115 **** # Bit of a hack to get useful info. ! items = ["ID Process"] + items[:5] print "Process Name", string.join(items,",") for instance, max_instances in instance_dict.items(): --- 111,115 ---- # Bit of a hack to get useful info. ! items = [find_pdh_counter_localized_name("ID Process")] + items[:5] print "Process Name", string.join(items,",") for instance, max_instances in instance_dict.items(): *************** *** 151,156 **** ShowAllProcesses() # Show how to get a couple of attributes by name. ! print "Virtual Bytes = ", FindPerformanceAttributesByName("python", counter="Virtual Bytes") ! print "Available Bytes = ", GetPerformanceAttributes("Memory", "Available Bytes") # And a browser. print "Browsing for counters..." --- 151,160 ---- ShowAllProcesses() # Show how to get a couple of attributes by name. ! counter = find_pdh_counter_localized_name("Virtual Bytes") ! print "Virtual Bytes = ", FindPerformanceAttributesByName("python", ! counter=counter) ! print "Available Bytes = ", GetPerformanceAttributes( ! find_pdh_counter_localized_name("Memory"), ! find_pdh_counter_localized_name("Available Bytes")) # And a browser. print "Browsing for counters..." |
From: Mark H. <mha...@us...> - 2006-07-16 09:33:23
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19165 Modified Files: win32pdhutil.py Log Message: reindent to 4 spaces and wrap some long lines. Index: win32pdhutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32pdhutil.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** win32pdhutil.py 2 Dec 2005 07:52:23 -0000 1.10 --- win32pdhutil.py 16 Jul 2006 09:33:14 -0000 1.11 *************** *** 8,19 **** >>> win32pdhutil.FindPerformanceAttributesByName("python", counter="Virtual Bytes") [22278144] ! First example returns data which is not associated with any specific instance. ! ! The second example reads data for a specific instance - hence the list return - it would return one result for each instance of Python running. ! In general, it can be tricky finding exactly the "name" of the data you wish to query. ! Although you can use <om win32pdh.EnumObjectItems>(None,None,(eg)"Memory", -1) to do this, the easiest way is often to simply use PerfMon to find out the names. """ --- 8,19 ---- >>> win32pdhutil.FindPerformanceAttributesByName("python", counter="Virtual Bytes") [22278144] ! First example returns data which is not associated with any specific instance. ! ! The second example reads data for a specific instance - hence the list return - it would return one result for each instance of Python running. ! In general, it can be tricky finding exactly the "name" of the data you wish to query. ! Although you can use <om win32pdh.EnumObjectItems>(None,None,(eg)"Memory", -1) to do this, the easiest way is often to simply use PerfMon to find out the names. """ *************** *** 29,145 **** def find_pdh_counter_localized_name(english_name, machine_name = None): ! if not counter_english_map: ! import win32api, win32con ! counter_reg_value = win32api.RegQueryValueEx(win32con.HKEY_PERFORMANCE_DATA, "Counter 009") ! counter_list = counter_reg_value[0] ! for i in range(0, len(counter_list) - 1, 2): ! try: ! counter_id = int(counter_list[i]) ! except ValueError: ! continue ! counter_english_map[counter_list[i+1].lower()] = counter_id ! return win32pdh.LookupPerfNameByIndex(machine_name, counter_english_map[english_name.lower()]) ! def GetPerformanceAttributes(object, counter, instance = None, inum=-1, format = win32pdh.PDH_FMT_LONG, machine=None): ! # NOTE: Many counters require 2 samples to give accurate results, ! # including "% Processor Time" (as by definition, at any instant, a ! # thread's CPU usage is either 0 or 100). To read counters like this, ! # you should copy this function, but keep the counter open, and call ! # CollectQueryData() each time you need to know. ! # See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262938 ! # and http://msdn.microsoft.com/library/en-us/dnperfmo/html/perfmonpt2.asp ! # My older explanation for this was that the "AddCounter" process forced ! # the CPU to 100%, but the above makes more sense :) ! path = win32pdh.MakeCounterPath( (machine,object,instance, None, inum,counter) ) ! hq = win32pdh.OpenQuery() ! try: ! hc = win32pdh.AddCounter(hq, path) ! try: ! win32pdh.CollectQueryData(hq) ! type, val = win32pdh.GetFormattedCounterValue(hc, format) ! return val ! finally: ! win32pdh.RemoveCounter(hc) ! finally: ! win32pdh.CloseQuery(hq) ! def FindPerformanceAttributesByName(instanceName, object = None, counter = None, format = win32pdh.PDH_FMT_LONG, machine = None, bRefresh=0): ! """Find peformance attributes by (case insensitive) instance name. ! ! Given a process name, return a list with the requested attributes. ! Most useful for returning a tuple of PIDs given a process name. ! """ ! if object is None: object = find_pdh_counter_localized_name("Process", machine) ! if counter is None: counter = find_pdh_counter_localized_name("ID Process", machine) ! if bRefresh: # PDH docs say this is how you do a refresh. ! win32pdh.EnumObjects(None, machine, 0, 1) ! instanceName = string.lower(instanceName) ! items, instances = win32pdh.EnumObjectItems(None,None,object, -1) ! # Track multiple instances. ! instance_dict = {} ! for instance in instances: ! try: ! instance_dict[instance] = instance_dict[instance] + 1 ! except KeyError: ! instance_dict[instance] = 0 ! ! ret = [] ! for instance, max_instances in instance_dict.items(): ! for inum in xrange(max_instances+1): ! if string.lower(instance) == instanceName: ! ret.append(GetPerformanceAttributes(object, counter, instance, inum, format, machine)) ! return ret def ShowAllProcesses(): ! object = "Process" ! items, instances = win32pdh.EnumObjectItems(None,None,object, win32pdh.PERF_DETAIL_WIZARD) ! # Need to track multiple instances of the same name. ! instance_dict = {} ! for instance in instances: ! try: ! instance_dict[instance] = instance_dict[instance] + 1 ! except KeyError: ! instance_dict[instance] = 0 ! ! # Bit of a hack to get useful info. ! items = ["ID Process"] + items[:5] ! print "Process Name", string.join(items,",") ! for instance, max_instances in instance_dict.items(): ! for inum in xrange(max_instances+1): ! hq = win32pdh.OpenQuery() ! hcs = [] ! for item in items: ! path = win32pdh.MakeCounterPath( (None,object,instance, None, inum, item) ) ! hcs.append(win32pdh.AddCounter(hq, path)) ! win32pdh.CollectQueryData(hq) ! # as per http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262938, some "%" based ! # counters need two collections ! time.sleep(0.01) ! win32pdh.CollectQueryData(hq) ! print "%-15s\t" % (instance[:15]), ! for hc in hcs: ! type, val = win32pdh.GetFormattedCounterValue(hc, win32pdh.PDH_FMT_LONG) ! print "%5d" % (val), ! win32pdh.RemoveCounter(hc) ! print ! win32pdh.CloseQuery(hq) def BrowseCallBackDemo(counter): ! machine, object, instance, parentInstance, index, counterName = \ ! win32pdh.ParseCounterPath(counter) ! result = GetPerformanceAttributes(object, counterName, instance, index, win32pdh.PDH_FMT_DOUBLE, machine) ! print "Value of '%s' is" % counter, result ! print "Added '%s' on object '%s' (machine %s), instance %s(%d)-parent of %s" % (counterName, object, machine, instance, index, parentInstance) ! def browse( callback = BrowseCallBackDemo, title="Python Browser", level=win32pdh.PERF_DETAIL_WIZARD): ! win32pdh.BrowseCounters(None,0, callback, level, title) if __name__=='__main__': ! ShowAllProcesses() ! # Show how to get a couple of attributes by name. ! print "Virtual Bytes = ", FindPerformanceAttributesByName("python", counter="Virtual Bytes") ! print "Available Bytes = ", GetPerformanceAttributes("Memory", "Available Bytes") ! # And a browser. ! print "Browsing for counters..." ! browse() --- 29,157 ---- def find_pdh_counter_localized_name(english_name, machine_name = None): ! if not counter_english_map: ! import win32api, win32con ! counter_reg_value = win32api.RegQueryValueEx(win32con.HKEY_PERFORMANCE_DATA, ! "Counter 009") ! counter_list = counter_reg_value[0] ! for i in range(0, len(counter_list) - 1, 2): ! try: ! counter_id = int(counter_list[i]) ! except ValueError: ! continue ! counter_english_map[counter_list[i+1].lower()] = counter_id ! return win32pdh.LookupPerfNameByIndex(machine_name, counter_english_map[english_name.lower()]) ! def GetPerformanceAttributes(object, counter, instance = None, inum=-1, ! format = win32pdh.PDH_FMT_LONG, machine=None): ! # NOTE: Many counters require 2 samples to give accurate results, ! # including "% Processor Time" (as by definition, at any instant, a ! # thread's CPU usage is either 0 or 100). To read counters like this, ! # you should copy this function, but keep the counter open, and call ! # CollectQueryData() each time you need to know. ! # See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262938 ! # and http://msdn.microsoft.com/library/en-us/dnperfmo/html/perfmonpt2.asp ! # My older explanation for this was that the "AddCounter" process forced ! # the CPU to 100%, but the above makes more sense :) ! path = win32pdh.MakeCounterPath( (machine,object,instance, None, inum,counter) ) ! hq = win32pdh.OpenQuery() ! try: ! hc = win32pdh.AddCounter(hq, path) ! try: ! win32pdh.CollectQueryData(hq) ! type, val = win32pdh.GetFormattedCounterValue(hc, format) ! return val ! finally: ! win32pdh.RemoveCounter(hc) ! finally: ! win32pdh.CloseQuery(hq) ! def FindPerformanceAttributesByName(instanceName, object = None, ! counter = None, ! format = win32pdh.PDH_FMT_LONG, ! machine = None, bRefresh=0): ! """Find peformance attributes by (case insensitive) instance name. ! ! Given a process name, return a list with the requested attributes. ! Most useful for returning a tuple of PIDs given a process name. ! """ ! if object is None: object = find_pdh_counter_localized_name("Process", machine) ! if counter is None: counter = find_pdh_counter_localized_name("ID Process", machine) ! if bRefresh: # PDH docs say this is how you do a refresh. ! win32pdh.EnumObjects(None, machine, 0, 1) ! instanceName = string.lower(instanceName) ! items, instances = win32pdh.EnumObjectItems(None,None,object, -1) ! # Track multiple instances. ! instance_dict = {} ! for instance in instances: ! try: ! instance_dict[instance] = instance_dict[instance] + 1 ! except KeyError: ! instance_dict[instance] = 0 ! ! ret = [] ! for instance, max_instances in instance_dict.items(): ! for inum in xrange(max_instances+1): ! if string.lower(instance) == instanceName: ! ret.append(GetPerformanceAttributes(object, counter, ! instance, inum, format, ! machine)) ! return ret def ShowAllProcesses(): ! object = "Process" ! items, instances = win32pdh.EnumObjectItems(None,None,object, ! win32pdh.PERF_DETAIL_WIZARD) ! # Need to track multiple instances of the same name. ! instance_dict = {} ! for instance in instances: ! try: ! instance_dict[instance] = instance_dict[instance] + 1 ! except KeyError: ! instance_dict[instance] = 0 ! ! # Bit of a hack to get useful info. ! items = ["ID Process"] + items[:5] ! print "Process Name", string.join(items,",") ! for instance, max_instances in instance_dict.items(): ! for inum in xrange(max_instances+1): ! hq = win32pdh.OpenQuery() ! hcs = [] ! for item in items: ! path = win32pdh.MakeCounterPath( (None,object,instance, ! None, inum, item) ) ! hcs.append(win32pdh.AddCounter(hq, path)) ! win32pdh.CollectQueryData(hq) ! # as per http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262938, some "%" based ! # counters need two collections ! time.sleep(0.01) ! win32pdh.CollectQueryData(hq) ! print "%-15s\t" % (instance[:15]), ! for hc in hcs: ! type, val = win32pdh.GetFormattedCounterValue(hc, win32pdh.PDH_FMT_LONG) ! print "%5d" % (val), ! win32pdh.RemoveCounter(hc) ! print ! win32pdh.CloseQuery(hq) def BrowseCallBackDemo(counter): ! machine, object, instance, parentInstance, index, counterName = \ ! win32pdh.ParseCounterPath(counter) ! result = GetPerformanceAttributes(object, counterName, instance, index, ! win32pdh.PDH_FMT_DOUBLE, machine) ! print "Value of '%s' is" % counter, result ! print "Added '%s' on object '%s' (machine %s), instance %s(%d)-parent of %s" \ ! % (counterName, object, machine, instance, index, parentInstance) ! def browse(callback = BrowseCallBackDemo, title="Python Browser", ! level=win32pdh.PERF_DETAIL_WIZARD): ! win32pdh.BrowseCounters(None,0, callback, level, title) if __name__=='__main__': ! ShowAllProcesses() ! # Show how to get a couple of attributes by name. ! print "Virtual Bytes = ", FindPerformanceAttributesByName("python", counter="Virtual Bytes") ! print "Available Bytes = ", GetPerformanceAttributes("Memory", "Available Bytes") ! # And a browser. ! print "Browsing for counters..." ! browse() |
From: Mark H. <mha...@us...> - 2006-07-12 12:39:31
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2327 Modified Files: makepy.py Log Message: Fix [ 1464113 ] (makepy.py) Usage changes and directory creation Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** makepy.py 17 Mar 2006 01:56:02 -0000 1.21 --- makepy.py 12 Jul 2006 12:39:28 -0000 1.22 *************** *** 22,46 **** """ usageHelp = """ \ Usage: ! makepy.py [-h] [-x0|1] [-u] [-o filename] [-d] [typelib, ...] - typelib -- A TLB, DLL, OCX, Description, or possibly something else. -h -- Do not generate hidden methods. - -u -- Python 1.5 and earlier: Do not convert all Unicode objects to strings. - Python 1.6 and later: Do convert all Unicode objects to strings. - -o outputFile -- Generate to named file - dont generate to standard directory. - -i [typelib] -- Show info for specified typelib, or select the typelib if not specified. - -v -- Verbose output - -q -- Quiet output - -d -- Generate the base code now and classes code on demand Examples: ! makepy.py ! Present a list of type libraries. ! makepy.py "Microsoft Excel 8.0 Object Library" ! Generate support for the typelibrary with the specified description ! (in this case, MS Excel object model) """ --- 22,67 ---- """ usageHelp = """ \ + Usage: ! makepy.py [-i] [-v|q] [-h] [-u] [-o output_file] [-d] [typelib, ...] ! ! -i -- Show information for the specified typelib. ! ! -v -- Verbose output. ! ! -q -- Quiet output. -h -- Do not generate hidden methods. + -u -- Python 1.5 and earlier: Do NOT convert all Unicode objects to + strings. + + Python 1.6 and later: Convert all Unicode objects to strings. + + -o -- Create output in a specified output file. If the path leading + to the file does not exist, any missing directories will be + created. + NOTE: -o cannot be used with -d. This will generate an error. + + -d -- Generate the base code now and the class code on demand. + Recommended for large type libraries. + + typelib -- A TLB, DLL, OCX or anything containing COM type information. + If a typelib is not specified, a window containing a textbox + will open from which you can select a registered type + library. + Examples: ! ! makepy.py -d ! ! Presents a list of registered type libraries from which you can make ! a selection. ! makepy.py -d "Microsoft Excel 8.0 Object Library" ! ! Generate support for the type library with the specified description ! (in this case, the MS Excel object model). """ *************** *** 332,335 **** --- 353,359 ---- if outputName is not None: + path = os.path.dirname(outputName) + if path is not '' and not os.path.exists(path): + os.makedirs(path) f = open(outputName, "w") else: |
From: Mark H. <mha...@us...> - 2006-07-12 12:29:20
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30480 Modified Files: timermodule.cpp Log Message: Most of the patch in patch 1495095, to prevent errors should the timer remove itself. Index: timermodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/timermodule.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** timermodule.cpp 26 Jul 2003 14:05:50 -0000 1.3 --- timermodule.cpp 12 Jul 2006 12:29:17 -0000 1.4 *************** *** 30,33 **** --- 30,36 ---- // call the user's function if (callback_function) { + // create a 'death grip' on the callback function, just incase + // the callback itself removes the function from the map. + Py_INCREF(callback_function); PyObject * callback_args = Py_BuildValue ("(il)", (int) event, (long) time); PyObject * result = \ *************** *** 41,44 **** --- 44,48 ---- // everything's ok, return + Py_DECREF(callback_function); Py_XDECREF(callback_args); Py_XDECREF(result); *************** *** 46,51 **** return; } ! // invalid key or callback: remove the key and kill the timer. ! PyDict_DelItem(timer_id_callback_map, py_event); Py_DECREF (py_event); ::KillTimer (NULL, event); --- 50,55 ---- return; } ! // invalid key or callback: kill the timer (note there is no ! // key to remove - we have already determined it is not there!) Py_DECREF (py_event); ::KillTimer (NULL, event); |
From: Mark H. <mha...@us...> - 2006-07-12 12:16:08
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24878/win32comext/shell/src Modified Files: shell.cpp Log Message: Do some basic validity checks when converting a buffer to a PIDL. Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** shell.cpp 1 Jun 2006 10:23:05 -0000 1.45 --- shell.cpp 12 Jul 2006 12:15:29 -0000 1.46 *************** *** 125,129 **** while (pidl->mkid.cb) { // cb includes sizeof(cb) itself - so string len is cb-sizeof(cb) ! PyObject *sub = PyString_FromStringAndSize((char *)pidl->mkid.abID, pidl->mkid.cb-sizeof(pidl->mkid.cb)); if (sub) { PyList_Append(ret, sub); --- 125,147 ---- while (pidl->mkid.cb) { // cb includes sizeof(cb) itself - so string len is cb-sizeof(cb) ! if (pidl->mkid.cb <= sizeof(pidl->mkid.cb)) { ! Py_DECREF(ret); ! ret = NULL; ! PyErr_SetString(PyExc_ValueError, "This string has an invalid sub-item (too short)"); ! break; ! } ! // The length may be too large to read (and causing an ! // exception deep inside Python doesn't always leave ! // things in a good state! Its also inconvenient to ! // always pass the size of the object - so explicitly ! // check we can read the memory. ! UINT cbdata = pidl->mkid.cb-sizeof(pidl->mkid.cb); ! if (IsBadReadPtr(pidl->mkid.abID, cbdata)) { ! Py_DECREF(ret); ! ret = NULL; ! PyErr_SetString(PyExc_ValueError, "This string has an invalid sub-item (too long)"); ! break; ! } ! PyObject *sub = PyString_FromStringAndSize((char *)pidl->mkid.abID, cbdata); if (sub) { PyList_Append(ret, sub); |
From: Mark H. <mha...@us...> - 2006-07-12 12:16:02
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24878/win32com/test Modified Files: testShell.py Log Message: Do some basic validity checks when converting a buffer to a PIDL. Index: testShell.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testShell.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testShell.py 10 Jan 2006 06:32:58 -0000 1.8 --- testShell.py 12 Jul 2006 12:15:30 -0000 1.9 *************** *** 81,84 **** --- 81,92 ---- self._rtCIDA(["\0"], [ ["\0"], ["\1"], ["\2"] ]) + def testBadShortPIDL(self): + # A too-short child element: cb pidl cb + pidl = "\01\00" "\1" + self.assertRaises(ValueError, shell.StringAsPIDL, pidl) + + # ack - tried to test too long PIDLs, but a len of 0xFFFF may not + # always fail. + class FILEGROUPDESCRIPTORTester(win32com.test.util.TestCase): def _testRT(self, fd): |