pywin32-checkins Mailing List for Python for Windows Extensions (Page 81)
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...> - 2008-02-09 05:56:13
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10192 Modified Files: PyIEnumExplorerCommand.cpp PyIEnumExplorerCommand.h Log Message: Make IEnumExplorerCommand a true iterator Index: PyIEnumExplorerCommand.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumExplorerCommand.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIEnumExplorerCommand.cpp 8 Feb 2008 22:32:29 -0000 1.2 --- PyIEnumExplorerCommand.cpp 9 Feb 2008 05:53:01 -0000 1.3 *************** *** 153,157 **** }; ! PyComTypeObject PyIEnumExplorerCommand::type("PyIEnumExplorerCommand", &PyIUnknown::type, sizeof(PyIEnumExplorerCommand), --- 153,157 ---- }; ! PyComEnumTypeObject PyIEnumExplorerCommand::type("PyIEnumExplorerCommand", &PyIUnknown::type, sizeof(PyIEnumExplorerCommand), Index: PyIEnumExplorerCommand.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumExplorerCommand.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIEnumExplorerCommand.h 7 Feb 2008 05:42:01 -0000 1.1 --- PyIEnumExplorerCommand.h 9 Feb 2008 05:53:01 -0000 1.2 *************** *** 10,14 **** MAKE_PYCOM_CTOR(PyIEnumExplorerCommand); static IEnumExplorerCommand *GetI(PyObject *self); ! static PyComTypeObject type; // The Python methods --- 10,14 ---- MAKE_PYCOM_CTOR(PyIEnumExplorerCommand); static IEnumExplorerCommand *GetI(PyObject *self); ! static PyComEnumTypeObject type; // The Python methods |
From: Mark H. <mha...@us...> - 2008-02-09 05:31:05
|
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2202 Modified Files: README pywin32.mak Log Message: remove win32ui from the .chm file as a work-around for the htmlhelp compiler crashing Index: README =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 17 Apr 2002 14:06:19 -0000 1.2 --- README 9 Feb 2008 05:31:04 -0000 1.3 *************** *** 3,4 **** --- 3,24 ---- Main focus these days is on the .chm file - a single .chm provides the best documentation solution. + + + Note: Jan-2008: We seem to have hit a hhc wall. Trial and error shows + that once at the point shown below, adding a single new '@pymeth' anywhere + will cause death (a single @pymeth seems to create 4 new 'local links') + + The max successful build I got was: + + 9,609 Topics + 30,629 Local links + 836 Internet links + + I've removed the win32ui module from the autoduck build and we + are now at the figures below - so the problem still appears to + loom... + + Compile time: 1 minute, 21 seconds + 7,860 Topics + 23,712 Local links + 830 Internet links Index: pywin32.mak =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/pywin32.mak,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pywin32.mak 16 Mar 2006 23:01:32 -0000 1.16 --- pywin32.mak 9 Feb 2008 05:31:04 -0000 1.17 *************** *** 89,94 **** $(GENDIR)\PyIDsObjectPicker.d \ PYTHONWIN_SOURCE = \ ! $(PYTHONWIN_DIR)\contents.d $(PYTHONWIN_DIR)\*.cpp $(PYTHONWIN_DIR)\*.h ISAPI_SOURCE = \ --- 89,97 ---- $(GENDIR)\PyIDsObjectPicker.d \ + # ack - have hit some kind of htmlhelp wall, so we drop win32ui docs - see README for more. + #PYTHONWIN_SOURCE = \ + # $(PYTHONWIN_DIR)\contents.d $(PYTHONWIN_DIR)\*.cpp $(PYTHONWIN_DIR)\*.h PYTHONWIN_SOURCE = \ ! $(PYTHONWIN_DIR)\contents.d ISAPI_SOURCE = \ |
From: Roger U. <ru...@us...> - 2008-02-08 22:32:26
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15005 Modified Files: PyIEnumExplorerCommand.cpp shell.cpp shell_pch.h Log Message: Fix build errors with VC6/Python 2.3 Index: shell_pch.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell_pch.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shell_pch.h 7 Feb 2008 05:42:01 -0000 1.9 --- shell_pch.h 8 Feb 2008 22:32:29 -0000 1.10 *************** *** 67,71 **** inline void PyObject_FreePCUIDLIST_RELATIVE(PCUIDLIST_RELATIVE pidl) { ! return PyObject_FreePIDL((LPCITEMIDLIST)pidl); } --- 67,71 ---- inline void PyObject_FreePCUIDLIST_RELATIVE(PCUIDLIST_RELATIVE pidl) { ! PyObject_FreePIDL((LPCITEMIDLIST)pidl); } *************** *** 76,80 **** inline void PyObject_FreePCIDLIST_ABSOLUTE(PCIDLIST_ABSOLUTE pidl) { ! return PyObject_FreePIDL((LPCITEMIDLIST)pidl); } --- 76,80 ---- inline void PyObject_FreePCIDLIST_ABSOLUTE(PCIDLIST_ABSOLUTE pidl) { ! PyObject_FreePIDL((LPCITEMIDLIST)pidl); } Index: PyIEnumExplorerCommand.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIEnumExplorerCommand.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIEnumExplorerCommand.cpp 7 Feb 2008 05:42:01 -0000 1.1 --- PyIEnumExplorerCommand.cpp 8 Feb 2008 22:32:29 -0000 1.2 *************** *** 180,183 **** --- 180,184 ---- PY_GATEWAY_METHOD; PyObject *result; + Py_ssize_t len; HRESULT hr = InvokeViaPolicy("Next", &result, "i", celt); if ( FAILED(hr) ) *************** *** 186,190 **** if ( !PySequence_Check(result) ) goto error; ! Py_ssize_t len = PyObject_Length(result); if ( len == -1 ) goto error; --- 187,191 ---- if ( !PySequence_Check(result) ) goto error; ! len = PyObject_Length(result); if ( len == -1 ) goto error; Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** shell.cpp 7 Feb 2008 05:42:01 -0000 1.61 --- shell.cpp 8 Feb 2008 22:32:29 -0000 1.62 *************** *** 2384,2390 **** --- 2384,2392 ---- HRESULT hr; void *v; + { PY_INTERFACE_PRECALL; hr = (*pfnAssocCreateForClasses)(elts, nclasses, iid, &v); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2497,2500 **** --- 2499,2503 ---- return NULL; SFV_CREATE create; + IShellView *view = NULL; memset(&create, 0, sizeof(create)); create.cbSize = sizeof(create); *************** *** 2505,2513 **** if (!PyCom_InterfaceFromPyInstanceOrObject(obevents, IID_IShellFolderViewCB, (void **)&create.psfvcb, TRUE/* bNoneOK */)) goto done; - IShellView *view = NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellFolderView)(&create, &view); PY_INTERFACE_POSTCALL; if (FAILED(hr)) PyCom_BuildPyException(hr); --- 2508,2517 ---- if (!PyCom_InterfaceFromPyInstanceOrObject(obevents, IID_IShellFolderViewCB, (void **)&create.psfvcb, TRUE/* bNoneOK */)) goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellFolderView)(&create, &view); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) PyCom_BuildPyException(hr); *************** *** 2582,2588 **** --- 2586,2594 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateDataObject)(parent, nchildren, children, do_inner, iid, &do_ret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2626,2632 **** --- 2632,2640 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateDefaultContextMenu)(&dcm, iid, &iret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2659,2665 **** --- 2667,2675 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHGetNameFromIDList)(pidl, flags, &strret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2705,2711 **** --- 2715,2723 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellItemArray)(parent, sf, nchildren, children, &sia_ret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2750,2756 **** --- 2762,2770 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellItemArrayFromDataObject)(ido, iid, &iret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2779,2782 **** --- 2793,2797 ---- PyObject *obpidls; PCIDLIST_ABSOLUTE_ARRAY pidls = NULL; + IShellItemArray *iret = NULL; UINT npidls; if(!PyArg_ParseTuple(args, "O:SHCreateShellItemArray", &obpidls)) *************** *** 2786,2793 **** goto done; HRESULT hr; ! IShellItemArray *iret = NULL; PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellItemArrayFromIDLists)(npidls, pidls, &iret); PY_INTERFACE_POSTCALL; if (FAILED(hr)) { PyCom_BuildPyException(hr); --- 2801,2810 ---- goto done; HRESULT hr; ! ! { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellItemArrayFromIDLists)(npidls, pidls, &iret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); *************** *** 2825,2831 **** --- 2842,2850 ---- goto done; HRESULT hr; + { PY_INTERFACE_PRECALL; hr = (*pfnSHCreateShellItemArrayFromShellItem)(isi, iid, &iret); PY_INTERFACE_POSTCALL; + } if (FAILED(hr)) { PyCom_BuildPyException(hr); |
From: Sidnei da S. <dre...@us...> - 2008-02-08 13:43:54
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12220/com/win32comext/bits/test Modified Files: Tag: sidnei-bits test_bits.py Log Message: - Cleanup a tiny bit Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** test_bits.py 8 Feb 2008 01:54:31 -0000 1.1.2.6 --- test_bits.py 8 Feb 2008 13:43:57 -0000 1.1.2.7 *************** *** 56,60 **** state = job.GetState() print 'Job Modification', job.GetDisplayName(), states.get(state) ! if state in (bits.BG_JOB_STATE_ERROR, bits.BG_JOB_STATE_TRANSIENT_ERROR): print "Error details:" err = job.GetError() --- 56,62 ---- state = job.GetState() print 'Job Modification', job.GetDisplayName(), states.get(state) ! # Need to catch TRANSIENT_ERROR here, as JobError doesn't get ! # called (apparently) when the error is transient. ! if state == bits.BG_JOB_STATE_TRANSIENT_ERROR: print "Error details:" err = job.GetError() *************** *** 62,66 **** job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) - print job job.SetNotifyInterface(wrap(BackgroundJobCallback())) --- 64,67 ---- *************** *** 84,97 **** job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) ! # job.Suspend() ! ! enum = job.EnumFiles() ! while True: ! files = enum.Next() ! if not files: ! break ! for f in files: ! print 'Downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() job.Resume() --- 85,91 ---- job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) ! for f in job.EnumFiles(): ! print 'Downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() job.Resume() |
From: Mark H. <mha...@us...> - 2008-02-08 05:48:43
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29970 Modified Files: Tag: sidnei-bits show_all_jobs.py Log Message: had "total" and "transferred" reversed. Index: show_all_jobs.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/show_all_jobs.py,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** show_all_jobs.py 8 Feb 2008 05:43:59 -0000 1.1.2.1 --- show_all_jobs.py 8 Feb 2008 05:48:47 -0000 1.1.2.2 *************** *** 32,37 **** print "Created/Modified/Finished times:", [str(t) for t in job.GetTimes()] bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress() ! print "Bytes: %d complete of %d total" % (bytes_tot, bytes_xf) ! print "Files: %d complete of %d total" % (files_tot, files_xf) for f in job.EnumFiles(): bytes, total, done = f.GetProgress() --- 32,37 ---- print "Created/Modified/Finished times:", [str(t) for t in job.GetTimes()] bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress() ! print "Bytes: %d complete of %d total" % (bytes_xf, bytes_tot) ! print "Files: %d complete of %d total" % (files_xf, files_tot) for f in job.EnumFiles(): bytes, total, done = f.GetProgress() |
From: Mark H. <mha...@us...> - 2008-02-08 05:43:55
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27087 Added Files: Tag: sidnei-bits show_all_jobs.py Log Message: utility for dumping all bits jobs --- NEW FILE: show_all_jobs.py --- # Dump lots of info about BITS jobs. from win32com.bits import bits import pythoncom states = dict([(val, (name[13:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_STATE_')]) job_types = dict([(val, (name[12:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_TYPE_')]) bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager, None, pythoncom.CLSCTX_LOCAL_SERVER, bits.IID_IBackgroundCopyManager) try: enum = bcm.EnumJobs(bits.BG_JOB_ENUM_ALL_USERS) except pythoncom.error: print "Failed to get jobs for all users - trying for current user" enum = bcm.EnumJobs(0) for job in enum: print "Job:", job.GetDisplayName() print "Description:", job.GetDescription() print "Id:", job.GetId() print "State:", states.get(job.GetState()) print "Type:", job_types.get(job.GetType()) print "Owner:", job.GetOwner() print "Errors:", job.GetErrorCount() print "Created/Modified/Finished times:", [str(t) for t in job.GetTimes()] bytes_tot, bytes_xf, files_tot, files_xf = job.GetProgress() print "Bytes: %d complete of %d total" % (bytes_tot, bytes_xf) print "Files: %d complete of %d total" % (files_tot, files_xf) for f in job.EnumFiles(): bytes, total, done = f.GetProgress() print " Remote:", f.GetRemoteName() print " Local:", f.GetLocalName() print " Progress: %d of %d bytes - completed=%s)" % (bytes, total, done) print print |
From: Mark H. <mha...@us...> - 2008-02-08 05:41:58
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25876 Modified Files: Tag: sidnei-bits bits.cpp Log Message: Return None if the time is zero, and add basic autoduck docs Index: bits.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits.cpp,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** bits.cpp 8 Feb 2008 05:27:27 -0000 1.1.2.5 --- bits.cpp 8 Feb 2008 05:41:57 -0000 1.1.2.6 *************** *** 12,15 **** --- 12,16 ---- # include "PythonCOMRegister.h" + // @doc BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, ULONG *pnum, BG_FILE_INFO **fi) *************** *** 36,39 **** --- 37,41 ---- PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) { + // @object PyObject_FromBG_FILE_PROGRESS|A tuple of 3 elements (bytesTotal, bytesTransfered, completed), (int, int, bool) return Py_BuildValue("NNO", PyLong_FromLongLong(fp->BytesTotal), *************** *** 44,47 **** --- 46,50 ---- PyObject *PyObject_FromBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp) { + // @object PyObject_FromBG_JOB_PROGRESS|A tuple of 4 elements (bytesTotal, bytesTransfered, filesTotal, filesTransfered), all ints. return Py_BuildValue("NNkk", PyLong_FromLongLong(jp->BytesTotal), PyLong_FromLongLong(jp->BytesTransferred), jp->FilesTotal, jp->FilesTransferred); *************** *** 49,58 **** PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs) { return Py_BuildValue("NN", PyLong_FromLongLong(jrs->BytesTotal), PyLong_FromLongLong(jrs->BytesTransferred)); } PyObject *PyObject_FromBG_JOB_TIMES(BG_JOB_TIMES *jt) { ! return Py_BuildValue("NNN", PyWinObject_FromFILETIME(jt->CreationTime), PyWinObject_FromFILETIME(jt->ModificationTime), PyWinObject_FromFILETIME(jt->TransferCompletionTime)); } --- 52,77 ---- PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs) { + // @object BG_JOB_REPLY_PROGRESS|A tuple of 2 elements (bytesTotal, bytesTransfered), both ints. return Py_BuildValue("NN", PyLong_FromLongLong(jrs->BytesTotal), PyLong_FromLongLong(jrs->BytesTransferred)); } + PyObject *MakeTimeOrNone(const FILETIME &t) + { + if (t.dwLowDateTime==0 && t.dwHighDateTime==0) { + Py_INCREF(Py_None); + return Py_None; + } + return PyWinObject_FromFILETIME(t); + } + PyObject *PyObject_FromBG_JOB_TIMES(BG_JOB_TIMES *jt) { ! // @object BG_JOB_TIMES|A tuple of 3 elements, where each element may be ! // None or a <o PyTime> object. The elements are the CreationTime, ! // ModificationTime and TransferCompletionTime, respectively. ! return Py_BuildValue("NNN", ! MakeTimeOrNone(jt->CreationTime), ! MakeTimeOrNone(jt->ModificationTime), ! MakeTimeOrNone(jt->TransferCompletionTime)); } |
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17545 Modified Files: Tag: sidnei-bits PyIEnumBackgroundCopyFiles.cpp PyIEnumBackgroundCopyFiles.h PyIEnumBackgroundCopyJobs.cpp PyIEnumBackgroundCopyJobs.h Log Message: Make the IEnum* interfaces true iterators Index: PyIEnumBackgroundCopyJobs.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIEnumBackgroundCopyJobs.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIEnumBackgroundCopyJobs.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIEnumBackgroundCopyJobs.cpp 8 Feb 2008 05:27:57 -0000 1.1.2.3 *************** *** 152,156 **** }; ! PyComTypeObject PyIEnumBackgroundCopyJobs::type("PyIEnumBackgroundCopyJobs", &PyIUnknown::type, sizeof(PyIEnumBackgroundCopyJobs), --- 152,156 ---- }; ! PyComEnumTypeObject PyIEnumBackgroundCopyJobs::type("PyIEnumBackgroundCopyJobs", &PyIUnknown::type, sizeof(PyIEnumBackgroundCopyJobs), Index: PyIEnumBackgroundCopyFiles.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIEnumBackgroundCopyFiles.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIEnumBackgroundCopyFiles.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIEnumBackgroundCopyFiles.cpp 8 Feb 2008 05:27:57 -0000 1.1.2.3 *************** *** 152,156 **** }; ! PyComTypeObject PyIEnumBackgroundCopyFiles::type("PyIEnumBackgroundCopyFiles", &PyIUnknown::type, sizeof(PyIEnumBackgroundCopyFiles), --- 152,156 ---- }; ! PyComEnumTypeObject PyIEnumBackgroundCopyFiles::type("PyIEnumBackgroundCopyFiles", &PyIUnknown::type, sizeof(PyIEnumBackgroundCopyFiles), Index: PyIEnumBackgroundCopyFiles.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIEnumBackgroundCopyFiles.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIEnumBackgroundCopyFiles.h 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIEnumBackgroundCopyFiles.h 8 Feb 2008 05:27:57 -0000 1.1.2.3 *************** *** 13,17 **** MAKE_PYCOM_CTOR(PyIEnumBackgroundCopyFiles); static IEnumBackgroundCopyFiles *GetI(PyObject *self); ! static PyComTypeObject type; // The Python methods --- 13,17 ---- MAKE_PYCOM_CTOR(PyIEnumBackgroundCopyFiles); static IEnumBackgroundCopyFiles *GetI(PyObject *self); ! static PyComEnumTypeObject type; // The Python methods Index: PyIEnumBackgroundCopyJobs.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIEnumBackgroundCopyJobs.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIEnumBackgroundCopyJobs.h 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIEnumBackgroundCopyJobs.h 8 Feb 2008 05:27:57 -0000 1.1.2.3 *************** *** 13,17 **** MAKE_PYCOM_CTOR(PyIEnumBackgroundCopyJobs); static IEnumBackgroundCopyJobs *GetI(PyObject *self); ! static PyComTypeObject type; // The Python methods --- 13,17 ---- MAKE_PYCOM_CTOR(PyIEnumBackgroundCopyJobs); static IEnumBackgroundCopyJobs *GetI(PyObject *self); ! static PyComEnumTypeObject type; // The Python methods |
From: Mark H. <mha...@us...> - 2008-02-08 05:27:42
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17320 Modified Files: Tag: sidnei-bits bits.cpp Log Message: Ensure the 'completed' elt of the BG_FILE_PROGRESS tuple is a bool Index: bits.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** bits.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.4 --- bits.cpp 8 Feb 2008 05:27:27 -0000 1.1.2.5 *************** *** 36,40 **** PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) { ! return Py_BuildValue("NNi", PyLong_FromLongLong(fp->BytesTotal), PyLong_FromLongLong(fp->BytesTransferred), fp->Completed); } --- 36,43 ---- PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) { ! return Py_BuildValue("NNO", ! PyLong_FromLongLong(fp->BytesTotal), ! PyLong_FromLongLong(fp->BytesTransferred), ! fp->Completed ? Py_True : Py_False); } *************** *** 164,166 **** --- 167,170 ---- // PyModule_AddIntConstant(module, "BG_NOTIFY_FILE_TRANSFERRED", BG_NOTIFY_FILE_TRANSFERRED); + PyModule_AddIntConstant(module, "BG_JOB_ENUM_ALL_USERS", BG_JOB_ENUM_ALL_USERS); } |
From: Mark H. <mha...@us...> - 2008-02-08 03:06:27
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30917 Modified Files: PyIAsyncOperation.cpp PyICategoryProvider.cpp PyIDropTargetHelper.cpp PyIExplorerBrowser.cpp PyIExplorerBrowserEvents.cpp PyIExplorerCommand.cpp PyIExplorerCommandProvider.cpp PyIExtractImage.cpp PyIShellFolder2.cpp PyIShellItem.cpp PyIShellItemArray.cpp Log Message: autoduck corrections Index: PyIShellItemArray.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellItemArray.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIShellItemArray.cpp 7 Feb 2008 05:42:01 -0000 1.2 --- PyIShellItemArray.cpp 8 Feb 2008 03:06:28 -0000 1.3 *************** *** 31,35 **** if ( pISIA == NULL ) return NULL; ! // @pyparm <o PyIBindCtx *>|pbc||Description for pbc // @pyparm <o PyIID>|rbhid||Description for rbhid // @pyparm <o PyIID>|riid||Description for riid --- 31,35 ---- if ( pISIA == NULL ) return NULL; ! // @pyparm <o PyIBindCtx>|pbc||Description for pbc // @pyparm <o PyIID>|rbhid||Description for rbhid // @pyparm <o PyIID>|riid||Description for riid *************** *** 121,127 **** return NULL; SIATTRIBFLAGS dwAttribFlags; ! // @pyparm <o PySIATTRIBFLAGS>|dwAttribFlags||Description for dwAttribFlags SFGAOF sfgaoMask; ! // @pyparm <o PySFGAOF>|sfgaoMask||Description for sfgaoMask if ( !PyArg_ParseTuple(args, "kk:GetAttributes", &dwAttribFlags, &sfgaoMask) ) return NULL; --- 121,127 ---- return NULL; SIATTRIBFLAGS dwAttribFlags; ! // @pyparm int|dwAttribFlags||Description for dwAttribFlags SFGAOF sfgaoMask; ! // @pyparm int|sfgaoMask||Description for sfgaoMask if ( !PyArg_ParseTuple(args, "kk:GetAttributes", &dwAttribFlags, &sfgaoMask) ) return NULL; Index: PyIDropTargetHelper.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIDropTargetHelper.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PyIDropTargetHelper.cpp 3 Jun 2007 14:53:07 -0000 1.4 --- PyIDropTargetHelper.cpp 8 Feb 2008 03:06:28 -0000 1.5 *************** *** 128,132 **** if ( pIDT == NULL ) return NULL; ! // @pyparm <o PyIDataObject *>|pDataObj||Description for pDataObj POINT pt; PyObject *obpt; --- 128,132 ---- if ( pIDT == NULL ) return NULL; ! // @pyparm <o PyIDataObject>|pDataObj||Description for pDataObj POINT pt; PyObject *obpt; Index: PyIExplorerCommandProvider.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExplorerCommandProvider.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIExplorerCommandProvider.cpp 7 Feb 2008 05:42:01 -0000 1.1 --- PyIExplorerCommandProvider.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 8,11 **** --- 8,13 ---- // --------------------------------------------------- // + // @object PyIExplorerCommandProvider|This is a gateway only interface. + // Gateway Implementation STDMETHODIMP PyGExplorerCommandProvider::GetCommands( Index: PyIShellItem.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellItem.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIShellItem.cpp 8 Jan 2008 00:41:03 -0000 1.1 --- PyIShellItem.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 31,35 **** if ( pISI == NULL ) return NULL; ! // @pyparm <o PyIBindCtx *>|pbc||Description for pbc // @pyparm <o PyIID>|bhid||Description for bhid // @pyparm <o PyIID>|riid||Description for riid --- 31,35 ---- if ( pISI == NULL ) return NULL; ! // @pyparm <o PyIBindCtx>|pbc||Description for pbc // @pyparm <o PyIID>|bhid||Description for bhid // @pyparm <o PyIID>|riid||Description for riid *************** *** 131,135 **** if ( pISI == NULL ) return NULL; ! // @pyparm <o PyIShellItem *>|psi||Description for psi SICHINTF hint; // @pyparm int|hint||Description for hint --- 131,135 ---- if ( pISI == NULL ) return NULL; ! // @pyparm <o PyIShellItem>|psi||Description for psi SICHINTF hint; // @pyparm int|hint||Description for hint Index: PyIExplorerBrowser.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExplorerBrowser.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIExplorerBrowser.cpp 8 Jan 2008 00:41:03 -0000 1.1 --- PyIExplorerBrowser.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 37,41 **** FOLDERSETTINGS fs; PyObject *obpfs; ! // @pyparm <o PyFOLDERSETTINGS *>|pfs||Description for pfs HWND hwndParent; PyObject *obhwnd; --- 37,41 ---- FOLDERSETTINGS fs; PyObject *obpfs; ! // @pyparm <o PyFOLDERSETTINGS>|pfs||Description for pfs HWND hwndParent; PyObject *obhwnd; *************** *** 88,92 **** HDWP hdwp; PyObject *obphdwp; ! // @pyparm <o PyHDWP *>|phdwp||Description for phdwp RECT rcBrowser; PyObject *obrcBrowser; --- 88,92 ---- HDWP hdwp; PyObject *obphdwp; ! // @pyparm <o PyHDWP>|hdwp||Description for phdwp RECT rcBrowser; PyObject *obrcBrowser; *************** *** 172,176 **** FOLDERSETTINGS fs; PyObject *obpfs; ! // @pyparm <o PyFOLDERSETTINGS *>|pfs||Description for pfs if ( !PyArg_ParseTuple(args, "O:SetFolderSettings", &obpfs) ) return NULL; --- 172,176 ---- FOLDERSETTINGS fs; PyObject *obpfs; ! // @pyparm <o PyFOLDERSETTINGS>|pfs||Description for pfs if ( !PyArg_ParseTuple(args, "O:SetFolderSettings", &obpfs) ) return NULL; *************** *** 196,201 **** if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIExplorerBrowserEvents *>|psbe||Description for psbe ! // @pyparm <o PyDWORD *>|pdwCookie||Description for pdwCookie PyObject *obpsbe; IExplorerBrowserEvents *psbe; --- 196,200 ---- if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIExplorerBrowserEvents>|psbe||Description for psbe PyObject *obpsbe; IExplorerBrowserEvents *psbe; *************** *** 273,277 **** EXPLORER_BROWSER_OPTIONS dwFlag; PyObject *obpdwFlag; ! // @pyparm <o PyEXPLORER_BROWSER_OPTIONS *>|pdwFlag||Description for pdwFlag if ( !PyArg_ParseTuple(args, "O:GetOptions", &obpdwFlag) ) return NULL; --- 272,276 ---- EXPLORER_BROWSER_OPTIONS dwFlag; PyObject *obpdwFlag; ! // @pyparm <o PyEXPLORER_BROWSER_OPTIONS>|pdwFlag||Description for pdwFlag if ( !PyArg_ParseTuple(args, "O:GetOptions", &obpdwFlag) ) return NULL; *************** *** 324,328 **** if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIUnknown *>|punk||Description for punk // @pyparm int|uFlags||Description for uFlags PyObject *obpunk; --- 323,327 ---- if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIUnknown>|punk||Description for punk // @pyparm int|uFlags||Description for uFlags PyObject *obpunk; *************** *** 355,359 **** if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIUnknown *>|punk||Description for punk EXPLORER_BROWSER_FILL_FLAGS dwFlags; PyObject *obdwFlags; --- 354,358 ---- if ( pIEB == NULL ) return NULL; ! // @pyparm <o PyIUnknown>|punk||Description for punk EXPLORER_BROWSER_FILL_FLAGS dwFlags; PyObject *obdwFlags; Index: PyIExtractImage.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExtractImage.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIExtractImage.cpp 25 Apr 2007 03:24:40 -0000 1.1 --- PyIExtractImage.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 54,66 **** return NULL; DWORD dwPriority; ! //PyObject *obdwPriority; ! // @pyparm <o PyDWORD *>|dwPriority||Description for dwPriority SIZE rgSize; PyObject *obrgSize; ! // @pyparm <o Pyconst SIZE *>|prgSize||Description for prgSize // @pyparm int|dwRecClrDepth||Description for dwRecClrDepth DWORD dwFlags; ! //PyObject *obdwFlags; ! // @pyparm <o PyDWORD *>|pdwFlags||Description for pdwFlags WCHAR pszPathBuffer[255]; DWORD dwRecClrDepth; --- 54,64 ---- return NULL; DWORD dwPriority; ! // @pyparm int|dwPriority||Description for dwPriority SIZE rgSize; PyObject *obrgSize; ! // @pyparm (int, int)|size||Description for prgSize // @pyparm int|dwRecClrDepth||Description for dwRecClrDepth DWORD dwFlags; ! // @pyparm int|pdwFlags||Description for pdwFlags WCHAR pszPathBuffer[255]; DWORD dwRecClrDepth; Index: PyIShellFolder2.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIShellFolder2.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIShellFolder2.cpp 7 Feb 2008 05:42:01 -0000 1.1 --- PyIShellFolder2.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 33,37 **** return NULL; GUID guid; ! // @pyparm <o PyGUID *>|pguid||Description for pguid if ( !PyArg_ParseTuple(args, ":GetDefaultSearchGUID") ) return NULL; --- 33,37 ---- return NULL; GUID guid; ! // @pyparm <o PyIID>|pguid||Description for pguid if ( !PyArg_ParseTuple(args, ":GetDefaultSearchGUID") ) return NULL; *************** *** 114,118 **** SHCOLUMNID scid; PyObject *obpscid; ! // @pyparm <o Pyconst SHCOLUMNID *>|pscid||Description for pscid PyObject *obpidl; LPITEMIDLIST pidl; --- 114,118 ---- SHCOLUMNID scid; PyObject *obpscid; ! // @pyparm <o SHCOLUMNID>|pscid||Description for pscid PyObject *obpidl; LPITEMIDLIST pidl; Index: PyIAsyncOperation.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIAsyncOperation.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIAsyncOperation.cpp 26 Jan 2005 22:31:09 -0000 1.2 --- PyIAsyncOperation.cpp 8 Feb 2008 03:06:28 -0000 1.3 *************** *** 73,77 **** if ( pIAO == NULL ) return NULL; ! // @pyparm <o PyIBindCtx *>|pbcReserved||Description for pbcReserved PyObject *obpbcReserved; IBindCtx *pbcReserved; --- 73,77 ---- if ( pIAO == NULL ) return NULL; ! // @pyparm <o PyIBindCtx>|pbcReserved||Description for pbcReserved PyObject *obpbcReserved; IBindCtx *pbcReserved; *************** *** 122,126 **** return NULL; // @pyparm int|hResult||Description for hResult ! // @pyparm <o PyIBindCtx *>|pbcReserved||Description for pbcReserved // @pyparm int|dwEffects||Description for dwEffects PyObject *obpbcReserved; --- 122,126 ---- return NULL; // @pyparm int|hResult||Description for hResult ! // @pyparm <o PyIBindCtx>|pbcReserved||Description for pbcReserved // @pyparm int|dwEffects||Description for dwEffects PyObject *obpbcReserved; Index: PyIExplorerBrowserEvents.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExplorerBrowserEvents.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIExplorerBrowserEvents.cpp 8 Jan 2008 00:41:03 -0000 1.1 --- PyIExplorerBrowserEvents.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 59,63 **** if ( pIEBE == NULL ) return NULL; ! // @pyparm <o PyIShellView *>|psv||Description for psv PyObject *obpsv; IShellView * psv; --- 59,63 ---- if ( pIEBE == NULL ) return NULL; ! // @pyparm <o PyIShellView>|psv||Description for psv PyObject *obpsv; IShellView * psv; Index: PyICategoryProvider.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyICategoryProvider.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyICategoryProvider.cpp 7 Feb 2008 05:42:01 -0000 1.1 --- PyICategoryProvider.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 33,37 **** SHCOLUMNID scid; PyObject *obpscid; ! // @pyparm <o Py__RPC__in const SHCOLUMNID *>|pscid||Description for pscid if ( !PyArg_ParseTuple(args, "O:CanCategorizeOnSCID", &obpscid) ) return NULL; --- 33,37 ---- SHCOLUMNID scid; PyObject *obpscid; ! // @pyparm <o SHCOLUMNID>|pscid||Description for pscid if ( !PyArg_ParseTuple(args, "O:CanCategorizeOnSCID", &obpscid) ) return NULL; *************** *** 122,126 **** // @comm The buffer is always 1024 chars long WCHAR buffer[1024]; ! // @pyparm <o GUID>|pguid||Description for pguid if ( !PyArg_ParseTuple(args, "O:GetCategoryName", &obpguid) ) return NULL; --- 122,126 ---- // @comm The buffer is always 1024 chars long WCHAR buffer[1024]; ! // @pyparm <o PyIID>|guid||Description for pguid if ( !PyArg_ParseTuple(args, "O:GetCategoryName", &obpguid) ) return NULL; *************** *** 145,152 **** GUID guid; PyObject *obpguid; ! // @pyparm <o GUID>|pguid||Description for pguid IID riid; PyObject *obriid; ! // @pyparm <o REFIID>|riid||Description for riid if ( !PyArg_ParseTuple(args, "OO:CreateCategory", &obpguid, &obriid) ) return NULL; --- 145,152 ---- GUID guid; PyObject *obpguid; ! // @pyparm <o PyIID>|guid||Description for pguid IID riid; PyObject *obriid; ! // @pyparm <o PyIID>|riid||Description for riid if ( !PyArg_ParseTuple(args, "OO:CreateCategory", &obpguid, &obriid) ) return NULL; Index: PyIExplorerCommand.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExplorerCommand.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyIExplorerCommand.cpp 8 Jan 2008 00:41:03 -0000 1.1 --- PyIExplorerCommand.cpp 8 Feb 2008 03:06:28 -0000 1.2 *************** *** 31,35 **** if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray *>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; --- 31,35 ---- if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; *************** *** 60,64 **** if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray *>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; --- 60,64 ---- if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; *************** *** 89,93 **** if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray *>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; --- 89,93 ---- if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray>|psiItemArray||Description for psiItemArray PyObject *obpsiItemArray; IShellItemArray * psiItemArray; *************** *** 137,141 **** if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray *>|psiItemArray||Description for psiItemArray // @pyparm int|fOkToBeSlow||Description for fOkToBeSlow PyObject *obpsiItemArray; --- 137,141 ---- if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray>|psiItemArray||Description for psiItemArray // @pyparm int|fOkToBeSlow||Description for fOkToBeSlow PyObject *obpsiItemArray; *************** *** 166,171 **** if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray *>|psiItemArray||Description for psiItemArray ! // @pyparm <o PyIBindCtx *>|pbc||Description for pbc PyObject *obpsiItemArray; PyObject *obpbc; --- 166,171 ---- if ( pIEC == NULL ) return NULL; ! // @pyparm <o PyIShellItemArray>|psiItemArray||Description for psiItemArray ! // @pyparm <o PyIBindCtx>|pbc||Description for pbc PyObject *obpsiItemArray; PyObject *obpbc; |
From: Sidnei da S. <dre...@us...> - 2008-02-08 02:00:33
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24481/com/win32comext/bits/src Modified Files: Tag: sidnei-bits PyIBackgroundCopyError.cpp PyIBackgroundCopyJob.cpp Log Message: - Fixup WCHAR/LPWSTR confusion Index: PyIBackgroundCopyError.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyError.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** PyIBackgroundCopyError.cpp 7 Feb 2008 09:05:58 -0000 1.1.2.4 --- PyIBackgroundCopyError.cpp 8 Feb 2008 02:00:31 -0000 1.1.2.5 *************** *** 69,73 **** return NULL; // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pErrorDescription; DWORD LanguageId = 0; if ( !PyArg_ParseTuple(args, "|l:GetErrorDescription", &LanguageId) ) --- 69,73 ---- return NULL; // @pyparm int|LanguageId||Description for LanguageId ! LPWSTR pErrorDescription; DWORD LanguageId = 0; if ( !PyArg_ParseTuple(args, "|l:GetErrorDescription", &LanguageId) ) *************** *** 79,83 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyString_FromUnicode(pErrorDescription); CoTaskMemFree(pErrorDescription); return ret; --- 79,83 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyWinObject_FromWCHAR(pErrorDescription); CoTaskMemFree(pErrorDescription); return ret; *************** *** 91,95 **** return NULL; // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pContextDescription; DWORD LanguageId; if ( !PyArg_ParseTuple(args, "l:GetErrorContextDescription", &LanguageId) ) --- 91,95 ---- return NULL; // @pyparm int|LanguageId||Description for LanguageId ! LPWSTR pContextDescription; DWORD LanguageId; if ( !PyArg_ParseTuple(args, "l:GetErrorContextDescription", &LanguageId) ) *************** *** 101,105 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyString_FromUnicode(pContextDescription); CoTaskMemFree(pContextDescription); return ret; --- 101,105 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyWinObject_FromWCHAR(pContextDescription); CoTaskMemFree(pContextDescription); return ret; *************** *** 112,116 **** if ( pIBCE == NULL ) return NULL; ! WCHAR *pProtocol; if ( !PyArg_ParseTuple(args, ":GetProtocol") ) return NULL; --- 112,116 ---- if ( pIBCE == NULL ) return NULL; ! LPWSTR pProtocol; if ( !PyArg_ParseTuple(args, ":GetProtocol") ) return NULL; *************** *** 121,125 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyString_FromUnicode(pProtocol); CoTaskMemFree(pProtocol); return ret; --- 121,125 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! PyObject *ret = PyWinObject_FromWCHAR(pProtocol); CoTaskMemFree(pProtocol); return ret; Index: PyIBackgroundCopyJob.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob.cpp,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** PyIBackgroundCopyJob.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.4 --- PyIBackgroundCopyJob.cpp 8 Feb 2008 02:00:31 -0000 1.1.2.5 *************** *** 329,333 **** if ( pIBCJ == NULL ) return NULL; ! WCHAR *pVal; if ( !PyArg_ParseTuple(args, ":GetDisplayName") ) return NULL; --- 329,333 ---- if ( pIBCJ == NULL ) return NULL; ! LPWSTR pVal; if ( !PyArg_ParseTuple(args, ":GetDisplayName") ) return NULL; *************** *** 338,342 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! PyObject *ret = PyString_FromUnicode(pVal); CoTaskMemFree(pVal); return ret; --- 338,342 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; *************** *** 374,378 **** if ( pIBCJ == NULL ) return NULL; ! WCHAR *pVal; if ( !PyArg_ParseTuple(args, ":GetDescription") ) return NULL; --- 374,378 ---- if ( pIBCJ == NULL ) return NULL; ! LPWSTR pVal; if ( !PyArg_ParseTuple(args, ":GetDescription") ) return NULL; *************** *** 383,387 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! PyObject *ret = PyString_FromUnicode(pVal); CoTaskMemFree(pVal); return ret; --- 383,387 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! PyObject *ret = PyWinObject_FromWCHAR(pVal); CoTaskMemFree(pVal); return ret; |
From: Sidnei da S. <dre...@us...> - 2008-02-08 01:54:28
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20933 Modified Files: Tag: sidnei-bits test_bits.py Log Message: - Add some comments to clarify the intent of this test, and a hint about the behaviour of JobError Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** test_bits.py 7 Feb 2008 09:06:15 -0000 1.1.2.5 --- test_bits.py 8 Feb 2008 01:54:31 -0000 1.1.2.6 *************** *** 1,2 **** --- 1,4 ---- + + from win32com.server.util import wrap import pythoncom, sys, os, time, win32api, win32event, tempfile *************** *** 35,39 **** print 'Changing to point to correct file' f2 = f.QueryInterface(bits.IID_IBackgroundCopyFile2) ! f2.SetRemoteName(r'http://www.python.org/favicon.ico') job.Resume() else: --- 37,43 ---- print 'Changing to point to correct file' f2 = f.QueryInterface(bits.IID_IBackgroundCopyFile2) ! favicon = 'http://www.python.org/favicon.ico' ! print 'Changing RemoteName from', f2.GetRemoteName(), 'to', favicon ! f2.SetRemoteName(favicon) job.Resume() else: *************** *** 65,70 **** bits.BG_NOTIFY_JOB_MODIFICATION) ! job.AddFile(r'http://www.python.org/favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-favicon.ico')) ! job.AddFile(r'http://www.non-existing.domain/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) # job.Suspend() --- 69,86 ---- bits.BG_NOTIFY_JOB_MODIFICATION) ! ! # The idea here is to intentionally make one of the files fail to be ! # downloaded. Then the JobError notification will be triggered, where ! # we do fix the failing file by calling SetRemoteName to a valid URL ! # and call Resume() on the job, making the job finish successfully. ! # ! # Note to self: A domain that cannot be resolved will cause ! # TRANSIENT_ERROR instead of ERROR, and the JobError notification will ! # not be triggered! This can bite you during testing depending on how ! # your DNS is configured. For example, if you use OpenDNS.org's DNS ! # servers, an invalid hostname will *always* be resolved (they ! # redirect you to a search page), so be careful when testing. ! job.AddFile('http://www.python.org/favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-favicon.ico')) ! job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) # job.Suspend() |
From: Mark H. <mha...@us...> - 2008-02-07 09:06:13
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4566 Modified Files: Tag: sidnei-bits test_bits.py Log Message: fixes/tweaks to the tests. Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** test_bits.py 7 Feb 2008 08:43:44 -0000 1.1.2.4 --- test_bits.py 7 Feb 2008 09:06:15 -0000 1.1.2.5 *************** *** 7,11 **** job_name = 'bits-pywin32-test' ! states = dict([(val, (name.split('_')[-1])) for name, val in vars(bits).items() if name.startswith('BG_JOB_STATE_')]) --- 7,11 ---- job_name = 'bits-pywin32-test' ! states = dict([(val, (name[13:])) for name, val in vars(bits).items() if name.startswith('BG_JOB_STATE_')]) *************** *** 31,35 **** print 'To', f.GetLocalName() print 'The following error happened:' ! print error.GetErrorDescription(0) if f.GetRemoteName().endswith('missing-favicon.ico'): print 'Changing to point to correct file' --- 31,35 ---- print 'To', f.GetLocalName() print 'The following error happened:' ! self._print_error(error) if f.GetRemoteName().endswith('missing-favicon.ico'): print 'Changing to point to correct file' *************** *** 40,45 **** job.Cancel() def JobModification(self, job, reserved): ! print 'Job Modification', job, states.get(job.GetState()) job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) --- 40,59 ---- job.Cancel() + def _print_error(self, err): + ctx, hresult = err.GetError() + try: + hresult_msg = win32api.FormatMessage(hresult) + except win32api.error: + hresult_msg = "" + print "Context=0x%x, hresult=0x%x (%s)" % (ctx, hresult, hresult_msg) + print err.GetErrorDescription() + def JobModification(self, job, reserved): ! state = job.GetState() ! print 'Job Modification', job.GetDisplayName(), states.get(state) ! if state in (bits.BG_JOB_STATE_ERROR, bits.BG_JOB_STATE_TRANSIENT_ERROR): ! print "Error details:" ! err = job.GetError() ! self._print_error(err) job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) |
From: Mark H. <mha...@us...> - 2008-02-07 09:05:57
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4138 Modified Files: Tag: sidnei-bits PyIBackgroundCopyError.cpp Log Message: fixes/tweaks to the callback interface Index: PyIBackgroundCopyError.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyError.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** PyIBackgroundCopyError.cpp 7 Feb 2008 08:50:26 -0000 1.1.2.3 --- PyIBackgroundCopyError.cpp 7 Feb 2008 09:05:58 -0000 1.1.2.4 *************** *** 31,52 **** if ( pIBCE == NULL ) return NULL; - BG_ERROR_CONTEXT *pContext; - PyObject *obpContext; - HRESULT *pCode; - PyObject *obpCode; if ( !PyArg_ParseTuple(args, ":GetError") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCE->GetError( pContext, pCode ); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! Py_INCREF(Py_None); ! return Py_None; ! } --- 31,45 ---- if ( pIBCE == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetError") ) return NULL; HRESULT hr; + BG_ERROR_CONTEXT context; + HRESULT hr_err; PY_INTERFACE_PRECALL; ! hr = pIBCE->GetError( &context, &hr_err); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! return Py_BuildValue("lk", context, hr_err); } *************** *** 63,77 **** PY_INTERFACE_PRECALL; hr = pIBCE->GetFile( &pVal ); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError); ! PyObject *obpVal; ! ! obpVal = PyCom_PyObjectFromIUnknown(pVal, IID_IBackgroundCopyFile, FALSE); ! PyObject *pyretval = Py_BuildValue("O", obpVal); ! Py_XDECREF(obpVal); ! return pyretval; } --- 56,63 ---- PY_INTERFACE_PRECALL; hr = pIBCE->GetFile( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError); ! return PyCom_PyObjectFromIUnknown(pVal, IID_IBackgroundCopyFile, FALSE); } *************** *** 84,100 **** // @pyparm int|LanguageId||Description for LanguageId WCHAR *pErrorDescription; ! DWORD LanguageId; ! if ( !PyArg_ParseTuple(args, "l:GetErrorDescription", &LanguageId) ) return NULL; HRESULT hr; - PY_INTERFACE_PRECALL; hr = pIBCE->GetErrorDescription( LanguageId, &pErrorDescription ); PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); - PyObject *ret = PyString_FromUnicode(pErrorDescription); return ret; } --- 70,84 ---- // @pyparm int|LanguageId||Description for LanguageId WCHAR *pErrorDescription; ! DWORD LanguageId = 0; ! if ( !PyArg_ParseTuple(args, "|l:GetErrorDescription", &LanguageId) ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCE->GetErrorDescription( LanguageId, &pErrorDescription ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); PyObject *ret = PyString_FromUnicode(pErrorDescription); + CoTaskMemFree(pErrorDescription); return ret; } *************** *** 115,123 **** hr = pIBCE->GetErrorContextDescription( LanguageId, &pContextDescription ); PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); - PyObject *ret = PyString_FromUnicode(pContextDescription); return ret; } --- 99,106 ---- hr = pIBCE->GetErrorContextDescription( LanguageId, &pContextDescription ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); PyObject *ret = PyString_FromUnicode(pContextDescription); + CoTaskMemFree(pContextDescription); return ret; } *************** *** 135,145 **** PY_INTERFACE_PRECALL; hr = pIBCE->GetProtocol( &pProtocol ); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); - PyObject *ret = PyString_FromUnicode(pProtocol); return ret; } --- 118,126 ---- PY_INTERFACE_PRECALL; hr = pIBCE->GetProtocol( &pProtocol ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); PyObject *ret = PyString_FromUnicode(pProtocol); + CoTaskMemFree(pProtocol); return ret; } |
From: Mark H. <mha...@us...> - 2008-02-07 08:50:27
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27538 Modified Files: Tag: sidnei-bits PyIBackgroundCopyError.cpp Log Message: fix line endings. Index: PyIBackgroundCopyError.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyError.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIBackgroundCopyError.cpp 6 Feb 2008 09:10:25 -0000 1.1.2.2 --- PyIBackgroundCopyError.cpp 7 Feb 2008 08:50:26 -0000 1.1.2.3 *************** *** 1,162 **** ! // This file implements the IBackgroundCopyError Interface for Python. ! // Generated by makegw.py ! ! #include "bits_pch.h" ! #include "PyIBackgroundCopyError.h" ! ! // @doc - This file contains autoduck documentation ! // --------------------------------------------------- ! // ! // Interface Implementation ! ! PyIBackgroundCopyError::PyIBackgroundCopyError(IUnknown *pdisp): ! PyIUnknown(pdisp) ! { ! ob_type = &type; ! } ! ! PyIBackgroundCopyError::~PyIBackgroundCopyError() ! { ! } ! ! /* static */ IBackgroundCopyError *PyIBackgroundCopyError::GetI(PyObject *self) ! { ! return (IBackgroundCopyError *)PyIUnknown::GetI(self); ! } ! ! // @pymethod |PyIBackgroundCopyError|GetError|Description of GetError. ! PyObject *PyIBackgroundCopyError::GetError(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! BG_ERROR_CONTEXT *pContext; ! PyObject *obpContext; ! HRESULT *pCode; ! PyObject *obpCode; ! if ( !PyArg_ParseTuple(args, ":GetError") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetError( pContext, pCode ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! Py_INCREF(Py_None); ! return Py_None; ! ! } ! ! // @pymethod |PyIBackgroundCopyError|GetFile|Description of GetFile. ! PyObject *PyIBackgroundCopyError::GetFile(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! IBackgroundCopyFile *pVal; ! if ( !PyArg_ParseTuple(args, ":GetFile") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetFile( &pVal ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError); ! PyObject *obpVal; ! ! obpVal = PyCom_PyObjectFromIUnknown(pVal, IID_IBackgroundCopyFile, FALSE); ! PyObject *pyretval = Py_BuildValue("O", obpVal); ! Py_XDECREF(obpVal); ! return pyretval; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetErrorDescription|Description of GetErrorDescription. ! PyObject *PyIBackgroundCopyError::GetErrorDescription(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pErrorDescription; ! DWORD LanguageId; ! if ( !PyArg_ParseTuple(args, "l:GetErrorDescription", &LanguageId) ) ! return NULL; ! HRESULT hr; ! ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetErrorDescription( LanguageId, &pErrorDescription ); ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pErrorDescription); ! return ret; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetErrorContextDescription|Description of GetErrorContextDescription. ! PyObject *PyIBackgroundCopyError::GetErrorContextDescription(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pContextDescription; ! DWORD LanguageId; ! if ( !PyArg_ParseTuple(args, "l:GetErrorContextDescription", &LanguageId) ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetErrorContextDescription( LanguageId, &pContextDescription ); ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pContextDescription); ! return ret; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetProtocol|Description of GetProtocol. ! PyObject *PyIBackgroundCopyError::GetProtocol(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! WCHAR *pProtocol; ! if ( !PyArg_ParseTuple(args, ":GetProtocol") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetProtocol( &pProtocol ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pProtocol); ! return ret; ! } ! ! // @object PyIBackgroundCopyError|Description of the interface ! static struct PyMethodDef PyIBackgroundCopyError_methods[] = ! { ! { "GetError", PyIBackgroundCopyError::GetError, 1 }, // @pymeth GetError|Description of GetError ! { "GetFile", PyIBackgroundCopyError::GetFile, 1 }, // @pymeth GetFile|Description of GetFile ! { "GetErrorDescription", PyIBackgroundCopyError::GetErrorDescription, 1 }, // @pymeth GetErrorDescription|Description of GetErrorDescription ! { "GetErrorContextDescription", PyIBackgroundCopyError::GetErrorContextDescription, 1 }, // @pymeth GetErrorContextDescription|Description of GetErrorContextDescription ! { "GetProtocol", PyIBackgroundCopyError::GetProtocol, 1 }, // @pymeth GetProtocol|Description of GetProtocol ! { NULL } ! }; ! ! PyComTypeObject PyIBackgroundCopyError::type("PyIBackgroundCopyError", ! &PyIUnknown::type, ! sizeof(PyIBackgroundCopyError), ! PyIBackgroundCopyError_methods, ! GET_PYCOM_CTOR(PyIBackgroundCopyError)); --- 1,162 ---- ! // This file implements the IBackgroundCopyError Interface for Python. ! // Generated by makegw.py ! ! #include "bits_pch.h" ! #include "PyIBackgroundCopyError.h" ! ! // @doc - This file contains autoduck documentation ! // --------------------------------------------------- ! // ! // Interface Implementation ! ! PyIBackgroundCopyError::PyIBackgroundCopyError(IUnknown *pdisp): ! PyIUnknown(pdisp) ! { ! ob_type = &type; ! } ! ! PyIBackgroundCopyError::~PyIBackgroundCopyError() ! { ! } ! ! /* static */ IBackgroundCopyError *PyIBackgroundCopyError::GetI(PyObject *self) ! { ! return (IBackgroundCopyError *)PyIUnknown::GetI(self); ! } ! ! // @pymethod |PyIBackgroundCopyError|GetError|Description of GetError. ! PyObject *PyIBackgroundCopyError::GetError(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! BG_ERROR_CONTEXT *pContext; ! PyObject *obpContext; ! HRESULT *pCode; ! PyObject *obpCode; ! if ( !PyArg_ParseTuple(args, ":GetError") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetError( pContext, pCode ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! Py_INCREF(Py_None); ! return Py_None; ! ! } ! ! // @pymethod |PyIBackgroundCopyError|GetFile|Description of GetFile. ! PyObject *PyIBackgroundCopyError::GetFile(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! IBackgroundCopyFile *pVal; ! if ( !PyArg_ParseTuple(args, ":GetFile") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetFile( &pVal ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError); ! PyObject *obpVal; ! ! obpVal = PyCom_PyObjectFromIUnknown(pVal, IID_IBackgroundCopyFile, FALSE); ! PyObject *pyretval = Py_BuildValue("O", obpVal); ! Py_XDECREF(obpVal); ! return pyretval; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetErrorDescription|Description of GetErrorDescription. ! PyObject *PyIBackgroundCopyError::GetErrorDescription(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pErrorDescription; ! DWORD LanguageId; ! if ( !PyArg_ParseTuple(args, "l:GetErrorDescription", &LanguageId) ) ! return NULL; ! HRESULT hr; ! ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetErrorDescription( LanguageId, &pErrorDescription ); ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pErrorDescription); ! return ret; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetErrorContextDescription|Description of GetErrorContextDescription. ! PyObject *PyIBackgroundCopyError::GetErrorContextDescription(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! // @pyparm int|LanguageId||Description for LanguageId ! WCHAR *pContextDescription; ! DWORD LanguageId; ! if ( !PyArg_ParseTuple(args, "l:GetErrorContextDescription", &LanguageId) ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetErrorContextDescription( LanguageId, &pContextDescription ); ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pContextDescription); ! return ret; ! } ! ! // @pymethod |PyIBackgroundCopyError|GetProtocol|Description of GetProtocol. ! PyObject *PyIBackgroundCopyError::GetProtocol(PyObject *self, PyObject *args) ! { ! IBackgroundCopyError *pIBCE = GetI(self); ! if ( pIBCE == NULL ) ! return NULL; ! WCHAR *pProtocol; ! if ( !PyArg_ParseTuple(args, ":GetProtocol") ) ! return NULL; ! HRESULT hr; ! PY_INTERFACE_PRECALL; ! hr = pIBCE->GetProtocol( &pProtocol ); ! ! PY_INTERFACE_POSTCALL; ! ! if ( FAILED(hr) ) ! return PyCom_BuildPyException(hr, pIBCE, IID_IBackgroundCopyError ); ! ! PyObject *ret = PyString_FromUnicode(pProtocol); ! return ret; ! } ! ! // @object PyIBackgroundCopyError|Description of the interface ! static struct PyMethodDef PyIBackgroundCopyError_methods[] = ! { ! { "GetError", PyIBackgroundCopyError::GetError, 1 }, // @pymeth GetError|Description of GetError ! { "GetFile", PyIBackgroundCopyError::GetFile, 1 }, // @pymeth GetFile|Description of GetFile ! { "GetErrorDescription", PyIBackgroundCopyError::GetErrorDescription, 1 }, // @pymeth GetErrorDescription|Description of GetErrorDescription ! { "GetErrorContextDescription", PyIBackgroundCopyError::GetErrorContextDescription, 1 }, // @pymeth GetErrorContextDescription|Description of GetErrorContextDescription ! { "GetProtocol", PyIBackgroundCopyError::GetProtocol, 1 }, // @pymeth GetProtocol|Description of GetProtocol ! { NULL } ! }; ! ! PyComTypeObject PyIBackgroundCopyError::type("PyIBackgroundCopyError", ! &PyIUnknown::type, ! sizeof(PyIBackgroundCopyError), ! PyIBackgroundCopyError_methods, ! GET_PYCOM_CTOR(PyIBackgroundCopyError)); |
From: Mark H. <mha...@us...> - 2008-02-07 08:47:22
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23484 Modified Files: Tag: sidnei-bits test_bits.py Log Message: Use a simpler wrap Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** test_bits.py 7 Feb 2008 07:58:40 -0000 1.1.2.3 --- test_bits.py 7 Feb 2008 08:43:44 -0000 1.1.2.4 *************** *** 1,3 **** ! import win32com.server.policy import pythoncom, sys, os, time, win32api, win32event, tempfile from win32com.bits import bits --- 1,3 ---- ! from win32com.server.util import wrap import pythoncom, sys, os, time, win32api, win32event, tempfile from win32com.bits import bits *************** *** 16,26 **** bits.IID_IBackgroundCopyManager) ! class BackgroundJobCallback(win32com.server.policy.DesignatedWrapPolicy): _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] _public_methods_ = ["JobTransferred", "JobError", "JobModification"] - def __init__(self): - self._wrap_(self) - def JobTransferred(self, job): print 'Job Transferred', job --- 16,23 ---- bits.IID_IBackgroundCopyManager) ! class BackgroundJobCallback: _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] _public_methods_ = ["JobTransferred", "JobError", "JobModification"] def JobTransferred(self, job): print 'Job Transferred', job *************** *** 49,53 **** print job ! job.SetNotifyInterface(pythoncom.WrapObject(BackgroundJobCallback(), bits.IID_IBackgroundCopyCallback, pythoncom.IID_IUnknown)) job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | bits.BG_NOTIFY_JOB_ERROR | --- 46,50 ---- print job ! job.SetNotifyInterface(wrap(BackgroundJobCallback())) job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | bits.BG_NOTIFY_JOB_ERROR | |
From: Mark H. <mha...@us...> - 2008-02-07 08:01:39
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31073 Modified Files: Tag: sidnei-bits PyIBackgroundCopyFile.cpp PyIBackgroundCopyJob.cpp PyIBackgroundCopyJob.h PyIBackgroundCopyJob2.cpp PyIBackgroundCopyJob3.cpp bits.cpp bits_pch.h Log Message: Fix params for many methods. Index: PyIBackgroundCopyJob.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIBackgroundCopyJob.h 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIBackgroundCopyJob.h 7 Feb 2008 08:01:42 -0000 1.1.2.3 *************** *** 5,8 **** --- 5,10 ---- // Interface Declaration + #pragma once + #include "Bits.h" #include "PythonCOM.h" Index: PyIBackgroundCopyJob3.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob3.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIBackgroundCopyJob3.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIBackgroundCopyJob3.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.3 *************** *** 49,60 **** SysFreeString(OldPrefix); SysFreeString(NewPrefix); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! Py_INCREF(Py_None); ! return Py_None; ! } --- 49,56 ---- SysFreeString(OldPrefix); SysFreeString(NewPrefix); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! return PyInt_FromLong(hr); } *************** *** 67,73 **** // @pyparm <o unicode>|RemoteUrl||Description for RemoteUrl // @pyparm <o unicode>|LocalName||Description for LocalName - // @pyparm int|RangeCount||Description for RangeCount - // *** The input argument Ranges of type "BG_FILE_RANGE" was not processed *** - // Please check the conversion function is appropriate and exists! BG_FILE_RANGE *Ranges; PyObject *obRanges; --- 63,66 ---- *************** *** 77,87 **** LPWSTR RemoteUrl; LPWSTR LocalName; ! DWORD RangeCount; ! if ( !PyArg_ParseTuple(args, "OOlO:AddFileWithRanges", &obRemoteUrl, &obLocalName, &RangeCount, &obRanges) ) return NULL; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obRemoteUrl, &RemoteUrl)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obLocalName, &LocalName)) bPythonIsHappy = FALSE; ! if (bPythonIsHappy && !PyObject_AsBG_FILE_RANGE_LIST( obRanges, &Ranges )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; --- 70,80 ---- LPWSTR RemoteUrl; LPWSTR LocalName; ! if ( !PyArg_ParseTuple(args, "OOO:AddFileWithRanges", &obRemoteUrl, &obLocalName, &obRanges) ) return NULL; + DWORD RangeCount; BOOL bPythonIsHappy = TRUE; if (bPythonIsHappy && !PyWinObject_AsBstr(obRemoteUrl, &RemoteUrl)) bPythonIsHappy = FALSE; if (bPythonIsHappy && !PyWinObject_AsBstr(obLocalName, &LocalName)) bPythonIsHappy = FALSE; ! if (bPythonIsHappy && !PyObject_AsBG_FILE_RANGE_LIST( obRanges, &RangeCount, &Ranges )) bPythonIsHappy = FALSE; if (!bPythonIsHappy) return NULL; HRESULT hr; *************** *** 90,102 **** SysFreeString(RemoteUrl); SysFreeString(LocalName); ! PyObject_FreeBG_FILE_RANGE_LIST(Ranges); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! Py_INCREF(Py_None); ! return Py_None; ! } --- 83,91 ---- SysFreeString(RemoteUrl); SysFreeString(LocalName); ! PyObject_FreeBG_FILE_RANGE_LIST(RangeCount, Ranges); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! return PyInt_FromLong(hr); } *************** *** 114,125 **** PY_INTERFACE_PRECALL; hr = pIBCJ3->SetFileACLFlags( Flags ); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! Py_INCREF(Py_None); ! return Py_None; ! } --- 103,110 ---- PY_INTERFACE_PRECALL; hr = pIBCJ3->SetFileACLFlags( Flags ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! return PyInt_FromLong(hr); } *************** *** 130,151 **** if ( pIBCJ3 == NULL ) return NULL; - DWORD * Flags; - PyObject *obFlags; if ( !PyArg_ParseTuple(args, ":GetFileACLFlags") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ3->GetFileACLFlags( Flags ); ! PyObject_FreeDWORD(Flags); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! // *** The output argument Flags of type "DWORD *" was not processed *** ! // The type 'DWORD *' (Flags) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 115,128 ---- if ( pIBCJ3 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetFileACLFlags") ) return NULL; HRESULT hr; + DWORD Flags; PY_INTERFACE_PRECALL; ! hr = pIBCJ3->GetFileACLFlags( &Flags ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ3, IID_IBackgroundCopyJob3 ); ! return PyLong_FromUnsignedLongLong(Flags); } Index: bits_pch.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits_pch.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** bits_pch.h 7 Feb 2008 06:07:33 -0000 1.1.2.3 --- bits_pch.h 7 Feb 2008 08:01:42 -0000 1.1.2.4 *************** *** 5,80 **** #include <PythonCOM.h> ! BOOL PyObject_AsDWORD(PyObject *ob, DWORD *dw); ! void PyObject_FreeDWORD(DWORD *dw); ! ! BOOL PyObject_AsULONG(PyObject *ob, ULONG *ul); ! void PyObject_FreeULONG(ULONG *ul); ! ! BOOL PyObject_AsULONG_LIST(PyObject *ob, ULONG **ul); ! void PyObject_FreeULONG_LIST(ULONG *ul); ! ! BOOL PyObject_AsWCHAR_LIST(PyObject *ob, WCHAR **wch); ! void PyObject_FreeWCHAR_LIST(WCHAR *wch); ! ! BOOL PyObject_AsconstWCHAR_LIST(PyObject *ob, const WCHAR **wch); ! void PyObject_FreeconstWCHAR_LIST(const WCHAR *wch); ! ! BOOL PyObject_AsGUID(PyObject *ob, GUID *guid); ! void PyObject_FreeGUID(GUID *guid); ! ! BOOL PyObject_AsLPWSTR(PyObject *ob, LPWSTR *lpw); ! void PyObject_FreeLPWSTR(LPWSTR *lpw); ! ! BOOL PyObject_AsLPWSTR_LIST(PyObject *ob, LPWSTR **lpw); ! void PyObject_FreeLPWSTR_LIST(LPWSTR *lpw); ! ! BOOL PyObject_AsBG_FILE_INFO(PyObject *ob, BG_FILE_INFO *fi); ! void PyObject_FreeBG_FILE_INFO(BG_FILE_INFO *fi); ! ! BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, BG_FILE_INFO **fi); ! void PyObject_FreeBG_FILE_INFO_LIST(BG_FILE_INFO *fi); ! ! BOOL PyObject_AsBG_FILE_PROGRESS(PyObject *ob, BG_FILE_PROGRESS *fi); ! void PyObject_FreeBG_FILE_PROGRESS(BG_FILE_PROGRESS *fi); ! ! BOOL PyObject_AsBG_FILE_PROGRESS_LIST(PyObject *ob, BG_FILE_PROGRESS **fi); ! void PyObject_FreeBG_FILE_PROGRESS_LIST(BG_FILE_PROGRESS *fi); ! ! BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, BG_FILE_RANGE **fr); ! void PyObject_FreeBG_FILE_RANGE_LIST(BG_FILE_RANGE *fr); ! ! BOOL PyObject_AsBG_JOB_STATE(PyObject *ob, BG_JOB_STATE *js); ! void PyObject_FreeBG_JOB_STATE(BG_JOB_STATE *js); ! BOOL PyObject_AsBG_JOB_STATE_LIST(PyObject *ob, BG_JOB_STATE **js); ! void PyObject_FreeBG_JOB_STATE_LIST(BG_JOB_STATE *js); ! BOOL PyObject_AsBG_JOB_PROGRESS(PyObject *ob, BG_JOB_PROGRESS *jp); ! void PyObject_FreeBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp); ! BOOL PyObject_AsBG_JOB_PROGRESS_LIST(PyObject *ob, BG_JOB_PROGRESS **jp); ! void PyObject_FreeBG_JOB_PROGRESS_LIST(BG_JOB_PROGRESS *jp); BOOL PyObject_AsBG_JOB_TYPE(PyObject *ob, BG_JOB_TYPE *jt); void PyObject_FreeBG_JOB_TYPE(BG_JOB_TYPE *jt); - - BOOL PyObject_AsBG_JOB_TYPE_LIST(PyObject *ob, BG_JOB_TYPE **jt); - void PyObject_FreeBG_JOB_TYPE_LIST(BG_JOB_TYPE *jt); - - BOOL PyObject_AsBG_JOB_TIMES(PyObject *ob, BG_JOB_TIMES *jt); - void PyObject_FreeBG_JOB_TIMES(BG_JOB_TIMES *jt); - - BOOL PyObject_AsBG_JOB_TIMES_LIST(PyObject *ob, BG_JOB_TIMES **jt); - void PyObject_FreeBG_JOB_TIMES_LIST(BG_JOB_TIMES *jt); - - BOOL PyObject_AsBG_JOB_PRIORITY(PyObject *ob, BG_JOB_PRIORITY *jp); - void PyObject_FreeBG_JOB_PRIORITY(BG_JOB_PRIORITY jp); - - BOOL PyObject_AsBG_JOB_PRIORITY_LIST(PyObject *ob, BG_JOB_PRIORITY **jp); - void PyObject_FreeBG_JOB_PRIORITY_LIST(BG_JOB_PRIORITY *jp); - - BOOL PyObject_AsBG_JOB_PROXY_USAGE(PyObject *ob, BG_JOB_PROXY_USAGE *jp); - void PyObject_FreeBG_JOB_PROXY_USAGE(BG_JOB_PROXY_USAGE jp); - - BOOL PyObject_AsBG_JOB_PROXY_USAGE_LIST(PyObject *ob, BG_JOB_PROXY_USAGE **jp); - void PyObject_FreeBG_JOB_PROXY_USAGE_LIST(BG_JOB_PROXY_USAGE *jp); --- 5,21 ---- #include <PythonCOM.h> ! BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, ULONG *pnum, BG_FILE_INFO **fi); ! void PyObject_FreeBG_FILE_INFO_LIST(ULONG pnum, BG_FILE_INFO *fi); ! BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, DWORD *pnum, BG_FILE_RANGE **fr); ! void PyObject_FreeBG_FILE_RANGE_LIST(DWORD num, BG_FILE_RANGE *fr); ! PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp); ! PyObject *PyObject_FromBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp); ! PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs); ! PyObject *PyObject_FromBG_JOB_TIMES(BG_JOB_TIMES *jt); ! BOOL PyObject_AsBG_AUTH_CREDENTIALS(PyObject *ob, BG_AUTH_CREDENTIALS *pRet); BOOL PyObject_AsBG_JOB_TYPE(PyObject *ob, BG_JOB_TYPE *jt); void PyObject_FreeBG_JOB_TYPE(BG_JOB_TYPE *jt); Index: PyIBackgroundCopyJob.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** PyIBackgroundCopyJob.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.3 --- PyIBackgroundCopyJob.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.4 *************** *** 31,53 **** if ( pIBCJ == NULL ) return NULL; ! // @pyparm int|cFileCount||Description for cFileCount ! // *** The input argument pFileSet of type "BG_FILE_INFO *" was not processed *** ! // Please check the conversion function is appropriate and exists! ! BG_FILE_INFO *pFileSet; ! PyObject *obpFileSet; ! // @pyparm <o PyBG_FILE_INFO *>|pFileSet||Description for pFileSet ULONG cFileCount; ! if ( !PyArg_ParseTuple(args, "lO:AddFileSet", &cFileCount, &obpFileSet) ) [...1020 lines suppressed...] PY_INTERFACE_PRECALL; hr = pIBCJ->TakeOwnership( ); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! Py_INCREF(Py_None); ! return Py_None; } --- 674,681 ---- PY_INTERFACE_PRECALL; hr = pIBCJ->TakeOwnership( ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ, IID_IBackgroundCopyJob ); ! return PyInt_FromLong(hr); } Index: PyIBackgroundCopyJob2.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob2.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIBackgroundCopyJob2.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIBackgroundCopyJob2.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.3 *************** *** 49,60 **** SysFreeString(Program); SysFreeString(Parameters); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; - } --- 49,57 ---- *************** *** 65,91 **** if ( pIBCJ2 == NULL ) return NULL; - LPWSTR * pProgram; - PyObject *obpProgram; - LPWSTR * pParameters; - PyObject *obpParameters; if ( !PyArg_ParseTuple(args, ":GetNotifyCmdLine") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetNotifyCmdLine( pProgram, pParameters ); ! PyObject_FreeLPWSTR(pProgram); ! PyObject_FreeLPWSTR(pParameters); ! PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! // *** The output argument pProgram of type "LPWSTR *" was not processed *** ! // The type 'LPWSTR *' (pProgram) is unknown. ! // *** The output argument pParameters of type "LPWSTR *" was not processed *** ! // The type 'LPWSTR *' (pParameters) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 62,80 ---- if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetNotifyCmdLine") ) return NULL; + LPWSTR pProgram; + LPWSTR pParameters; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetNotifyCmdLine( &pProgram, &pParameters ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! PyObject *ret = Py_BuildValue("NN", PyWinObject_FromWCHAR(pProgram), PyWinObject_FromWCHAR(pParameters)); ! CoTaskMemFree(pProgram); ! CoTaskMemFree(pParameters); ! return ret; } *************** *** 96,118 **** if ( pIBCJ2 == NULL ) return NULL; - BG_JOB_REPLY_PROGRESS * pProgress; - PyObject *obpProgress; - // @pyparm <o PyBG_JOB_REPLY_PROGRESS *>|pProgress||Description for pProgress if ( !PyArg_ParseTuple(args, ":GetReplyProgress") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyProgress( pProgress ); ! // PyObject_FreeBG_JOB_REPLY_PROGRESS(pProgress); ! PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! // *** The output argument pProgress of type "BG_JOB_REPLY_PROGRESS *" was not processed *** ! // The type 'BG_JOB_REPLY_PROGRESS *' (pProgress) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 85,99 ---- if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetReplyProgress") ) return NULL; HRESULT hr; + BG_JOB_REPLY_PROGRESS progress; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyProgress( &progress ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! return PyObject_FromBG_JOB_REPLY_PROGRESS(&progress); } *************** *** 123,149 **** if ( pIBCJ2 == NULL ) return NULL; ! byte ** ppBuffer; ! PyObject *obppBuffer; ! UINT64 * pLength; ! PyObject *obpLength; if ( !PyArg_ParseTuple(args, ":GetReplyData") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyData( ppBuffer, pLength ); ! // PyObject_Freebyte(ppBuffer); ! // PyObject_FreeUINT64(pLength); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! // *** The output argument ppBuffer of type "byte **" was not processed *** ! // The type 'byte **' (ppBuffer) is unknown. ! // *** The output argument pLength of type "UINT64 *" was not processed *** ! // The type 'UINT64 *' (pLength) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 104,127 ---- if ( pIBCJ2 == NULL ) return NULL; ! byte *pBuffer; ! UINT64 length; if ( !PyArg_ParseTuple(args, ":GetReplyData") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyData( &pBuffer, &length ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! PyObject *ret; ! if (pBuffer == NULL) { ! ret = Py_None; ! Py_INCREF(ret); ! } else { ! // MS docs the max size is 1MB - so why use an int64? ! ret = PyString_FromStringAndSize((char *)pBuffer, (Py_ssize_t)length); ! CoTaskMemFree(pBuffer); ! } ! return ret; } *************** *** 159,172 **** if ( !PyArg_ParseTuple(args, "O:SetReplyFileName", &obReplyFileName) ) return NULL; ! BOOL bPythonIsHappy = TRUE; ! if (bPythonIsHappy && !PyWinObject_AsBstr(obReplyFileName, &ReplyFileName)) bPythonIsHappy = FALSE; ! if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->SetReplyFileName( ReplyFileName ); SysFreeString(ReplyFileName); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); --- 137,147 ---- if ( !PyArg_ParseTuple(args, "O:SetReplyFileName", &obReplyFileName) ) return NULL; ! if (!PyWinObject_AsBstr(obReplyFileName, &ReplyFileName)) ! return NULL; HRESULT hr; PY_INTERFACE_PRECALL; hr = pIBCJ2->SetReplyFileName( ReplyFileName ); SysFreeString(ReplyFileName); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); *************** *** 182,203 **** if ( pIBCJ2 == NULL ) return NULL; - LPWSTR * pReplyFileName; - PyObject *obpReplyFileName; if ( !PyArg_ParseTuple(args, ":GetReplyFileName") ) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyFileName( pReplyFileName ); ! PyObject_FreeLPWSTR(pReplyFileName); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! // *** The output argument pReplyFileName of type "LPWSTR *" was not processed *** ! // The type 'LPWSTR *' (pReplyFileName) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 157,172 ---- if ( pIBCJ2 == NULL ) return NULL; if ( !PyArg_ParseTuple(args, ":GetReplyFileName") ) return NULL; HRESULT hr; + WCHAR *rfn; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->GetReplyFileName(&rfn); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); ! PyObject *ret = PyWinObject_FromWCHAR(rfn); ! CoTaskMemFree(rfn); ! return ret; } *************** *** 208,225 **** if ( pIBCJ2 == NULL ) return NULL; ! if ( !PyArg_ParseTuple(args, ":SetCredentials") ) ! return NULL; ! BG_AUTH_CREDENTIALS *ac; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->SetCredentials(ac); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; - } --- 177,195 ---- if ( pIBCJ2 == NULL ) return NULL; ! // @pyparm <o BG_AUTH_CREDENTIALS>|creds||Description for creds ! PyObject *obCreds; ! if ( !PyArg_ParseTuple(args, "O:SetCredentials", &obCreds) ) ! return NULL; ! BG_AUTH_CREDENTIALS creds; ! if (!PyObject_AsBG_AUTH_CREDENTIALS(obCreds, &creds)) ! return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCJ2->SetCredentials(&creds); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCJ2, IID_IBackgroundCopyJob2 ); Py_INCREF(Py_None); return Py_None; } Index: bits.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/bits.cpp,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** bits.cpp 6 Feb 2008 09:10:25 -0000 1.1.2.3 --- bits.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.4 *************** *** 13,245 **** # include "PythonCOMRegister.h" ! BOOL PyObject_AsDWORD(PyObject *ob, DWORD *dw) ! { ! return FALSE; ! } ! ! void PyObject_FreeDWORD(DWORD *dw) ! { ! } ! ! BOOL PyObject_AsULONG(PyObject *ob, ULONG *ul) ! { ! return FALSE; ! } ! ! void PyObject_FreeULONG(ULONG *ul) ! { ! } ! ! BOOL PyObject_AsULONG_LIST(PyObject *ob, ULONG **ul) ! { ! return FALSE; ! } ! ! void PyObject_FreeULONG_LIST(ULONG *ul) ! { ! } ! ! BOOL PyObject_AsWCHAR_LIST(PyObject *ob, WCHAR **wch) ! { ! return FALSE; ! } ! ! void PyObject_FreeWCHAR_LIST(WCHAR *wch) ! { ! } ! ! BOOL PyObject_AsconstWCHAR_LIST(PyObject *ob, const WCHAR **wch) ! { ! return FALSE; ! } ! ! void PyObject_FreeconstWCHAR_LIST(const WCHAR *wch) ! { ! } ! ! BOOL PyObject_AsGUID(PyObject *ob, GUID *guid) ! { ! return FALSE; ! } ! ! void PyObject_FreeGUID(GUID *guid) ! { ! } ! ! BOOL PyObject_AsLPWSTR(PyObject *ob, LPWSTR *lpw) ! { ! return FALSE; ! } ! ! void PyObject_FreeLPWSTR(LPWSTR *lpw) ! { ! } ! ! BOOL PyObject_AsLPWSTR_LIST(PyObject *ob, LPWSTR **lpw) ! { ! return FALSE; ! } ! ! void PyObject_FreeLPWSTR_LIST(LPWSTR *lpw) ! { ! } ! ! BOOL PyObject_AsBG_FILE_INFO(PyObject *ob, BG_FILE_INFO *fi) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_FILE_INFO(BG_FILE_INFO *fi) ! { ! } ! ! BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, BG_FILE_INFO **fi) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_FILE_INFO_LIST(BG_FILE_INFO *fi) ! { ! } ! ! BOOL PyObject_AsBG_FILE_PROGRESS(PyObject *ob, BG_FILE_PROGRESS *fp) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) ! { ! } ! ! BOOL PyObject_AsBG_FILE_PROGRESS_LIST(PyObject *ob, BG_FILE_PROGRESS **fp) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_FILE_PROGRESS_LIST(BG_FILE_PROGRESS *fp) ! { ! } ! ! BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, BG_FILE_RANGE **fr) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_FILE_RANGE_LIST(BG_FILE_RANGE *fr) ! { ! } ! ! BOOL PyObject_AsBG_JOB_STATE(PyObject *ob, BG_JOB_STATE *js) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_JOB_STATE(BG_JOB_STATE *js) ! { ! } ! ! BOOL PyObject_AsBG_JOB_STATE_LIST(PyObject *ob, BG_JOB_STATE **js) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_JOB_STATE_LIST(BG_JOB_STATE *js) ! { ! } ! ! BOOL PyObject_AsBG_JOB_PROGRESS(PyObject *ob, BG_JOB_PROGRESS *jp) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp) ! { ! } ! ! BOOL PyObject_AsBG_JOB_PROGRESS_LIST(PyObject *ob, BG_JOB_PROGRESS **jp) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_JOB_PROGRESS_LIST(BG_JOB_PROGRESS *jp) ! { ! } ! ! ! BOOL PyObject_AsBG_JOB_TYPE(PyObject *ob, BG_JOB_TYPE *jt) { ! if (ob && !PyInt_Check(ob)){ return FALSE; - } - *jt = (BG_JOB_TYPE)PyInt_AsLong(ob); - return TRUE; - } - - void PyObject_FreeBG_JOB_TYPE(BG_JOB_TYPE *jt) - { } ! BOOL PyObject_AsBG_JOB_TYPE_LIST(PyObject *ob, BG_JOB_TYPE **jt) ! { ! return FALSE; ! } ! ! void PyObject_FreeBG_JOB_TYPE_LIST(BG_JOB_TYPE *jt) { } - BOOL PyObject_AsBG_JOB_TIMES(PyObject *ob, BG_JOB_TIMES *jt) - { - return FALSE; - } ! void PyObject_FreeBG_JOB_TIMES(BG_JOB_TIMES *jt) ! { ! } ! ! BOOL PyObject_AsBG_JOB_TIMES_LIST(PyObject *ob, BG_JOB_TIMES **jt) { ! return FALSE; } ! ! void PyObject_FreeBG_JOB_TIMES_LIST(BG_JOB_TIMES *jt) { } ! BOOL PyObject_AsBG_JOB_PRIORITY(PyObject *ob, BG_JOB_PRIORITY *jp) { ! return FALSE; } ! void PyObject_FreeBG_JOB_PRIORITY(BG_JOB_PRIORITY jp) { ! } - BOOL PyObject_AsBG_JOB_PRIORITY_LIST(PyObject *ob, BG_JOB_PRIORITY **jp) - { - return FALSE; } ! ! void PyObject_FreeBG_JOB_PRIORITY_LIST(BG_JOB_PRIORITY *jp) { } ! BOOL PyObject_AsBG_JOB_PROXY_USAGE(PyObject *ob, BG_JOB_PROXY_USAGE *jp) { ! return FALSE; } ! void PyObject_FreeBG_JOB_PROXY_USAGE(BG_JOB_PROXY_USAGE jp) { } - BOOL PyObject_AsBG_JOB_PROXY_USAGE_LIST(PyObject *ob, BG_JOB_PROXY_USAGE **jp) - { - return FALSE; - } - void PyObject_FreeBG_JOB_PROXY_USAGE_LIST(BG_JOB_PROXY_USAGE *jp) - { - } static struct PyMethodDef bits_methods[]= --- 13,64 ---- # include "PythonCOMRegister.h" ! BOOL PyObject_AsBG_FILE_INFO_LIST(PyObject *ob, ULONG *pnum, BG_FILE_INFO **fi) { ! PyErr_SetString(PyExc_NotImplementedError, "fix me"); return FALSE; } ! void PyObject_FreeBG_FILE_INFO_LIST(ULONG pnum, BG_FILE_INFO *fi) { } ! BOOL PyObject_AsBG_FILE_RANGE_LIST(PyObject *ob, DWORD *pnum, BG_FILE_RANGE **fr) { ! PyErr_SetString(PyExc_NotImplementedError, "fix me"); ! return FALSE; } ! void PyObject_FreeBG_FILE_RANGE_LIST(DWORD num, BG_FILE_RANGE *fr) { + } ! PyObject *PyObject_FromBG_FILE_PROGRESS(BG_FILE_PROGRESS *fp) { ! return Py_BuildValue("NNi", PyLong_FromLongLong(fp->BytesTotal), PyLong_FromLongLong(fp->BytesTransferred), fp->Completed); } ! PyObject *PyObject_FromBG_JOB_PROGRESS(BG_JOB_PROGRESS *jp) { ! return Py_BuildValue("NNkk", PyLong_FromLongLong(jp->BytesTotal), PyLong_FromLongLong(jp->BytesTransferred), jp->FilesTotal, jp->FilesTransferred); } ! PyObject *PyObject_FromBG_JOB_REPLY_PROGRESS(BG_JOB_REPLY_PROGRESS *jrs) { + return Py_BuildValue("NN", PyLong_FromLongLong(jrs->BytesTotal), PyLong_FromLongLong(jrs->BytesTransferred)); } ! PyObject *PyObject_FromBG_JOB_TIMES(BG_JOB_TIMES *jt) { ! return Py_BuildValue("NNN", PyWinObject_FromFILETIME(jt->CreationTime), PyWinObject_FromFILETIME(jt->ModificationTime), PyWinObject_FromFILETIME(jt->TransferCompletionTime)); } ! BOOL PyObject_AsBG_AUTH_CREDENTIALS(PyObject *ob, BG_AUTH_CREDENTIALS *pRet) { + PyErr_SetString(PyExc_NotImplementedError, "fix me"); + return FALSE; } static struct PyMethodDef bits_methods[]= Index: PyIBackgroundCopyFile.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyFile.cpp,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** PyIBackgroundCopyFile.cpp 7 Feb 2008 06:07:33 -0000 1.1.2.2 --- PyIBackgroundCopyFile.cpp 7 Feb 2008 08:01:42 -0000 1.1.2.3 *************** *** 37,48 **** PY_INTERFACE_PRECALL; hr = pIBCF->GetRemoteName( &pVal ); - // PyObject_FreeLPWSTR_LIST(pVal); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! ! return PyWinObject_FromWCHAR(pVal); } --- 37,46 ---- PY_INTERFACE_PRECALL; hr = pIBCF->GetRemoteName( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! PyObject *ret = PyWinObject_FromWCHAR(pVal); ! CoTaskMemFree(pVal); ! return ret; } *************** *** 59,69 **** PY_INTERFACE_PRECALL; hr = pIBCF->GetLocalName( &pVal ); - PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! ! return PyWinObject_FromWCHAR(pVal); } --- 57,66 ---- PY_INTERFACE_PRECALL; hr = pIBCF->GetLocalName( &pVal ); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! PyObject *ret = PyWinObject_FromWCHAR(pVal); ! CoTaskMemFree(pVal); ! return ret; } *************** *** 74,101 **** if ( pIBCF == NULL ) return NULL; ! // *** The input argument pVal of type "BG_FILE_PROGRESS *" was not processed *** ! // Please check the conversion function is appropriate and exists! ! BG_FILE_PROGRESS * pVal; ! PyObject *obpVal; ! // @pyparm <o PyBG_FILE_PROGRESS *>|pVal||Description for pVal ! if ( !PyArg_ParseTuple(args, "O:GetProgress", &obpVal) ) return NULL; - BOOL bPythonIsHappy = TRUE; - if (bPythonIsHappy && !PyObject_AsBG_FILE_PROGRESS_LIST( obpVal, &pVal )) bPythonIsHappy = FALSE; - if (!bPythonIsHappy) return NULL; HRESULT hr; PY_INTERFACE_PRECALL; ! hr = pIBCF->GetProgress( pVal ); ! PyObject_FreeBG_FILE_PROGRESS_LIST(pVal); ! PY_INTERFACE_POSTCALL; - if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! // *** The output argument pVal of type "BG_FILE_PROGRESS *" was not processed *** ! // The type 'BG_FILE_PROGRESS *' (pVal) is unknown. ! Py_INCREF(Py_None); ! return Py_None; ! } --- 71,84 ---- if ( pIBCF == NULL ) return NULL; ! if ( !PyArg_ParseTuple(args, ":GetProgress") ) return NULL; HRESULT hr; + BG_FILE_PROGRESS val; PY_INTERFACE_PRECALL; ! hr = pIBCF->GetProgress(&val); PY_INTERFACE_POSTCALL; if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIBCF, IID_IBackgroundCopyFile ); ! return PyObject_FromBG_FILE_PROGRESS(&val); } |
From: Mark H. <mha...@us...> - 2008-02-07 07:58:36
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29206 Modified Files: Tag: sidnei-bits test_bits.py Log Message: fix line ends. Index: test_bits.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** test_bits.py 6 Feb 2008 09:10:25 -0000 1.1.2.2 --- test_bits.py 7 Feb 2008 07:58:40 -0000 1.1.2.3 *************** *** 1,83 **** ! import win32com.server.policy ! import pythoncom, sys, os, time, win32api, win32event, tempfile ! from win32com.bits import bits ! ! TIMEOUT = 200 # ms ! StopEvent = win32event.CreateEvent(None, 0, 0, None) ! ! job_name = 'bits-pywin32-test' ! states = dict([(val, (name.split('_')[-1])) ! for name, val in vars(bits).items() ! if name.startswith('BG_JOB_STATE_')]) ! ! bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager, ! None, ! pythoncom.CLSCTX_LOCAL_SERVER, ! bits.IID_IBackgroundCopyManager) ! ! class BackgroundJobCallback(win32com.server.policy.DesignatedWrapPolicy): ! _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] ! _public_methods_ = ["JobTransferred", "JobError", "JobModification"] ! ! def __init__(self): ! self._wrap_(self) ! ! def JobTransferred(self, job): ! print 'Job Transferred', job ! job.Complete() ! win32event.SetEvent(StopEvent) # exit msg pump ! ! def JobError(self, job, error): ! print 'Job Error', job, error ! f = error.GetFile() ! print 'While downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() ! print 'The following error happened:' ! print error.GetErrorDescription(0) ! if f.GetRemoteName().endswith('missing-favicon.ico'): ! print 'Changing to point to correct file' ! f2 = f.QueryInterface(bits.IID_IBackgroundCopyFile2) ! f2.SetRemoteName(r'http://www.python.org/favicon.ico') ! job.Resume() ! else: ! job.Cancel() ! ! def JobModification(self, job, reserved): ! print 'Job Modification', job, states.get(job.GetState()) ! ! job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) ! print job ! ! job.SetNotifyInterface(pythoncom.WrapObject(BackgroundJobCallback(), bits.IID_IBackgroundCopyCallback, pythoncom.IID_IUnknown)) ! job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | ! bits.BG_NOTIFY_JOB_ERROR | ! bits.BG_NOTIFY_JOB_MODIFICATION) ! ! job.AddFile(r'http://www.python.org/favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-favicon.ico')) ! job.AddFile(r'http://www.non-existing.domain/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) ! ! # job.Suspend() ! ! enum = job.EnumFiles() ! while True: ! files = enum.Next() ! if not files: ! break ! for f in files: ! print 'Downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() ! ! job.Resume() ! ! while True: ! rc = win32event.MsgWaitForMultipleObjects( ! (StopEvent,), ! 0, ! TIMEOUT, ! win32event.QS_ALLEVENTS) ! ! if rc == win32event.WAIT_OBJECT_0: ! break ! elif rc == win32event.WAIT_OBJECT_0+1: ! if pythoncom.PumpWaitingMessages(): ! break # wm_quit --- 1,83 ---- ! import win32com.server.policy ! import pythoncom, sys, os, time, win32api, win32event, tempfile ! from win32com.bits import bits ! ! TIMEOUT = 200 # ms ! StopEvent = win32event.CreateEvent(None, 0, 0, None) ! ! job_name = 'bits-pywin32-test' ! states = dict([(val, (name.split('_')[-1])) ! for name, val in vars(bits).items() ! if name.startswith('BG_JOB_STATE_')]) ! ! bcm = pythoncom.CoCreateInstance(bits.CLSID_BackgroundCopyManager, ! None, ! pythoncom.CLSCTX_LOCAL_SERVER, ! bits.IID_IBackgroundCopyManager) ! ! class BackgroundJobCallback(win32com.server.policy.DesignatedWrapPolicy): ! _com_interfaces_ = [bits.IID_IBackgroundCopyCallback] ! _public_methods_ = ["JobTransferred", "JobError", "JobModification"] ! ! def __init__(self): ! self._wrap_(self) ! ! def JobTransferred(self, job): ! print 'Job Transferred', job ! job.Complete() ! win32event.SetEvent(StopEvent) # exit msg pump ! ! def JobError(self, job, error): ! print 'Job Error', job, error ! f = error.GetFile() ! print 'While downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() ! print 'The following error happened:' ! print error.GetErrorDescription(0) ! if f.GetRemoteName().endswith('missing-favicon.ico'): ! print 'Changing to point to correct file' ! f2 = f.QueryInterface(bits.IID_IBackgroundCopyFile2) ! f2.SetRemoteName(r'http://www.python.org/favicon.ico') ! job.Resume() ! else: ! job.Cancel() ! ! def JobModification(self, job, reserved): ! print 'Job Modification', job, states.get(job.GetState()) ! ! job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD) ! print job ! ! job.SetNotifyInterface(pythoncom.WrapObject(BackgroundJobCallback(), bits.IID_IBackgroundCopyCallback, pythoncom.IID_IUnknown)) ! job.SetNotifyFlags(bits.BG_NOTIFY_JOB_TRANSFERRED | ! bits.BG_NOTIFY_JOB_ERROR | ! bits.BG_NOTIFY_JOB_MODIFICATION) ! ! job.AddFile(r'http://www.python.org/favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-favicon.ico')) ! job.AddFile(r'http://www.non-existing.domain/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico')) ! ! # job.Suspend() ! ! enum = job.EnumFiles() ! while True: ! files = enum.Next() ! if not files: ! break ! for f in files: ! print 'Downloading', f.GetRemoteName() ! print 'To', f.GetLocalName() ! ! job.Resume() ! ! while True: ! rc = win32event.MsgWaitForMultipleObjects( ! (StopEvent,), ! 0, ! TIMEOUT, ! win32event.QS_ALLEVENTS) ! ! if rc == win32event.WAIT_OBJECT_0: ! break ! elif rc == win32event.WAIT_OBJECT_0+1: ! if pythoncom.PumpWaitingMessages(): ! break # wm_quit |
From: Mark H. <mha...@us...> - 2008-02-07 06:19:48
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3194 Modified Files: CHANGES.txt Log Message: Note service event handling changes Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** CHANGES.txt 7 Feb 2008 06:17:58 -0000 1.16 --- CHANGES.txt 7 Feb 2008 06:19:51 -0000 1.17 *************** *** 94,97 **** --- 94,99 ---- of a single string, which lost multiple dependencies (could break code, but old handling was insane) + - Allow for services to handle additional events and the data that comes + with them - see win32\demos\service\serviceEvents.py. * win32gui: |
From: Mark H. <mha...@us...> - 2008-02-07 06:17:55
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2272 Modified Files: CHANGES.txt Log Message: Note that win32com.shell includes Vista specific stuff. Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CHANGES.txt 7 Feb 2008 06:10:34 -0000 1.15 --- CHANGES.txt 7 Feb 2008 06:17:58 -0000 1.16 *************** *** 56,60 **** Sidnei da Silva from Enfold. * IsUserAnAdmin ! * More coverage of the shell interfaces and demos. * win32transaction: New module containing Kernel Transaction Manager (KTM) --- 56,61 ---- Sidnei da Silva from Enfold. * IsUserAnAdmin ! * More coverage of the shell interfaces and demos, including many Vista ! specific functions and interfaces (see win32comext\shell\demos) * win32transaction: New module containing Kernel Transaction Manager (KTM) |
From: Roger U. <ru...@us...> - 2008-02-07 06:10:31
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32008 Modified Files: CHANGES.txt Log Message: Note more new functions in win32api Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CHANGES.txt 15 Jan 2008 00:19:10 -0000 1.14 --- CHANGES.txt 7 Feb 2008 06:10:34 -0000 1.15 *************** *** 66,70 **** RegRestoreKey, RegCreateKeyEx, RegQueryInfoKeyW, RegEnumKeyExW, Get/SetSystemFileCacheSize, GlobalMemoryStatus, ! GlobalMemoryStatusEx, GetDllDirectory, SetDllDirectory - Fix memory leak in GetShortPathName --- 66,71 ---- RegRestoreKey, RegCreateKeyEx, RegQueryInfoKeyW, RegEnumKeyExW, Get/SetSystemFileCacheSize, GlobalMemoryStatus, ! GlobalMemoryStatusEx, GetDllDirectory, SetDllDirectory, ! RegDeleteKeyEx, RegOpenCurrentUser, RegOverridePredefKey - Fix memory leak in GetShortPathName |
From: Roger U. <ru...@us...> - 2008-02-07 06:07:59
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30985 Modified Files: RegCreateKeyTransacted.py Log Message: RegCreateKeyTransacted and RegDeleteKeyTransacted now combined with RegCreateKeyEx and RegDeleteKeyEx Index: RegCreateKeyTransacted.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/RegCreateKeyTransacted.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RegCreateKeyTransacted.py 5 Feb 2007 07:59:49 -0000 1.1 --- RegCreateKeyTransacted.py 7 Feb 2008 06:08:02 -0000 1.2 *************** *** 15,19 **** transacted_key=win32api.RegOpenKeyTransacted(Key=win32con.HKEY_CURRENT_USER, SubKey=keyname, Transaction=trans, samDesired=win32con.KEY_ALL_ACCESS) ! subkey, disp=win32api.RegCreateKeyTransacted(transacted_key, subkeyname, Transaction=trans, samDesired=win32con.KEY_ALL_ACCESS, Class=classname) --- 15,19 ---- transacted_key=win32api.RegOpenKeyTransacted(Key=win32con.HKEY_CURRENT_USER, SubKey=keyname, Transaction=trans, samDesired=win32con.KEY_ALL_ACCESS) ! subkey, disp=win32api.RegCreateKeyEx(transacted_key, subkeyname, Transaction=trans, samDesired=win32con.KEY_ALL_ACCESS, Class=classname) *************** *** 32,36 **** ## test transacted delete del_trans=win32transaction.CreateTransaction(Description='test RegDeleteKeyTransacted') ! win32api.RegDeleteKeyTransacted(key, subkeyname, Transaction=del_trans) ## subkey should still show up for non-transacted handle subkeys=[s[0] for s in win32api.RegEnumKeyExW(key)] --- 32,36 ---- ## test transacted delete del_trans=win32transaction.CreateTransaction(Description='test RegDeleteKeyTransacted') ! win32api.RegDeleteKeyEx(key, subkeyname, Transaction=del_trans) ## subkey should still show up for non-transacted handle subkeys=[s[0] for s in win32api.RegEnumKeyExW(key)] |
From: Mark H. <mha...@us...> - 2008-02-07 06:00:41
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28295 Modified Files: Tag: sidnei-bits PyIBackgroundCopyJob2.h Log Message: Fix line ends (was \r\r\n) Index: PyIBackgroundCopyJob2.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/Attic/PyIBackgroundCopyJob2.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** PyIBackgroundCopyJob2.h 6 Feb 2008 04:21:20 -0000 1.1.2.1 --- PyIBackgroundCopyJob2.h 7 Feb 2008 06:00:44 -0000 1.1.2.2 *************** *** 1,28 **** ! // This file declares the IBackgroundCopyJob2 Interface for Python. ! // Generated by makegw.py ! // --------------------------------------------------- ! // ! // Interface Declaration ! ! #include "Bits.h" ! ! class PyIBackgroundCopyJob2 : public PyIBackgroundCopyJob ! { ! public: ! MAKE_PYCOM_CTOR(PyIBackgroundCopyJob2); ! static IBackgroundCopyJob2 *GetI(PyObject *self); ! static PyComTypeObject type; ! ! // The Python methods ! static PyObject *SetNotifyCmdLine(PyObject *self, PyObject *args); ! static PyObject *GetNotifyCmdLine(PyObject *self, PyObject *args); ! static PyObject *GetReplyProgress(PyObject *self, PyObject *args); ! static PyObject *GetReplyData(PyObject *self, PyObject *args); ! static PyObject *SetReplyFileName(PyObject *self, PyObject *args); ! static PyObject *GetReplyFileName(PyObject *self, PyObject *args); ! static PyObject *SetCredentials(PyObject *self, PyObject *args); ! ! protected: ! PyIBackgroundCopyJob2(IUnknown *pdisp); ! ~PyIBackgroundCopyJob2(); ! }; --- 1,28 ---- ! // This file declares the IBackgroundCopyJob2 Interface for Python. ! // Generated by makegw.py ! // --------------------------------------------------- ! // ! // Interface Declaration ! ! #include "Bits.h" ! ! class PyIBackgroundCopyJob2 : public PyIBackgroundCopyJob ! { ! public: ! MAKE_PYCOM_CTOR(PyIBackgroundCopyJob2); ! static IBackgroundCopyJob2 *GetI(PyObject *self); ! static PyComTypeObject type; ! ! // The Python methods ! static PyObject *SetNotifyCmdLine(PyObject *self, PyObject *args); ! static PyObject *GetNotifyCmdLine(PyObject *self, PyObject *args); ! static PyObject *GetReplyProgress(PyObject *self, PyObject *args); ! static PyObject *GetReplyData(PyObject *self, PyObject *args); ! static PyObject *SetReplyFileName(PyObject *self, PyObject *args); ! static PyObject *GetReplyFileName(PyObject *self, PyObject *args); ! static PyObject *SetCredentials(PyObject *self, PyObject *args); ! ! protected: ! PyIBackgroundCopyJob2(IUnknown *pdisp); ! ~PyIBackgroundCopyJob2(); ! }; |
From: Mark H. <mha...@us...> - 2008-02-07 05:43:09
|
Update of /cvsroot/pywin32/pywin32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21814 Modified Files: setup.py Log Message: More adventures making things build with Vista SDKs and vc2008, plus changes for recent shell and propdesc changes. Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** setup.py 8 Jan 2008 00:41:03 -0000 1.64 --- setup.py 7 Feb 2008 05:43:13 -0000 1.65 *************** *** 1,3 **** ! build_id="210.5" # 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="210.9" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) *************** *** 49,57 **** To build 64bit versions of this: ! * Using VS2003 - these instructions are for cross-compiling on a 32bit ! environment. You must install the platform SDK with 64bit versions of ! the tools, then setup your environment with a command similar to: ! {sdk_dir}\SetEnv.Cmd /X64 /RETAIL then: --- 49,58 ---- To build 64bit versions of this: ! * py2.5 and earlier, using VS2003 and earlier: ! These instructions are for cross-compiling on a 32bit environment. ! You must install the platform SDK with 64bit versions of the tools, then ! setup your environment with a command similar to: ! {sdk_dir}\bin\SetEnv.Cmd /X64 /Release then: *************** *** 65,75 **** Now it starts getting wierd - we need to execute python.exe (32bit) to ! do the disutils build, but this build needs to find 64bit version of ! python.lib etc. The work-around for this is: * Extract a new Python source tree into a new directory * Build this tree using the 64bit instructions. ! * Set PYTHONHOME=c:\path_to_64bit_python ! * Execute: c:\path_to_32bit_python\python.exe setup.py build * un-set PYTHONHOME (set PYTHONHOME=) * Execute: c:\path_to_32bit_python_6\python.exe setup.py bdist_msi --skip-build --- 66,76 ---- Now it starts getting wierd - we need to execute python.exe (32bit) to ! do the distutils build, but this build needs to find 64bit version of ! python.lib etc. The work-around for this (on a 32 bit machine) is: * Extract a new Python source tree into a new directory * Build this tree using the 64bit instructions. ! * set PYTHONHOME=c:\path_to_64bit_python ! * Execute: c:\path_to_32bit_python\python.exe c:\path_to\pywin32\setup.py build * un-set PYTHONHOME (set PYTHONHOME=) * Execute: c:\path_to_32bit_python_6\python.exe setup.py bdist_msi --skip-build *************** *** 77,80 **** --- 78,84 ---- python 6 has not been released, you must use Python as built from the svn trunk] + [XXX - the above is a little wrong, as python 2.6 has moved to vs2008 and + the trunk currently builds to a different structure. This is still under + discussion on python-dev] (Note that these instructions will have clobbered your 32bit build of *************** *** 83,93 **** platforms so things don't get confused) ! * Using VS2005 natively in a 64bit environment: you must manually setup your ! compiler and SDK environment variables, then set the environment variables ! 'DISTUTILS_USE_SDK' and 'MSSdk' to any value before running setup. This ! will prevent distutils trying to sniff out the correct directories, which ! it generally fails to do these days... ! """ # Originally by Thomas Heller, started in 2000 or so. --- 87,95 ---- platforms so things don't get confused) + * py2.6 and later - tdb ! * Using VS2005 is not supported; either use the official py25 and earlier ! instructions for cross-compiling, or the new official py26+ instructions ! (using VS2008+) """ # Originally by Thomas Heller, started in 2000 or so. *************** *** 106,111 **** # when cross-compiling on a 32bit platform, the variable CPU reflects # the *target*. Distutil's get_build_architecture() still reports 'Intel' ! # in this environment - so we trust the CPU variable. def get_build_architecture(): try: return os.environ["CPU"] --- 108,120 ---- # when cross-compiling on a 32bit platform, the variable CPU reflects # the *target*. Distutil's get_build_architecture() still reports 'Intel' ! # in this environment - so we trust the CPU variable (or in Vista+ SDKs, ! # the TARGET_CPU variable) def get_build_architecture(): + # *sob* - Vista's SDK sets TARGET_CPU to 'x64' and doesn't set CPU at all + # presumably will need something similar for itanium + if os.environ.get("TARGET_CPU") == 'x64': + return "AMD64" + elif os.environ.get("TARGET_CPU") == 'x86': + return "Intel" try: return os.environ["CPU"] *************** *** 129,133 **** # want a distinction. # so we monkey-patch distutils :( We must do this before the main distutils ! # imports, which generall does 'from distutils.util import get_platform' # NOTE: Python 2.6 has the base get_platform() fixed - but there still # remains the cross-compile issue (ie, get_platform() needs to know the --- 138,142 ---- # want a distinction. # so we monkey-patch distutils :( We must do this before the main distutils ! # imports, which does 'from distutils.util import get_platform' # NOTE: Python 2.6 has the base get_platform() fixed - but there still # remains the cross-compile issue (ie, get_platform() needs to know the *************** *** 158,161 **** --- 167,176 ---- # py23 and earlier bdist_msi = None + try: + from distutils.msvccompiler import get_build_version + except ImportError: + # py22 + def get_build_version(): + return 6.0 from distutils.dep_util import newer_group, newer from distutils import dir_util, file_util *************** *** 308,311 **** --- 323,327 ---- optional_headers=[], base_address = None, + depends=None, ): assert dsp_file or sources, "Either dsp_file or sources must be specified" *************** *** 315,320 **** libraries=libraries.split() # VC2003 on x64 requires this library be explicitly linked... ! if is_64bit and msvccompiler.get_build_version() < 8.0: ! libraries.append('bufferoverflowU') extra_compile_args = (extra_compile_args or [])[:] # take copy --- 331,337 ---- libraries=libraries.split() # VC2003 on x64 requires this library be explicitly linked... ! # (well - apparently it used to :) Vista SDK fails if we do this... ! #if is_64bit and msvccompiler.get_build_version() < 8.0: ! # libraries.append('bufferoverflowU') extra_compile_args = (extra_compile_args or [])[:] # take copy *************** *** 356,359 **** --- 373,377 ---- extra_link_args, export_symbols) + self.depends = depends or [] # stash it here, as py22 doesn't have it. def parse_def_file(self, path): *************** *** 507,513 **** pass elif sdk_dir: extra = os.path.join(sdk_dir, 'include') if extra not in self.include_dirs and os.path.isdir(extra): ! self.include_dirs.insert(0, extra) extra = os.path.join(sdk_dir, 'lib') assert os.path.isdir(extra) --- 525,533 ---- pass elif sdk_dir: + # hrm - this should probably go down in build_ext with the + # other manipulation of the include/lib dirs... extra = os.path.join(sdk_dir, 'include') if extra not in self.include_dirs and os.path.isdir(extra): ! self.include_dirs.append(extra) extra = os.path.join(sdk_dir, 'lib') assert os.path.isdir(extra) *************** *** 534,551 **** include_dirs = self.compiler.include_dirs + \ os.environ.get("INCLUDE", "").split(os.pathsep) ! for d in include_dirs: ! look = os.path.join(d, "WINDOWS.H") ! if os.path.isfile(look): ! # read the fist 100 lines, looking for #define WINVER 0xNN ! reob = re.compile("#define\WWINVER\W(0x[0-9a-fA-F]+)") ! f = open(look, "r") ! for i in range(100): ! line = f.readline() ! match = reob.match(line) ! if match is not None: ! self.windows_h_version = int(match.group(1), 16) ! log.info("Found WINDOWS.H version 0x%x in %s" \ ! % (self.windows_h_version, d)) ! break if self.windows_h_version is not None: break --- 554,579 ---- include_dirs = self.compiler.include_dirs + \ os.environ.get("INCLUDE", "").split(os.pathsep) ! # new platform SDKs stick the version in sdkddkver.h ! for header in ('WINDOWS.H', 'SDKDDKVER.H'): ! for d in include_dirs: ! look = os.path.join(d, header) ! if os.path.isfile(look): ! # read the fist 100 lines, looking for #define WINVER 0xNN ! # (Vista SDKs now define this based on _WIN32_WINNT, ! # which should still be fine for old versions) ! reob = re.compile("#define\W*_WIN32_WINNT\W*(0x[0-9a-fA-F]+)") ! f = open(look, "r") ! for i in range(500): ! line = f.readline() ! match = reob.match(line) ! if match is not None: ! self.windows_h_version = int(match.group(1), 16) ! log.info("Found version 0x%x in %s" \ ! % (self.windows_h_version, look)) ! break ! else: ! log.debug("No version in %r - looking for another...", look) ! if self.windows_h_version is not None: ! break if self.windows_h_version is not None: break *************** *** 562,573 **** % (ext.windows_h_version, self.windows_h_version) - try: - get_msvc_paths = self.compiler.get_msvc_paths - except AttributeError: - # module method in early Python versions - get_msvc_paths = msvccompiler.get_msvc_paths look_dirs = self.include_dirs - if is_32bit: # don't sniff MSVC paths on x64 - get_msvc_paths("include") for h in ext.optional_headers: for d in look_dirs: --- 590,594 ---- *************** *** 623,627 **** makeargs.append("SUB_DIR_O=%s" % build_temp) makeargs.append("SUB_DIR_BIN=%s" % build_temp) ! if is_64bit and msvccompiler.get_build_version() < 8.0: makeargs.append("LINK=bufferoverflowU.lib") --- 644,648 ---- makeargs.append("SUB_DIR_O=%s" % build_temp) makeargs.append("SUB_DIR_BIN=%s" % build_temp) ! if is_64bit and get_build_version() < 8.0: makeargs.append("LINK=bufferoverflowU.lib") *************** *** 720,725 **** ext_filename = os.path.join(self.build_lib, self.get_ext_filename(fullname)) - if not hasattr(ext, "depends"): - ext.depends = [] # 2.2 doesn't have this depends = sources + ext.depends if not (self.force or newer_group(depends, ext_filename, 'newer')): --- 741,744 ---- *************** *** 825,837 **** if ext.pch_header: ext.extra_compile_args = ext.extra_compile_args or [] ! if is_32bit: ext.extra_compile_args.append("/YX"+ext.pch_header) pch_name = os.path.join(self.build_temp, ext.name) + ".pch" ext.extra_compile_args.append("/Fp"+pch_name) ! # if we are a verbose build, allow 64bit warnings (but not ! # when using VC6 - it doesn't understand that option. ! if self.distribution.verbose and sys.version_info > (2,4): ! ext.extra_compile_args.append("/Wp64") # some source files are compiled for different extensions --- 844,863 ---- if ext.pch_header: ext.extra_compile_args = ext.extra_compile_args or [] ! # /YX doesn't work in vs2008 ! if is_32bit and get_build_version() < 9.0: ext.extra_compile_args.append("/YX"+ext.pch_header) pch_name = os.path.join(self.build_temp, ext.name) + ".pch" ext.extra_compile_args.append("/Fp"+pch_name) ! # It gets uglier and uglier: {mssdk}/vc/include and /lib must ! # be stuck on the path. /include must get used for both cl.exe ! # and rc.exe, so its impossible to so here - so we do it in ! # _setup_compile() below. /lib can't be set there, so we do it ! # here. Will someone please put this out of its misery? ! # actually, we don't need this for 2.4+ (but I won't actually ! # kill 2.4- stuff yet.) ! if 0 and sdk_dir and get_build_version() < 9.0: ! if os.path.isdir(os.path.join(sdk_dir, 'VC', 'LIB')): ! ext.library_dirs.append(os.path.join(sdk_dir, 'VC', 'LIB')) # some source files are compiled for different extensions *************** *** 1172,1177 **** return self._items build = OnlyItems(items) return macros, objects, extra, pp_opts, build ! ################################################################ --- 1198,1217 ---- return self._items build = OnlyItems(items) + + # Vista SDKs have a 'VC' directory with headers and libs for older + # compilers. We need to hack the support in here so that the + # directories are after the compiler's own (where simply seeing + # ext.include_dirs means they end up before) and so they apply + # to the 'rc' executable (where tricks like ext.extra_compile_args + # don't work) + # We know its not needed on vs9... + if sdk_dir and get_build_version() < 9.0: + x = os.path.join(sdk_dir, 'VC', 'INCLUDE') + pp_opts.append("-I" + x.encode("mbcs")) + # *sob* - can't do the .lib dir here - see build_extension() + # above. + return macros, objects, extra, pp_opts, build ! ################################################################ *************** *** 1324,1327 **** --- 1364,1368 ---- dirs = { 'adsi' : 'com/win32comext/adsi/src', + 'propsys' : 'com/win32comext/propsys/src', 'shell' : 'com/win32comext/shell/src', 'axcontrol' : 'com/win32comext/axcontrol/src', *************** *** 1418,1427 **** --- 1459,1472 ---- %(shell)s/PyIAsyncOperation.cpp %(shell)s/PyIBrowserFrameOptions.cpp + %(shell)s/PyICategorizer.cpp + %(shell)s/PyICategoryProvider.cpp %(shell)s/PyIColumnProvider.cpp %(shell)s/PyIContextMenu.cpp %(shell)s/PyICopyHook.cpp + %(shell)s/PyIDefaultExtractIconInit.cpp %(shell)s/PyIDeskBand.cpp %(shell)s/PyIDockingWindow.cpp %(shell)s/PyIDropTargetHelper.cpp + %(shell)s/PyIEnumExplorerCommand.cpp %(shell)s/PyIEnumIDList.cpp %(shell)s/PyIEmptyVolumeCache.cpp *************** *** 1430,1433 **** --- 1475,1479 ---- %(shell)s/PyIExplorerBrowserEvents.cpp %(shell)s/PyIExplorerCommand.cpp + %(shell)s/PyIExplorerCommandProvider.cpp %(shell)s/PyIExtractIcon.cpp %(shell)s/PyIExtractIconW.cpp *************** *** 1435,1442 **** --- 1481,1490 ---- %(shell)s/PyIInputObject.cpp %(shell)s/PyIPersistFolder.cpp + %(shell)s/PyIPersistFolder2.cpp %(shell)s/PyIQueryAssociations.cpp %(shell)s/PyIShellBrowser.cpp %(shell)s/PyIShellExtInit.cpp %(shell)s/PyIShellFolder.cpp + %(shell)s/PyIShellFolder2.cpp %(shell)s/PyIShellIcon.cpp %(shell)s/PyIShellIconOverlay.cpp *************** *** 1453,1456 **** --- 1501,1510 ---- """ % dirs).split()), + WinExt_win32com('propsys', libraries='propsys', + sources=(""" + %(propsys)s/propsys.cpp + """ % dirs).split()), + + WinExt_win32com('taskscheduler', libraries='mstask', sources=(""" *************** *** 1476,1480 **** pythonwin_extensions = [ WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], ! pch_header="stdafx.h", base_address=dll_base_address), WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), --- 1530,1535 ---- pythonwin_extensions = [ WinExt_pythonwin("win32ui", extra_compile_args = ['-DBUILD_PYW'], ! pch_header="stdafx.h", base_address=dll_base_address, ! depends=["Pythonwin/stdafx.h", "Pythonwin/win32uiExt.h"]), WinExt_pythonwin("win32uiole", pch_header="stdafxole.h", windows_h_version = 0x500), *************** *** 1640,1643 **** --- 1695,1699 ---- 'win32comext.axdebug', + 'win32comext.propsys', 'win32comext.shell', 'win32comext.mapi', *************** *** 1749,1752 **** --- 1805,1809 ---- 'com/win32comext/axscript/Demos/*', 'com/win32comext/mapi/demos/*.py', + 'com/win32comext/propsys/test/*.py', 'com/win32comext/shell/test/*.py', 'com/win32comext/shell/demos/servers/*.py', |
From: Roger U. <ru...@us...> - 2008-02-07 05:42:03
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21416 Modified Files: win32apimodule.cpp Log Message: Add RegOverridePredefKey Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** win32apimodule.cpp 7 Feb 2008 03:27:36 -0000 1.82 --- win32apimodule.cpp 7 Feb 2008 05:42:06 -0000 1.83 *************** *** 83,86 **** --- 83,88 ---- typedef LONG (WINAPI *RegOpenCurrentUserfunc)(REGSAM,PHKEY); static RegOpenCurrentUserfunc pfnRegOpenCurrentUser = NULL; + typedef LONG (WINAPI *RegOverridePredefKeyfunc)(HKEY,HKEY); + static RegOverridePredefKeyfunc pfnRegOverridePredefKey = NULL; /* error helper */ *************** *** 3718,3721 **** --- 3720,3749 ---- } + // @pymethod |win32api|RegOverridePredefKey|Redirects one of the predefined keys to different key + // @pyseeapi RegOverridePredefKey + // @comm Requires Windows 2000 or later. + static PyObject *PyRegOverridePredefKey(PyObject *self, PyObject *args, PyObject *kwargs) + { + CHECK_PFN(RegOverridePredefKey); + HKEY predef_key, new_key; + PyObject *obpredef_key, *obnew_key; + long rc; + static char *keywords[]={"Key","NewKey", NULL}; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:RegOverridePredefKey", keywords, + &obpredef_key, // @pyparm <o PyHKEY>|Key||One of the predefined registry keys (win32con.HKEY_*) + &obnew_key)) // @pyparm <o PyHKEY>|NewKey||Registry key to which it will be redirected. Pass None to restore original key. + return NULL; + if (!PyWinObject_AsHKEY(obpredef_key, &predef_key)) + return NULL; + if (!PyWinObject_AsHKEY(obnew_key, &new_key)) + return NULL; + rc=(*pfnRegOverridePredefKey)(predef_key, new_key); + if (rc!=ERROR_SUCCESS) + return PyWin_SetAPIError("RegOverridePredefKey", rc); + Py_INCREF(Py_None); + return Py_None; + } + // @pymethod (int, int, long)|win32api|RegQueryInfoKey|Returns the number of // subkeys, the number of values a key has, *************** *** 6041,6044 **** --- 6069,6073 ---- {"RegOpenKeyEx", PyRegOpenKey, 1}, // @pymeth RegOpenKeyEx|Opens the specified key. {"RegOpenKeyTransacted",(PyCFunction)PyRegOpenKeyTransacted, METH_KEYWORDS|METH_VARARGS}, // @pymeth RegOpenKeyTransacted|Opens a registry key as part of a transaction. + {"RegOverridePredefKey",(PyCFunction)PyRegOverridePredefKey, METH_KEYWORDS|METH_VARARGS}, // @pymeth RegOverridePredefKey|Redirects one of the predefined keys to different key. {"RegQueryValue", PyRegQueryValue, 1}, // @pymeth RegQueryValue|Retrieves the value associated with the unnamed value for a specified key in the registry. {"RegQueryValueEx", PyRegQueryValueEx, 1}, // @pymeth RegQueryValueEx|Retrieves the type and data for a specified value name associated with an open registry key. *************** *** 6217,6220 **** --- 6246,6250 ---- pfnRegDeleteTree=(RegDeleteTreefunc)GetProcAddress(hmodule, "RegDeleteTreeW"); pfnRegOpenCurrentUser=(RegOpenCurrentUserfunc)GetProcAddress(hmodule, "RegOpenCurrentUser"); + pfnRegOverridePredefKey=(RegOverridePredefKeyfunc)GetProcAddress(hmodule, "RegOverridePredefKey"); } |