pywin32-checkins Mailing List for Python for Windows Extensions (Page 111)
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-06-21 08:05:34
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3206 Modified Files: win32dlg.cpp Log Message: Remove pointless (and harmful when not run under pythonwin.exe) check. Index: win32dlg.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32dlg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** win32dlg.cpp 2 Jun 2001 14:51:41 -0000 1.7 --- win32dlg.cpp 21 Jun 2005 08:05:26 -0000 1.8 *************** *** 140,146 **** if (!pApp) return NULL; - if (pApp->GetMainFrame()) - RETURN_ERR(errmsgAlreadyInit); - if (!PyArg_ParseTuple(args,"O:InitDlgInstance",&obDlg)) return NULL; --- 140,143 ---- |
From: Mark H. <mha...@us...> - 2005-06-21 08:04:51
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2714/pywin/framework Modified Files: dlgappcore.py Log Message: DlgApp framework requires a PreDoModal method - provide a default. Index: dlgappcore.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/dlgappcore.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dlgappcore.py 7 Feb 2004 02:06:56 -0000 1.2 --- dlgappcore.py 21 Jun 2005 08:04:42 -0000 1.3 *************** *** 41,44 **** --- 41,46 ---- return win32ui.GetApp().LoadIcon(self.iconId) + def PreDoModal(self): + pass |
From: Mark H. <mha...@us...> - 2005-06-17 07:31:03
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13201 Modified Files: win32serviceutil.py Log Message: Avoid opening a service handle we don't need and never close. Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** win32serviceutil.py 30 May 2005 23:57:13 -0000 1.19 --- win32serviceutil.py 17 Jun 2005 07:30:54 -0000 1.20 *************** *** 341,345 **** """Waits for the service to return the specified status. You should have already requested the service to enter that state""" - hscm = win32service.OpenSCManager(machine,None,win32service.SC_MANAGER_ALL_ACCESS) for i in range(waitSecs*4): now_status = QueryServiceStatus(serviceName)[1] --- 341,344 ---- |
From: Mark H. <mha...@us...> - 2005-06-16 08:59:24
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17579 Modified Files: find.py Log Message: Patch from Matthias Haldimann: if there is a selection, use that as the default search string. Index: find.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/scintilla/find.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** find.py 20 Jan 2004 01:56:36 -0000 1.9 --- find.py 16 Jun 2005 08:59:11 -0000 1.10 *************** *** 172,175 **** --- 172,183 ---- self.editFindText.SetWindowText(defaultSearch.findText) + control = _GetControl() + # If we have a selection, default to that. + sel = control.GetSelText() + if (len(sel) != 0): + self.editFindText.SetWindowText(sel) + if (defaultSearch.remember): + defaultSearch.findText = sel + self.editFindText.SetSel(0, -2) self.editFindText.SetFocus() |
From: Mark H. <mha...@us...> - 2005-06-08 05:19:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2167/server Modified Files: policy.py Log Message: * Allow _com_interfaces_ to be IIDs *and* interface names from a typelib. Previously you could not mix and match * Allow IID-like strings to be specified in _com_interfaces_ * Raise a value error when an invalid interface name is passed for registration * Tests Index: policy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/server/policy.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** policy.py 13 Feb 2005 12:09:35 -0000 1.20 --- policy.py 8 Jun 2005 05:19:03 -0000 1.21 *************** *** 246,249 **** --- 246,251 ---- if i[0] != "{": i = pythoncom.InterfaceNames[i] + else: + i = pythoncom.MakeIID(i) self._com_interfaces_.append(i) else: *************** *** 464,468 **** tlb_lcid = getattr(ob, '_typelib_lcid_', 0) from win32com import universal ! interfaces = getattr(ob, '_com_interfaces_', None) universal_data = universal.RegisterInterfaces(tlb_guid, tlb_lcid, tlb_major, tlb_minor, interfaces) --- 466,474 ---- tlb_lcid = getattr(ob, '_typelib_lcid_', 0) from win32com import universal ! # XXX - what if the user wants to implement interfaces from multiple ! # typelibs? ! # Filter out all 'normal' IIDs (ie, IID objects and strings starting with { ! interfaces = [i for i in getattr(ob, '_com_interfaces_', []) ! if type(i) != pythoncom.PyIIDType and not i.startswith("{")] universal_data = universal.RegisterInterfaces(tlb_guid, tlb_lcid, tlb_major, tlb_minor, interfaces) *************** *** 537,541 **** try: type_info, type_comp = typecomp.BindType(iname) ! return [type_info] except pythoncom.com_error: pass --- 543,548 ---- try: type_info, type_comp = typecomp.BindType(iname) ! if type_info is not None: ! return [type_info] except pythoncom.com_error: pass |
From: Mark H. <mha...@us...> - 2005-06-08 05:19:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2167 Modified Files: universal.py Log Message: * Allow _com_interfaces_ to be IIDs *and* interface names from a typelib. Previously you could not mix and match * Allow IID-like strings to be specified in _com_interfaces_ * Raise a value error when an invalid interface name is passed for registration * Tests Index: universal.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/universal.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** universal.py 2 Nov 2003 10:09:05 -0000 1.12 --- universal.py 8 Jun 2005 05:19:03 -0000 1.13 *************** *** 32,35 **** --- 32,39 ---- for name in interface_names: type_info, type_comp = typecomp_lib.BindType(name, ) + # Not sure why we don't get an exception here - BindType's C + # impl looks correct.. + if type_info is None: + raise ValueError, "The interface '%s' can not be located" % (name,) # If we got back a Dispatch interface, convert to the real interface. attr = type_info.GetTypeAttr() |
From: Mark H. <mha...@us...> - 2005-06-08 05:19:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2167/test Modified Files: testPyComTest.py Log Message: * Allow _com_interfaces_ to be IIDs *and* interface names from a typelib. Previously you could not mix and match * Allow IID-like strings to be specified in _com_interfaces_ * Raise a value error when an invalid interface name is passed for registration * Tests Index: testPyComTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testPyComTest.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** testPyComTest.py 31 May 2005 12:36:03 -0000 1.20 --- testPyComTest.py 8 Jun 2005 05:19:04 -0000 1.21 *************** *** 15,19 **** # This test uses a Python implemented COM server - ensure correctly registered. ! RegisterPythonServer(os.path.join(win32com.__path__[0], "servers", "test_pycomtest.py")) from win32com.client import gencache --- 15,19 ---- # This test uses a Python implemented COM server - ensure correctly registered. ! RegisterPythonServer(os.path.join(os.path.dirname(__file__), '..', "servers", "test_pycomtest.py")) from win32com.client import gencache *************** *** 344,347 **** --- 344,365 ---- pass + def TestVTableMI(): + clsctx = pythoncom.CLSCTX_SERVER + ob = pythoncom.CoCreateInstance("Python.Test.PyCOMTestMI", None, clsctx, pythoncom.IID_IUnknown) + # This inherits from IStream. + ob.QueryInterface(pythoncom.IID_IStream) + # This implements IStorage, specifying the IID as a string + ob.QueryInterface(pythoncom.IID_IStorage) + # IDispatch should always work + ob.QueryInterface(pythoncom.IID_IDispatch) + + iid = pythoncom.InterfaceNames["IPyCOMTest"] + try: + ob.QueryInterface(iid) + except TypeError: + # Python can't actually _use_ this interface yet, so this is + # "expected". Any COM error is not. + pass + def TestQueryInterface(long_lived_server = 0, iterations=5): tester = win32com.client.Dispatch("PyCOMTest.PyCOMTest") *************** *** 372,375 **** --- 390,396 ---- for i in range(3): TestVTable2() + def testVTableMI(self): + for i in range(3): + TestVTableMI() def testMultiQueryInterface(self): TestQueryInterface(0,6) |
From: Mark H. <mha...@us...> - 2005-06-08 05:19:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2167/servers Modified Files: test_pycomtest.py Log Message: * Allow _com_interfaces_ to be IIDs *and* interface names from a typelib. Previously you could not mix and match * Allow IID-like strings to be specified in _com_interfaces_ * Raise a value error when an invalid interface name is passed for registration * Tests Index: test_pycomtest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/test_pycomtest.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_pycomtest.py 31 May 2005 12:36:02 -0000 1.8 --- test_pycomtest.py 8 Jun 2005 05:19:04 -0000 1.9 *************** *** 127,131 **** --- 127,143 ---- self.intval = val + class PyCOMTestMI(PyCOMTest): + _typelib_guid_ = "{6BCDCB60-5605-11D0-AE5F-CADD4C000000}" + _typelib_version = 1,0 + # Interfaces with a interface name, a real IID, and an IID as a string + _com_interfaces_ = ['IPyCOMTest', + pythoncom.IID_IStream, + str(pythoncom.IID_IStorage), + ] + _reg_clsid_ = "{F506E9A1-FB46-4238-A597-FA4EB69787CA}" + _reg_progid_ = "Python.Test.PyCOMTestMI" + if __name__ == '__main__': import win32com.server.register win32com.server.register.UseCommandLine(PyCOMTest) + win32com.server.register.UseCommandLine(PyCOMTestMI) |
From: Mark H. <mha...@us...> - 2005-06-08 01:34:33
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20006/Lib Modified Files: win32netcon.py Log Message: Add NetGetJoinInformation and related constants. Index: win32netcon.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32netcon.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** win32netcon.py 12 Jan 2005 02:21:48 -0000 1.4 --- win32netcon.py 8 Jun 2005 01:34:24 -0000 1.5 *************** *** 644,645 **** --- 644,652 ---- NetSetupNonExistentDomain = 4 NetSetupDnsMachine = 5 + + ## NETSETUP_JOIN_STATUS, use with NetGetJoinInformation + NetSetupUnknownStatus = 0 + NetSetupUnjoined = 1 + NetSetupWorkgroupName = 2 + NetSetupDomainName = 3 + |
From: Mark H. <mha...@us...> - 2005-06-08 01:34:33
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20006/src/win32net Modified Files: win32net.h win32netmodule.cpp Log Message: Add NetGetJoinInformation and related constants. Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** win32netmodule.cpp 13 Jan 2005 00:10:26 -0000 1.18 --- win32netmodule.cpp 8 Jun 2005 01:34:25 -0000 1.19 *************** *** 39,42 **** --- 39,44 ---- #include "assert.h" + NetGetJoinInformationfunc pfnNetGetJoinInformation=NULL; + /*****************************************************************************/ /* error helpers */ *************** *** 940,943 **** --- 942,975 ---- } + // @pymethod <o PyUnicode>, int|win32net|NetGetJoinInformation|Retrieves join status information for the specified computer. + static PyObject *PyNetGetJoinInformation(PyObject *self, PyObject *args) + { + PyObject *obServer = Py_None; + WCHAR *server = NULL;; + WCHAR *result = NULL; + PyObject *ret = NULL; + NET_API_STATUS err; + NETSETUP_JOIN_STATUS status; + if (!PyArg_ParseTuple(args, "|O:NetGetJoinInformation", &obServer)) + return NULL; + if (pfnNetGetJoinInformation==NULL){ + PyErr_SetString(PyExc_NotImplementedError,"NetGetJoinInformation does not exist on this platform"); + goto done; + } + if (!PyWinObject_AsWCHAR(obServer, &server, TRUE)) + goto done; + Py_BEGIN_ALLOW_THREADS + err = (*pfnNetGetJoinInformation)(server, &result, &status); + Py_END_ALLOW_THREADS + if (err) { + ReturnNetError("NetGetJoinInformation", err); + goto done; + } + ret = Py_BuildValue("Nl", PyWinObject_FromWCHAR(result), status); + done: + PyWinObject_FreeWCHAR(server); + NetApiBufferFree(result); + return ret; + } /************************************************************************************************************* ** *************** *** 1014,1017 **** --- 1046,1050 ---- // @module win32net|A module encapsulating the Windows Network API. static struct PyMethodDef win32net_functions[] = { + {"NetGetJoinInformation", PyNetGetJoinInformation, 1}, // @pymeth NetGetJoinInformation|Retrieves join status information for the specified computer. {"NetGroupGetInfo", PyNetGroupGetInfo, 1}, // @pymeth NetGroupGetInfo|Retrieves information about a particular group on a server. {"NetGroupGetUsers", PyNetGroupGetUsers, 1}, // @pymeth NetGroupGetUsers|Enumerates the users in a group. *************** *** 1120,1124 **** if (hmodule==NULL) hmodule=LoadLibrary(_T("netapi32")); ! if (hmodule!=NULL) pfnNetValidateName=(NetValidateNamefunc)GetProcAddress(hmodule,"NetValidateName"); } --- 1153,1159 ---- if (hmodule==NULL) hmodule=LoadLibrary(_T("netapi32")); ! if (hmodule!=NULL) { pfnNetValidateName=(NetValidateNamefunc)GetProcAddress(hmodule,"NetValidateName"); + pfnNetGetJoinInformation=(NetGetJoinInformationfunc)GetProcAddress(hmodule,"NetGetJoinInformation"); + } } Index: win32net.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32net.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32net.h 12 Jan 2005 07:38:10 -0000 1.3 --- win32net.h 8 Jun 2005 01:34:24 -0000 1.4 *************** *** 63,64 **** --- 63,67 ---- typedef NET_API_STATUS (NET_API_FUNCTION *NetValidateNamefunc)(LPCWSTR, LPCWSTR, LPCWSTR, LPCWSTR, NETSETUP_NAME_TYPE); extern NetValidateNamefunc pfnNetValidateName; + + typedef NET_API_STATUS (NET_API_FUNCTION *NetGetJoinInformationfunc)(LPCWSTR, LPWSTR *, PNETSETUP_JOIN_STATUS); + extern NetGetJoinInformationfunc pfnNetGetJoinInformation; |
From: Mark H. <mha...@us...> - 2005-06-02 06:28:56
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16631 Modified Files: PyACL.cpp Log Message: Autoduck now shows basic info about the TRUSTEE dict Index: PyACL.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyACL.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyACL.cpp 31 May 2005 12:41:46 -0000 1.13 --- PyACL.cpp 2 Jun 2005 06:28:47 -0000 1.14 *************** *** 207,210 **** --- 207,216 ---- } + // @object PyTRUSTEE|A dictionary representing a TRUSTEE structure. + // @prop int|TrusteeForm| + // @prop int|TrusteeType| + // @prop object|Identifier|Depends on the value of TrusteeForm (string or sid) + // @prop object|MultipleTrustee|default is None + // @prop object|MultipleTrusteeOperation|default is None BOOL PyWinObject_AsTRUSTEE(PyObject *obtrustee, TRUSTEE_W *ptrustee) { *************** *** 309,313 **** { static char *expl_items[]={"AccessPermissions","AccessMode","Inheritance","Trustee",0}; ! static char* err_msg="EXPLICIT_ACCESS must be a dictionary containing {AccessPermissions:int,AccessMode:int,Inheritance:int,Trustee:dict}"; PyObject *expl_dict=NULL, *obtrustee=NULL; BOOL bsuccess=FALSE; --- 315,319 ---- { static char *expl_items[]={"AccessPermissions","AccessMode","Inheritance","Trustee",0}; ! static char* err_msg="EXPLICIT_ACCESS must be a dictionary containing {AccessPermissions:int,AccessMode:int,Inheritance:int,Trustee:<o PyTRUSTEE>}"; PyObject *expl_dict=NULL, *obtrustee=NULL; BOOL bsuccess=FALSE; *************** *** 1036,1040 **** PyObject *ret=NULL, *obTrustee=NULL; TRUSTEE_W trustee; ! // @pyparm <o Dict>|trustee||Dictionary representing a TRUSTEE structure if (!PyArg_ParseTuple(args, "O:GetEffectiveRightsFromAcl", &obTrustee)) return NULL; --- 1042,1046 ---- PyObject *ret=NULL, *obTrustee=NULL; TRUSTEE_W trustee; ! // @pyparm <o PyTRUSTEE>|trustee||Dictionary representing a TRUSTEE structure if (!PyArg_ParseTuple(args, "O:GetEffectiveRightsFromAcl", &obTrustee)) return NULL; *************** *** 1061,1065 **** PyObject *ret=NULL, *obTrustee=NULL; TRUSTEE_W trustee; ! // @pyparm <o Dict>|trustee||Dictionary representing a TRUSTEE structure if (!PyArg_ParseTuple(args, "O:GetAuditedPermissionsFromAcl", &obTrustee)) return NULL; --- 1067,1071 ---- PyObject *ret=NULL, *obTrustee=NULL; TRUSTEE_W trustee; ! // @pyparm <o PyTRUSTEE>|trustee||Dictionary representing a TRUSTEE structure if (!PyArg_ParseTuple(args, "O:GetAuditedPermissionsFromAcl", &obTrustee)) return NULL; |
From: Mark H. <mha...@us...> - 2005-06-02 06:27:36
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16246 Modified Files: PyADSIUtil.cpp Log Message: Support ADSTYPE_NT_SECURITY_DESCRIPTOR type and write a warning when an unknown type is encountered (as we return None in that case, which kinda sucks) Index: PyADSIUtil.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyADSIUtil.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyADSIUtil.cpp 31 May 2005 12:49:49 -0000 1.4 --- PyADSIUtil.cpp 2 Jun 2005 06:27:24 -0000 1.5 *************** *** 133,139 **** --- 133,156 ---- } break; + case ADSTYPE_NT_SECURITY_DESCRIPTOR: + { + // Get a pointer to the security descriptor. + PSECURITY_DESCRIPTOR pSD = (PSECURITY_DESCRIPTOR)(v.SecurityDescriptor.lpValue); + DWORD SDSize = v.SecurityDescriptor.dwLength; + // eeek - we don't pass the length - pywintypes relies on + // GetSecurityDescriptorLength - make noise if this may bite us. + if (SDSize != GetSecurityDescriptorLength(pSD)) + PyErr_Warn(PyExc_RuntimeWarning, "Security-descriptor size mis-match"); + ob = PyWinObject_FromSECURITY_DESCRIPTOR(pSD); + break; + } default: + { + char msg[100]; + wsprintf(msg, "Unknown ADS type code 0x%x - None will be returned", v.dwType); + PyErr_Warn(PyExc_RuntimeWarning, msg); ob = Py_None; Py_INCREF(ob); + } } if (ob==NULL) *************** *** 524,528 **** {NULL} }; ! // @prop [<o PyADS_ATTR_INFO>, ...]|Values| --- 541,545 ---- {NULL} }; ! // @prop [<o PyADSVALUE>, ...]|Values| |
From: Mark H. <mha...@us...> - 2005-06-02 06:26:34
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16093 Modified Files: PyIDirectoryObject.i Log Message: Autodck. Index: PyIDirectoryObject.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyIDirectoryObject.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyIDirectoryObject.i 31 May 2005 12:49:52 -0000 1.3 --- PyIDirectoryObject.i 2 Jun 2005 06:26:25 -0000 1.4 *************** *** 35,39 **** %{ ! // @pyswig <o PyADS_OBJECT_INFO>|GetObjectAttributes|Gets one or more specified attributes of the directory service object, as defined in the <o PyADS_ATTR_INFO> structure. PyObject *PyIDirectoryObject::GetObjectAttributes(PyObject *self, PyObject *args) { --- 35,39 ---- %{ ! // @pyswig (<o PyADS_ATTR_INFO>, ...)|GetObjectAttributes|Gets one or more specified attributes of the directory service object, as defined in the <o PyADS_ATTR_INFO> structure. PyObject *PyIDirectoryObject::GetObjectAttributes(PyObject *self, PyObject *args) { |
From: Mark H. <mha...@us...> - 2005-06-02 00:03:55
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15608/src Modified Files: PyWinObjects.h win32file.i Log Message: Fix a bug regarding reference counting and OVERLAPPED objects, as reported on python-win32. Also borrowed the repro for the test suite. Index: PyWinObjects.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinObjects.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PyWinObjects.h 10 Sep 2004 03:40:21 -0000 1.8 --- PyWinObjects.h 2 Jun 2005 00:03:33 -0000 1.9 *************** *** 135,139 **** PyObject *obState; DWORD dwValue; ! sMyOverlapped() {obState=NULL;dwValue=0;} sMyOverlapped(const OVERLAPPED &o) : OVERLAPPED(o) {obState=NULL;dwValue=0;} }; --- 135,142 ---- PyObject *obState; DWORD dwValue; ! // set to TRUE when we bump the reference count to keep the object ! // alive while it is sitting in a completion port. ! BOOL isArtificialReference; ! sMyOverlapped() {obState=NULL;dwValue=0;isArtificialReference=0;} sMyOverlapped(const OVERLAPPED &o) : OVERLAPPED(o) {obState=NULL;dwValue=0;} }; Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** win32file.i 12 Apr 2005 02:56:44 -0000 1.46 --- win32file.i 2 Jun 2005 00:03:33 -0000 1.47 *************** *** 1234,1238 **** size_t off = offsetof(PyOVERLAPPED, m_overlapped); PyOVERLAPPED *po = (PyOVERLAPPED *)(((LPBYTE)p) - off); ! // consume reference added when it was posted. return po; } --- 1234,1250 ---- size_t off = offsetof(PyOVERLAPPED, m_overlapped); PyOVERLAPPED *po = (PyOVERLAPPED *)(((LPBYTE)p) - off); ! // Hope like hell it hasn't already died on us (PostQueuedCompletionStatus ! // makes it impossible it has died, but other functions do not as they ! // don't know if the OVERLAPPED will end up in a IOCP) ! if (po->ob_refcnt<=0) { ! PyErr_SetString(PyExc_RuntimeError, "This overlapped object has lost all its references so was destroyed"); ! return NULL; ! } ! // consume reference added when it was posted, if added. ! if (po->m_overlapped.isArtificialReference) ! po->m_overlapped.isArtificialReference = FALSE; ! else ! // Overlapped we didn't actually queue so no artificial refcount ! Py_INCREF(po); return po; } *************** *** 1251,1256 **** return FALSE; PyOVERLAPPED::sMyOverlapped *pMyOverlapped = (PyOVERLAPPED::sMyOverlapped *)po; ! // Add a fake reference so the object lives while in the queue. Py_INCREF(ob); *ppOverlapped = po->GetOverlapped(); return TRUE; --- 1263,1269 ---- return FALSE; PyOVERLAPPED::sMyOverlapped *pMyOverlapped = (PyOVERLAPPED::sMyOverlapped *)po; ! // Add a fake reference so the object lives while in the queue, and add the flag Py_INCREF(ob); + pMyOverlapped->isArtificialReference = TRUE; *ppOverlapped = po->GetOverlapped(); return TRUE; |
From: Mark H. <mha...@us...> - 2005-06-02 00:03:55
|
Update of /cvsroot/pywin32/pywin32/win32/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15608/test Modified Files: test_win32file.py Log Message: Fix a bug regarding reference counting and OVERLAPPED objects, as reported on python-win32. Also borrowed the repro for the test suite. Index: test_win32file.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/test/test_win32file.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_win32file.py 12 Apr 2005 02:56:45 -0000 1.6 --- test_win32file.py 2 Jun 2005 00:03:34 -0000 1.7 *************** *** 1,9 **** import unittest ! import win32api, win32file, win32con, pywintypes, winerror import sys import os import tempfile import sets ! import shutil class TestSimpleOps(unittest.TestCase): --- 1,10 ---- import unittest ! import win32api, win32file, win32pipe, win32con, pywintypes, winerror import sys import os import tempfile import sets ! import threading ! import time class TestSimpleOps(unittest.TestCase): *************** *** 177,180 **** --- 178,238 ---- self.failUnlessEqual(hr, winerror.ERROR_INVALID_HANDLE) + def _IOCPServerThread(self, handle, port, drop_overlapped_reference): + overlapped = pywintypes.OVERLAPPED() + win32pipe.ConnectNamedPipe(handle, overlapped) + if drop_overlapped_reference: + # Be naughty - the overlapped object is now dead, but + # GetQueuedCompletionStatus will still find it. Our check of + # reference counting should catch that error. + overlapped = None + self.failUnlessRaises(RuntimeError, + win32file.GetQueuedCompletionStatus, port, -1) + handle.Close() + return + + result = win32file.GetQueuedCompletionStatus(port, -1) + ol2 = result[-1] + self.failUnless(ol2 is overlapped) + data = win32file.ReadFile(handle, 512)[1] + win32file.WriteFile(handle, data) + + def testCompletionPortsNonQueued(self, test_overlapped_death = 0): + # In 204 we had a reference count bug when OVERLAPPED objects were + # associated with a completion port other than via + # PostQueuedCompletionStatus. This test is based on the reproduction + # reported with that bug. + # Create the pipe. + BUFSIZE = 512 + pipe_name = r"\\.\pipe\pywin32_test_pipe" + handle = win32pipe.CreateNamedPipe(pipe_name, + win32pipe.PIPE_ACCESS_DUPLEX| + win32file.FILE_FLAG_OVERLAPPED, + win32pipe.PIPE_TYPE_MESSAGE| + win32pipe.PIPE_READMODE_MESSAGE| + win32pipe.PIPE_WAIT, + 1, BUFSIZE, BUFSIZE, + win32pipe.NMPWAIT_WAIT_FOREVER, + None) + # Create an IOCP and associate it with the handle. + port = win32file.CreateIoCompletionPort(-1, 0, 0, 0) + win32file.CreateIoCompletionPort(handle, port, 1, 0) + + thread = threading.Thread(target=self._IOCPServerThread, args=(handle,port, test_overlapped_death)) + thread.start() + try: + time.sleep(0.1) # let thread do its thing. + try: + win32pipe.CallNamedPipe(r"\\.\pipe\pywin32_test_pipe", "Hello there", BUFSIZE, 0) + except win32pipe.error: + # Testing for overlapped death causes this + if not test_overlapped_death: + raise + finally: + handle.Close() + thread.join() + + def testCompletionPortsNonQueuedBadReference(self): + self.testCompletionPortsNonQueued(True) + class TestFindFiles(unittest.TestCase): *************** *** 198,202 **** num = 0 for i in win32file.FindFilesIterator(spec): - print "Got", i num += 1 self.failUnlessEqual(0, num) --- 256,259 ---- *************** *** 205,209 **** test_path = os.path.join(win32api.GetTempPath(), "win32file_test_directory") try: ! shutil.rmtree(test_path) except os.error: pass --- 262,269 ---- test_path = os.path.join(win32api.GetTempPath(), "win32file_test_directory") try: ! # Note: previously used shutil.rmtree, but when looking for ! # reference count leaks, that function showed leaks! os.rmdir ! # doesn't have that problem. ! os.rmdir(test_path) except os.error: pass *************** *** 216,220 **** self.failUnlessEqual(2, num) finally: ! shutil.rmtree(test_path) class TestEncrypt(unittest.TestCase): --- 276,280 ---- self.failUnlessEqual(2, num) finally: ! os.rmdir(test_path) class TestEncrypt(unittest.TestCase): |
From: Roger U. <ru...@us...> - 2005-06-01 07:42:10
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7853/win32/src Modified Files: PyHANDLE.cpp Log Message: Change PyHANDLE's tp_repr to return the same as its tp_str Index: PyHANDLE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyHANDLE.cpp 5 Sep 2004 15:43:17 -0000 1.9 --- PyHANDLE.cpp 1 Jun 2005 07:41:57 -0000 1.10 *************** *** 142,146 **** // @pymeth __cmp__|Used when HANDLE objects are compared. PyHANDLE::compareFunc, /* tp_compare */ ! 0, /* tp_repr */ &PyHANDLE_NumberMethods, /* tp_as_number */ 0, /* tp_as_sequence */ --- 142,146 ---- // @pymeth __cmp__|Used when HANDLE objects are compared. PyHANDLE::compareFunc, /* tp_compare */ ! PyHANDLE::strFunc, /* tp_repr */ &PyHANDLE_NumberMethods, /* tp_as_number */ 0, /* tp_as_sequence */ |
From: Mark H. <mha...@us...> - 2005-05-31 13:01:52
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8288 Modified Files: README.txt Added Files: CHANGES.txt Log Message: Add CHANGES.txt and point to it in READMe.txt Index: README.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/README.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README.txt 11 Oct 2004 06:48:35 -0000 1.1 --- README.txt 31 May 2005 13:01:40 -0000 1.2 *************** *** 1,15 **** This is the readme for the Python for Win32 (pywin32) extensions source code. ! 'setup_win32all.py' (soon to be renamed to the standard 'setup.py') is ! a standard distutils build script. You probably want to: ! % setup_win32all.py install or ! % setup_win32all.py --help As for Python itself, these extensions require MSVC7 for Python 2.4 and later, otherwise MSVC6. Some extensions require a recent "Platform SDK" from Microsoft, and in general, the latest service packs should be ! installed, but run 'setup_win32all.py' without any arguments to see specific information about dependencies. A vanilla MSVC installation should be able to build most extensions and list any extensions that could not be --- 1,16 ---- This is the readme for the Python for Win32 (pywin32) extensions source code. ! See CHANGES.txt for recent changes. ! 'setup.py' is a standard distutils build script. You probably want to: ! ! % setup.py install or ! % setup.py --help As for Python itself, these extensions require MSVC7 for Python 2.4 and later, otherwise MSVC6. Some extensions require a recent "Platform SDK" from Microsoft, and in general, the latest service packs should be ! installed, but run 'setup.py' without any arguments to see specific information about dependencies. A vanilla MSVC installation should be able to build most extensions and list any extensions that could not be --- NEW FILE: CHANGES.txt --- A changelog for recent builds as pasted into the sourceforge page. Generally created by hand after running: cvs -z5 log -rb20x: > log.out {py_dir}\Tools\scripts\logmerge.py -t < log.out > log.out2 However contributors are encouraged to add their own entries for their work. Build 204 --------- ChangeLog: * New 'sspi' functions from Roger Upole which allow you to perform NTLM and Kerberos authentication. * DirectSound interface contributed by Lars Immisch. * New winxptheme module wrapping the Windows XP theme API. * Fix bug in commctrl.py which caused many notification message values to have an incorrect value. See the release notes for more information. * 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. * More new win32gui functions (as usual!) * ActiveDebugging enhancements from Kiriakos Vlahos. * Python services will no longer have %System32% as the CWD when they start (the directory of the hosting exectutable will be used instead). This should prevent ImportError due to DLLs in that System32 directory being found for Python imports. * Services can specify a description that appears in win2k and later 'services' UI. * All event log entries written by services report the "source" as the service name (previously it was always "Python Service") * win32/scripts/verstamp.py is now useful stand-alone. * Fix error that would cause Pythonwin to fill the registry with thousands of toolbar related entries. * Correct error shutting down Pythonwin in Python 2.4 * DispatchWithEvents would always regenerate makepy module * Fix memory leaks in the new ifilter module. * ISAPI extension works correctly with IIS6 * win32print fixes and enhancements from Roger. * Yet more corrections for Windows NT. Release Notes: This is a new build of the Python for Windows extensions. Important notes: * If you have implemented a GUI application which uses Common Controls, and you handle notification messages for these controls, a bug recently fixed in commctrl may impact you. Key constants in commctrl.py (eg, NM_DBLCLK) had incorrect values which are now correct. If your own code references these constants, you may be working around this bug and your code will need review. If your WM_NOTIFY handling code previously has something like: code += 0x4f0000 You should change it to: code += commtrl.PY_OU Which will work in all pywin32 versions. The adjustment can be removed if you want to work only with build 204 or later (as PY_OU is correctly zero in that version). Alternatively, look at using win32gui_struct.UnpackWMNOTIFY() I apologize for this, but keeping incorrect constant values in commctrl.py would be the wrong thing to do. * Files generated by makepy in Python 2.4 will not declare an encoding. This is to work around Python bug http://www.python.org/sf/1163244. If you use COM objects that use extended characters, a warning will be generated. See the change log for minor changes. Build 203 --------- * Phil Frantz contributed the start of an ISAPI framework - you can now implement ISAPI filters and extensions in Python! (only for Python 2.3 and later builds). See the installed Help file, or see the site-packages\isapi\samples directory. * Roger Upole fixed a number of security bugs, and allowed the security modules to again be used on NT. * David Bolen restored service functionality for Windows NT. * The win32gui, win32security, and win32service modules all again work on Windows NT. * Roger Upole continued to enhance win32print. * The command-line args for our service module now allow 'start' and 'stop' to specify a '--wait' option - this will prevent the program terminating until the service completely starts/stops. * Support for CreateTypeLib2 contributed by Phil Rittenhouse. * COM servers which specify a typelib to load now also provide this type-info to the caller via GetTypeInfo. * win32api.GetLongPathName() support unicode filenames longer than MAXPATH * win32gui gets lots of new functions. * New 'winxpgui' module - almost identical to win32gui, but has a Windows XP manifest included, and a couple of extra functions not supported by Windows NT (AnimateWindow, FlashWindowEx, etc) * win32gui and win32com allow a 'logger' object to be set, so unhandled exceptions are reported to it instead of to stderr. * win32trace module and permon data modules now works in a terminal services environment. * Thanks to Enzhou Wang, the pythoncom/pywintypes .h and .lib files are now installed. * Add win32api.GetComputerNameEx() and win32api.GetComputerObjectName() * ActiveDirectory interfaces get an upgrade and new samples. * Fix a couple of potential buffer overflows for huge input strings. * Fix a crash in the dbi/odbc modules. * Pythonwin debugger should be less inclined to fill the registry with garbage. * source distribution should now be complete. * setup_win32all.py now should build correctly for most people. * Fix more installation errors. And lots of other bug fixes and enhancements too numerous to list here! Build 202 --------- * Installation now works on "non-admin" installs of Python, and also on Windows 9x. * Include taskscheduler and shell demos. * New win32inet module, which provides an interface to the Microsoft Internet related "wininet" API. * Many more security related functions by Roger Upole. * New module that interfaces to Microsoft Index Server. * Fix a bug that could cause large COM safe-arrays to crash * Fix a number of memory leaks in COM * shell.SHBrowseForFolder() now supports the callback param, ShellExecuteEx added, and a number of other shell module enhancements. * win32trace should not lose as much data when huge amounts are being spewed. * Add support for sorting listview controls with a sort callback. * A number of new win32gui methods * win32rc_parser handles icons and bitmaps etc, and also MSVC7 .rc files. * objects from the standard 'datetime' module can be used whenever a win32 time object is needed. * Work better when frozen with py2exe. * Add win32file.FindFilesIterator(), which creates an iterator based around FindFirstFile/FindNextFile. Useful for huge directories. * Fix a number of bugs relating to large integers. * win32api.GetFullPathName() will use GetFullPathNameW, and return a Unicode object if passed a Unicode arg. |
From: Mark H. <mha...@us...> - 2005-05-31 12:50:02
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2100/src Modified Files: PyADSIUtil.cpp PyIDirectoryObject.i PyIDirectorySearch.i Log Message: Autoduck Index: PyIDirectorySearch.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyIDirectorySearch.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIDirectorySearch.i 6 Oct 2004 02:07:29 -0000 1.2 --- PyIDirectorySearch.i 31 May 2005 12:49:52 -0000 1.3 *************** *** 1,2 **** --- 1,3 ---- + // @doc %module IDirectorySearch // A COM interface to ADSI's IDirectorySearch interface. *************** *** 31,35 **** %{ ! // @pyswig |SetSearchPreference| PyObject *PyIDirectorySearch::SetSearchPreference(PyObject *self, PyObject *args) { --- 32,38 ---- %{ ! // @pyswig int, [int, ...]|SetSearchPreference| ! // @rdesc The result is the hresult of the call, and a list of integer status ! // codes for each of the preferences set. PyObject *PyIDirectorySearch::SetSearchPreference(PyObject *self, PyObject *args) { *************** *** 38,41 **** --- 41,45 ---- IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; + // @pyparm ADS_SEARCHPREF_INFO|prefs|| if (!PyArg_ParseTuple(args, "O", &obPrefs)) return NULL; *************** *** 64,68 **** %{ ! // @pyswig <o PyADS_OBJECT_INFO>|ExecuteSearch|Executes a search and passes the results to the caller. Some providers, such as LDAP, will defer the actual execution until the caller invokes the IDirectorySearch::GetFirstRow method or the IDirectorySearch::GetNextRow method. PyObject *PyIDirectorySearch::ExecuteSearch(PyObject *self, PyObject *args) { --- 68,76 ---- %{ ! // @pyswig int|ExecuteSearch|Executes a search and passes the results to the caller. ! // Some providers, such as LDAP, will defer the actual execution until the caller invokes the ! // <om PyIDirectorySearch.GetFirstRow> method or the <om PyIDirectorySearch.GetNextRow> method. ! // @rdesc The result is an integer search handle. <om PyIDirectorySearch.CloseSearchHandle> ! // should be called to close the handle. PyObject *PyIDirectorySearch::ExecuteSearch(PyObject *self, PyObject *args) { *************** *** 70,73 **** --- 78,83 ---- IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; + // @pyparm <o PyUnicode>|filter|| + // @pyparm [<o PyUnicode>, ...]|attrNames|| if (!PyArg_ParseTuple(args, "OO", &obFilter, &obNames)) return NULL; *************** *** 104,116 **** %native(ExecuteSearch) ExecuteSearch; HRESULT_KEEP_INFO GetNextRow(ADS_SEARCH_HANDLE handle); HRESULT_KEEP_INFO GetFirstRow(ADS_SEARCH_HANDLE handle); HRESULT_KEEP_INFO GetPreviousRow(ADS_SEARCH_HANDLE handle); HRESULT CloseSearchHandle(ADS_SEARCH_HANDLE handle); HRESULT AbandonSearch(ADS_SEARCH_HANDLE handle); %{ ! // @pyswig |GetColumn| PyObject *PyIDirectorySearch::GetColumn(PyObject *self, PyObject *args) { --- 114,139 ---- %native(ExecuteSearch) ExecuteSearch; + // @pyswig int|GetNextRow| + // @pyparm int|handle|| + // @rdesc The result is the HRESULT from the call - no exceptions are thrown HRESULT_KEEP_INFO GetNextRow(ADS_SEARCH_HANDLE handle); + // @pyswig int|GetFirstRow| + // @pyparm int|handle|| + // @rdesc The result is the HRESULT from the call - no exceptions are thrown HRESULT_KEEP_INFO GetFirstRow(ADS_SEARCH_HANDLE handle); + // @pyswig int|GetPreviousRow| + // @pyparm int|handle|| + // @rdesc The result is the HRESULT from the call - no exceptions are thrown HRESULT_KEEP_INFO GetPreviousRow(ADS_SEARCH_HANDLE handle); + // @pyswig |CloseSearchHandle|Closes a previously opened search handle. + // @pyparm int|handle|| HRESULT CloseSearchHandle(ADS_SEARCH_HANDLE handle); + // @pyswig |AdandonSearch| + // @pyparm int|handle|| HRESULT AbandonSearch(ADS_SEARCH_HANDLE handle); %{ ! // @pyswig (name, type, values)|GetColumn| PyObject *PyIDirectorySearch::GetColumn(PyObject *self, PyObject *args) { *************** *** 119,122 **** --- 142,147 ---- IDirectorySearch *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; + // @pyparm int|handle||Handle to a search + // @pyparm <o PyUnicode>|name||The column name to fetch if (!PyArg_ParseTuple(args, "lO:GetColumn", &handle, &obName)) return NULL; Index: PyIDirectoryObject.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyIDirectoryObject.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIDirectoryObject.i 24 Sep 2004 07:25:12 -0000 1.2 --- PyIDirectoryObject.i 31 May 2005 12:49:52 -0000 1.3 *************** *** 41,44 **** --- 41,45 ---- IDirectoryObject *_swig_self; if ((_swig_self=GetI(self))==NULL) return NULL; + // @pyparm (<o PyUnicode>, ...)|names|| if (!PyArg_ParseTuple(args, "O", &obNames)) return NULL; *************** *** 80,83 **** --- 81,85 ---- if ((_swig_self=GetI(self))==NULL) return NULL; PyObject *obAttr; + // @pyparm (<o PyADS_ATTR_INFO>, ...)|attrs||The attributes to set if (!PyArg_ParseTuple(args, "O", &obAttr)) return NULL; *************** *** 114,117 **** --- 116,121 ---- if ((_swig_self=GetI(self))==NULL) return NULL; PyObject *obAttr, *obName; + // @pyparm <o PyUnicode>|rdn||The relative distinguished name (relative path) of the object to be created. + // @pyparm (<o PyADS_ATTR_INFO>, ...)|attrs||The attributes to set. if (!PyArg_ParseTuple(args, "OO:CreateDSObject", &obName, &obAttr)) return NULL; Index: PyADSIUtil.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/src/PyADSIUtil.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyADSIUtil.cpp 25 Jan 2005 13:34:06 -0000 1.3 --- PyADSIUtil.cpp 31 May 2005 12:49:49 -0000 1.4 *************** *** 79,83 **** } ! PyObject *PyADSIObject_FromADSVALUE(ADSVALUE &v) { --- 79,85 ---- } ! // @object PyADSVALUE|A tuple: ! // @tupleitem 0|object|value|The value as a Python object. ! // @tupleitem 1|int|type|The AD type of the value. PyObject *PyADSIObject_FromADSVALUE(ADSVALUE &v) { *************** *** 522,526 **** {NULL} }; ! --- 524,528 ---- {NULL} }; ! // @prop [<o PyADS_ATTR_INFO>, ...]|Values| *************** *** 627,630 **** --- 629,635 ---- } + // @object PyADS_SEARCHPREF_INFO|A tuple of: + // @tupleitem 0|int|attr_id| + // @tupleitem 1|<o PyADSVALUE>|value| void PyADSIObject_FreeADS_SEARCHPREF_INFOs(ADS_SEARCHPREF_INFO *pattr, DWORD cattr) { |
From: Mark H. <mha...@us...> - 2005-05-31 12:44:53
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31370 Modified Files: scp.py Log Message: ScpDelete only cares about the container name, and tweak a logging.debug() Index: scp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/scp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** scp.py 25 May 2005 02:11:15 -0000 1.2 --- scp.py 31 May 2005 12:44:34 -0000 1.3 *************** *** 99,107 **** return new ! def ScpDelete(service_class_name, container_name = None, dn = None): ! container_name = container_name or service_class_name if dn is None: dn = win32api.GetComputerObjectName(win32con.NameFullyQualifiedDN) ! logger.debug("Removing connection point from %s", dn) # Compose the ADSpath and bind to the computer object for the local computer --- 99,106 ---- return new ! def ScpDelete(container_name, dn = None): if dn is None: dn = win32api.GetComputerObjectName(win32con.NameFullyQualifiedDN) ! logger.debug("Removing connection point '%s' from %s", container_name, dn) # Compose the ADSpath and bind to the computer object for the local computer |
From: Mark H. <mha...@us...> - 2005-05-31 12:43:42
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30592 Modified Files: search.py Log Message: Close the search handle (should be a PyHANDLE - one day!) Index: search.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/demos/search.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** search.py 6 Oct 2004 02:04:49 -0000 1.2 --- search.py 31 May 2005 12:43:16 -0000 1.3 *************** *** 92,95 **** --- 92,96 ---- print_attribute( (a, None, None) ) hr = gc.GetNextRow(h) + gc.CloseSearchHandle(h) def main(): |
From: Mark H. <mha...@us...> - 2005-05-31 12:42:06
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29595 Modified Files: PyACL.cpp Log Message: autoduck fixes/enhancements Index: PyACL.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyACL.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PyACL.cpp 26 Jul 2004 06:47:16 -0000 1.12 --- PyACL.cpp 31 May 2005 12:41:46 -0000 1.13 *************** *** 846,850 **** ! // @pymethod |PyACL|GetAclSize|Returns the storage size of the ACL. PyObject *PyACL::GetAclSize(PyObject *self, PyObject *args) { --- 846,850 ---- ! // @pymethod int|PyACL|GetAclSize|Returns the storage size of the ACL. PyObject *PyACL::GetAclSize(PyObject *self, PyObject *args) { *************** *** 859,863 **** } ! // @pymethod |PyACL|GetAclRevision|Returns revision of the ACL. PyObject *PyACL::GetAclRevision(PyObject *self, PyObject *args) { --- 859,863 ---- } ! // @pymethod int|PyACL|GetAclRevision|Returns revision of the ACL. PyObject *PyACL::GetAclRevision(PyObject *self, PyObject *args) { *************** *** 872,876 **** } ! // @pymethod |PyACL|GetAceCount|Returns the number of ACEs in the ACL. PyObject *PyACL::GetAceCount(PyObject *self, PyObject *args) { --- 872,876 ---- } ! // @pymethod int|PyACL|GetAceCount|Returns the number of ACEs in the ACL. PyObject *PyACL::GetAceCount(PyObject *self, PyObject *args) { *************** *** 886,894 **** ! // @pymethod |PyACL|GetAce|Gets an Ace from the ACL ! // @comm Conventional ACE's (types ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, SYSTEM_AUDIT_ACE) are returned as a tuple of ((aceType, AceFlags), Mask, SID). ! // Object ACE's (types ACCESS_ALLOWED_OBJECT_ACE, ACCESS_DENIED_OBJECT_ACE, SYSTEM_AUDIT_OBJECT_ACE) are returned as a tuple of ! // ((aceType, AceFlags), Mask, ObjectType, InheritedObjectType, SID). ObjectType and InheritedObjectType are <o PyIID>'s. ! // For details see the API documentation. PyObject *PyACL::GetAce(PyObject *self, PyObject *args) { --- 886,903 ---- ! // @pymethod tuple|PyACL|GetAce|Gets an Ace from the ACL ! // @rdesc Conventional ACE's (types ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, SYSTEM_AUDIT_ACE) are returned ! // as a tuple of: ! // @tupleitem 0|(int, int)|aceType, AceFlags| ! // @tupleitem 1|int|Mask| ! // @tupleitem 2|<o PySID>|sid| ! // <nl>Object ACE's (types ACCESS_ALLOWED_OBJECT_ACE, ACCESS_DENIED_OBJECT_ACE, SYSTEM_AUDIT_OBJECT_ACE) ! // are returned as a tuple: ! // @tupleitem 0|(int, int)|aceType, AceFlags| ! // @tupleitem 1|int|mask| ! // @tupleitem 2|<o PyIID>|ObjectType| ! // @tupleitem 3|<o PyIID>|InheritedObjectType| ! // @tupleitem 4|<o PySID>|sid| ! // <nl>For details see the API documentation. PyObject *PyACL::GetAce(PyObject *self, PyObject *args) { |
From: Mark H. <mha...@us...> - 2005-05-31 12:40:18
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28074 Modified Files: InsertExternalOverviews.py document_object.py pyhtml.fmt pywin32-document.xml Log Message: Hack in basic support for "important release notes" that are designed to stand-out in the .chm. The first "important release note" relates to currency support. Index: pywin32-document.xml =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32-document.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pywin32-document.xml 6 Oct 2004 06:09:12 -0000 1.4 --- pywin32-document.xml 31 May 2005 12:40:05 -0000 1.5 *************** *** 1,3 **** --- 1,6 ---- <document> + <important> + <item name="Important notes about COM currency support changes" href="html/com/win32com/readme.htm#currency"/> + </important> <links> <item name="Python Web Site" href="http://www.python.org"/> Index: pyhtml.fmt =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pyhtml.fmt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pyhtml.fmt 11 Sep 2004 07:48:57 -0000 1.9 --- pyhtml.fmt 31 May 2005 12:40:05 -0000 1.10 *************** *** 96,99 **** --- 96,102 ---- <H1>$(title)</H1> <P> + <H2>Important Release Notes</H2> + <!--index:eximportant--> + <H2>External Resources</H2> <!--index:exlinks--> Index: document_object.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/document_object.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** document_object.py 17 Apr 2002 14:06:19 -0000 1.1 --- document_object.py 31 May 2005 12:40:05 -0000 1.2 *************** *** 6,9 **** --- 6,10 ---- def __init__(self): self.document = None + self.in_importants = False def startElement(self, name, attrs): if name=="document": *************** *** 17,26 **** elif name=="item": item = Item(attrs) ! if self.document.categories: category = self.document.categories[-1] category.overviewItems.items.append(item) else: self.document.links.append(item) def endDocument(self): pass --- 18,34 ---- elif name=="item": item = Item(attrs) ! if self.in_importants: ! self.document.important.append(item) ! elif self.document.categories: category = self.document.categories[-1] category.overviewItems.items.append(item) else: self.document.links.append(item) + elif name=="important": + self.in_importants = True + def endElement(self, name): + if name=="important": + self.in_importants = False def endDocument(self): pass *************** *** 31,34 **** --- 39,43 ---- self.categories = [] self.links = [] + self.important = [] def __iter__(self): return iter(self.categories) *************** *** 59,62 **** --- 68,75 ---- if __name__=='__main__': doc = GetDocument() + print "Important Notes" + for link in doc.important: + print " ", link.name, link.href + print "Doc links" for link in doc.links: Index: InsertExternalOverviews.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/InsertExternalOverviews.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InsertExternalOverviews.py 17 Apr 2002 14:06:19 -0000 1.1 --- InsertExternalOverviews.py 31 May 2005 12:40:05 -0000 1.2 *************** *** 12,16 **** """ ! def processFile(input, out, extLinksHTML, extTopicHTML): while 1: line = input.readline() --- 12,16 ---- """ ! def processFile(input, out, extLinksHTML, extTopicHTML, importantHTML): while 1: line = input.readline() *************** *** 19,22 **** --- 19,23 ---- line = string.replace(line, "<!--index:exlinks-->", extLinksHTML) line = string.replace(line, "<!--index:extopics-->", extTopicHTML) + line = string.replace(line, "<!--index:eximportant-->", importantHTML) out.write(line + "\n") *************** *** 34,40 **** return s ! def genLinksHTML(doc): s = "" ! for link in doc.links: s = s + '<LI><A HREF="%s">%s</A>\n' % (link.href, link.name) return s --- 35,41 ---- return s ! def genLinksHTML(links): s = "" ! for link in links: s = s + '<LI><A HREF="%s">%s</A>\n' % (link.href, link.name) return s *************** *** 50,56 **** out = open(file + ".2", "w") doc = document_object.GetDocument() ! linksHTML = genLinksHTML(doc) extTopicHTML = genHTML(doc) ! processFile(input, out, linksHTML, extTopicHTML) input.close() out.close() --- 51,58 ---- out = open(file + ".2", "w") doc = document_object.GetDocument() ! linksHTML = genLinksHTML(doc.links) extTopicHTML = genHTML(doc) ! importantHTML = genLinksHTML(doc.important) ! processFile(input, out, linksHTML, extTopicHTML, importantHTML) input.close() out.close() |
From: Mark H. <mha...@us...> - 2005-05-31 12:37:30
|
Update of /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26491/PyCOMTest Modified Files: PyCOMImpl.cpp PyCOMImpl.h PyCOMTest.idl Log Message: Add currency tests. Index: PyCOMTest.idl =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMTest.idl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyCOMTest.idl 25 Apr 2004 04:10:48 -0000 1.9 --- PyCOMTest.idl 31 May 2005 12:37:18 -0000 1.10 *************** *** 219,222 **** --- 219,224 ---- [propget] HRESULT IntProp([out, retval] int* retval); [propput] HRESULT IntProp([in] int val); + [propget] HRESULT CurrencyProp([out, retval] CY* retval); + [propput] HRESULT CurrencyProp([in] CY val); }; Index: PyCOMImpl.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMImpl.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PyCOMImpl.h 19 Nov 2002 05:03:24 -0000 1.8 --- PyCOMImpl.h 31 May 2005 12:37:18 -0000 1.9 *************** *** 25,28 **** --- 25,30 ---- { memset(m_rsArray, 0, nMaxSessions*sizeof(PyCOMTestSessionData)); + m_cy.int64 = 0; + m_long = 0; } ~CPyCOMTest(); *************** *** 92,95 **** --- 94,99 ---- STDMETHOD(get_IntProp)(int *ret); STDMETHOD(put_IntProp)(int val); + STDMETHOD(get_CurrencyProp)(CY *ret); + STDMETHOD(put_CurrencyProp)(CY val); // info associated to each session *************** *** 109,112 **** --- 113,117 ---- SAFEARRAY *pLastArray; long m_long; + CY m_cy; }; Index: PyCOMImpl.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/TestSources/PyCOMTest/PyCOMImpl.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PyCOMImpl.cpp 19 Nov 2002 10:40:01 -0000 1.9 --- PyCOMImpl.cpp 31 May 2005 12:37:18 -0000 1.10 *************** *** 479,482 **** --- 479,487 ---- CHECK_HR(tester->get_IntProp(&result)); CHECK_TRUE(result==4); + CY cy = {123, 456}; + CY cresult; + CHECK_HR(tester->put_CurrencyProp(cy)); + CHECK_HR(tester->get_CurrencyProp(&cresult)); + CHECK_TRUE(cresult.int64==cy.int64); // interface tests *************** *** 564,565 **** --- 569,584 ---- return S_OK; } + + HRESULT CPyCOMTest::put_CurrencyProp(CY val) + { + m_cy = val; + return S_OK; + } + + HRESULT CPyCOMTest::get_CurrencyProp(CY *ret) + { + if (!ret) + return E_POINTER; + *ret = (CY)m_cy; + return S_OK; + } |
From: Mark H. <mha...@us...> - 2005-05-31 12:36:22
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24405/src/include Modified Files: PythonCOM.h Log Message: With help from Roger Upole: * Add PyObject_AsCurrency and PyObject_FromCurrency to convert CY/CURRENCY structs to/from Python objects. * Invent a pythoncom.__future_currency__ scheme, allowing us to move from the current brain-dead (hiword, loword) currency support into a decimal.Decimal() object. See win32com\readme.html for more details. Index: PythonCOM.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** PythonCOM.h 25 Jan 2005 13:33:16 -0000 1.22 --- PythonCOM.h 31 May 2005 12:36:03 -0000 1.23 *************** *** 276,279 **** --- 276,282 ---- PYCOM_EXPORT PyObject *PyCom_PyObjectFromSTATPROPSETSTG(STATPROPSETSTG *pStat); + // Currency support. + PYCOM_EXPORT PyObject *PyObject_FromCurrency(CURRENCY &cy); + PYCOM_EXPORT BOOL PyObject_AsCurrency(PyObject *ob, CURRENCY *pcy); /* Functions for Initializing COM, and also letting the core know about it! |
From: Mark H. <mha...@us...> - 2005-05-31 12:36:22
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/extensions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24405/src/extensions Modified Files: PyIPropertyStorage.cpp Log Message: With help from Roger Upole: * Add PyObject_AsCurrency and PyObject_FromCurrency to convert CY/CURRENCY structs to/from Python objects. * Invent a pythoncom.__future_currency__ scheme, allowing us to move from the current brain-dead (hiword, loword) currency support into a decimal.Decimal() object. See win32com\readme.html for more details. Index: PyIPropertyStorage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/extensions/PyIPropertyStorage.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyIPropertyStorage.cpp 31 Jan 2004 21:55:18 -0000 1.10 --- PyIPropertyStorage.cpp 31 May 2005 12:36:03 -0000 1.11 *************** *** 102,106 **** return PyFloat_FromDouble(pVar->dblVal); case VT_CY: ! return Py_BuildValue("ll", pVar->cyVal.Hi, pVar->cyVal.Lo); case VT_DATE: return PyWinObject_FromDATE(pVar->date); --- 102,106 ---- return PyFloat_FromDouble(pVar->dblVal); case VT_CY: ! return PyObject_FromCurrency(pVar->cyVal); case VT_DATE: return PyWinObject_FromDATE(pVar->date); |