1 Star 0 Fork 0

yenmuse/comtypes

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CHANGES.txt 36.69 KB
一键复制 编辑 原始数据 按行查看 历史
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
Comtypes CHANGELOG
==================
Release 1.1.7
-------------
* Fix command ``pip install comtypes --no-cache-dir --target="C:\tmp"`` (issue #158).
Release 1.1.6
-------------
* Fix ``pip install comtypes`` error: "option --single-version-externally-managed
not recognized" (issue #155).
Release 1.1.5
-------------
* Fix using temp directory as a cache folder when it has no write permission.
Thanks to @kviktor, @totaam, @morganwillcock, @kongxinchi, @Chaoste
for their pull requests and patience.
* Revive ``clear_comtypes_cache.py`` and add it to post-install step.
* Fix hang in ``CreateObject`` for restricted user (#124).
Release 1.1.4
-------------
* Fix TypeError when gen folder is unwriteable and it is a
namespace package (#102). Thanks to @orf for the bug report. Thanks
to @jornb for the initial proposal demonstrating a workaround.
Release 1.1.3
-------------
* Fix SyntaxError caused by enums containing python keywords. Thanks to
@laripk for the fix and @janbrohl for the bug report.
Release 1.1.2
-------------
* Fix TypeError when interfaces return a single in-out result (#84). Thanks to
FranOis for the bug report and max-egger for suggesting the fix.
* Fix AttributeError when cleaning up safe arrays at shutdown (#83). Thanks to
mitaa for the bug report and fix.
* Fix 64-bit ULONG_PTR definition in typeinfo module (#82). Thanks to aparamon
for the bug report.
* Add POINTER(BSTR) to supported VARIANT types (#81). This allows the Esri
ArcObjects library to be loaded. Thanks to Matt Wilkie for the patch.
* Properly catch error when attempting to cache code to an unwritable
directory (#78). Thanks to Robin Dunn for the patch.
Release 1.1.1
-------------
* Fixed backwards-incompatible change where empty strings in VARIANTs were
being converted to NULL (#68). Thanks to shgohh for the bug report.
* Fixed npsupport module to fail gracefully when numpy is not present (#62).
Thanks to kyleMR for the patch.
* Fixed low-level property machinery in _comobject (#60).
* Fixed bug where numpy would be imported when using safe arrays (#59). Thanks
to Paul Moore (pfmoore) for submitting the bug and a patch.
* Fixed bug in patching machinery (#57). Thanks to Paul Moore (pfmoore) for
the patch.
* Various documentation cleanups.
Release 1.1.0
-------------
* Updated automation code to convert c_int64 and c_uint64 to their VT_I8 and
VT_UI8, respectively (#49).
* Update automation code to convert VT_DECIMAL VARIANT to Decimal type (#44).
* Fixed an undocumented bug that would lead to improper behavior when nesting
the ``safearray_as_ndarray`` context (#41).
* Added a license file and merged the ChangeLog into CHANGES.txt (#35, #39).
* Extended and homogenized indexing across container and named property
interfaces (#32, #43). This introduces the ability to index with an empty
slice, which has the same meaning as indexing with an empty tuple.
* Completed migration to ``patcher`` module (#31).
* Extended NumPy support so object and datetime64 arrays can be converted to
VARIANT safearrays (#29).
* Extended test runner so it can be run under 32- and 64-bit Python and be used
in an automated testing system (#25, #28).
* Modified many tests so they run under 64-bit python (#21, #22, #23).
* Removed reference cycle in PumpEvents (#19).
* Fixed safearray test that would fail under NumPy 1.6 (#19).
* Project migrated to http://github.com/enthought/comtypes. Issue numbers
refer to the new project page.
Release 1.0.0
-------------
* #27: Replaced the ``partial`` module with a ``patcher`` module. This new
technique patches the underlying classes explicitly. This technique avoids
the problems with the metaclass magic on Python 3.
* Officially dropped support for Python 2.5.
* #25: Allow installation on non-Windows systems.
* #31: Improved 64-bit compatibility by specifying argtypes for GetMessage.
Earlier Changes
---------------
2010-04-09 Thomas Heller <theller@python.net>
* comtypes.client.dynamic: Added _FlagAsMethod(*names) method
to the _Dispatch class.
This allows to flag these attribute names as being methods. Some
objects do not correctly differentiate methods and properties,
leading to problems when calling these methods.
2010-02-23 Thomas Heller <theller@python.net>
* pointers and byref() objects will now be stored in a VARIANT as
VT_BYREF type. This allows to call dispinterface methods with
BYREF arguments.
2010-01-21 Thomas Heller <theller@python.net>
* Add a __repr__ method to named_property and bound_named_property
object.
2010-01-15 Thomas Heller <theller@python.net>
* Bump version number to 0.6.3dev: development version.
2010-01-15 Thomas Heller <theller@python.net>
* Bumped version number to 0.6.2.
* CoUninitialize() returns nothing, not HRESULT.
2009-12-22 Thomas Heller <theller@python.net>
* Bug fixes for event handlers implemented in Python.
2009-12-11 Thomas Heller <theller@python.net>
* COM servers implemented in Python can now fire events; it did
not work in some cases.
* When an exception occurs in a COM event handler, a traceback is
printed.
2009-11-26 Thomas Heller <theller@python.net>
* Allow typelib wrappers that contain 'SAFEARRAY(VARIANT*)'
parameter types to be imported. Calling these methods will fail,
though.
2009-11-13 Thomas Heller <theller@python.net>
* To avoid a memory leak when PyInitialize()/PyUninitialize() are
called several times, return S_FALSE from inproc server's
DllCanUnloadNow().
2009-11-05 Thomas Heller <theller@python.net>
* COMObject subclasses can now implement a _final_release_()
method to free up resources, for example. This method is called
when the COM reference count reaches zero.
* Implement __hash__ method in dynamic dispatch classes. This
fixes a 'python -3' warning.
* comtypes\safearray.py: When numpy is not installed, creating
safearrays took a very long time. This is fixed now.
* comtypes\test\test_server.py: New way to test COM client and
server. Work in progress.
2009-10-22 Thomas Heller <theller@python.net>
* Support broken COM objects that provide IProvideClassInfo2, but
not IProvideClassInfo (although the latter is derived from the
former). See
http://sourceforge.net/tracker/index.php?func=detail&aid=2829887&group_id=115265&atid=692942
* Fixed a regression from the 0.4 version, [out] parameters didn't
accept pointers or arrays any longer. Thanks again to Michael
Eddington.
2009-10-19 Thomas Heller <theller@python.net>
* Fix a memory leak in Python COM servers. Thanks to Michael
Eddington for the patch.
2009-10-02 Thomas Heller <theller@python.net>
* comtypes\test\test_server.py: Start a better approach to test
both COM object calls and COM object implementations.
2009-09-09 Thomas Heller <theller@python.net>
* Fix returning SAFEARRAY of VT_RECORDs. Based on a patch from
Eduardo Arias.
* New module comtypes.viewobject, contains the interfaces
IViewObject, IViewObject2, IViewObjectEx. IAdviseSink is faked.
* Change version number to 0.6.2dev.
2009-09-04 Thomas Heller <theller@python.net>
* CoTaskMemFree does not return a HRESULT. Patch from James Teh.
2009-08-19 Thomas Heller <theller@python.net>
* Bumped version number to 0.6.1.
2009-08-07 Thomas Heller <theller@python.net>
* When an interface was specified in the call to
IClassObject.CreateInstance, return that instead of calling
GetBestInterface. Patch from James Teh.
2009-08-04 Thomas Heller <theller@python.net>
* Added comtypes.CoGetClassObject() low-level function,
comtypes.client.GetClassObject() high-level function, and
implemented a pythonic interface to IClassFactory's CreateInstance
method:
def CreateInstance(self,
punkouter=None,
interface=None,
dynamic=False)
* Added the 'dynamic=False' parameter to the
comtypes.client.CoGetObject and comtypes.client.GetActiveObject
functions. Suggested by James Teh.
2009-06-17 Thomas Heller <theller@python.net>
* comtypes.automation: Support VT_I8 and VT_UI8 SAFEARRAYs.
* comtypes._comobject: Restore compatibility with Python 2.3.
* Add the comtypes.IServiceProvider interface. Based on a patch
from Michael Curran.
2009-04-30 Thomas Heller <theller@python.net>
* Change version number in repository to 0.6.0.2dev.
* Replace the VARIANTEnumerator implementation class in
comtypes.server.automation with a new one which should actually be
usable.
* A completely new way how localserver and inproc server instances
are managed:
A comtypes.LocalServer or comtypes.InprocServer instance
is attached to the comtypes.COMObject class at runtime.
These changes keep localserver running as long as
COMObject instances are alive.
2009-04-29 Thomas Heller <theller@python.net>
* comtypes.errorinfo.ReportException now takes an additional
'stacklevel' named argument.
* Add E_OUTOFMEMORY hresult code.
* Register the InprocServer32 only when running as script or
py2exe dll, not when running as py2exe exe server.
2009-04-25 Thomas Heller <theller@python.net>
* SAFEARRAYs can now also be created from multi-dimensional numpy
arrays.
2009-04-23 Thomas Heller <theller@python.net>
* Change version number in repository to 0.6.0.1dev.
* SAFEARRAYs can now also be created from array.array objects, and
from (one-dimensional) numpy arrays. This is a lot faster than
creating them from Python lists or tuples, at least for large
arrays.
* ctypes instances like c_int, c_ubyte, and so on can now be
assigned to VARIANT().value. This allows to force creation of
VARIANTs with the corresponding typecodes V_I4, VT_UI1 and alike.
* Accept typelibs that contain SAFEARRAY(char).
2009-03-17 Thomas Heller <theller@python.net>
* Fixed the return type of ITypeLib::ReleaseTLibAttr, which is
documented wrongly in MSDN. The return type is void, not HRESULT.
Reported to cause crashes on Windows 7.
2009-01-29 Thomas Heller <theller@python.net>
* Restore compatibility with Python 2.3.
* comtypes\client\_code_cache.py: Add missing 'import types' in
comtypes\client\_code_cache.py.
2008-12-19 Thomas Heller <theller@python.net>
* Bumped version number to 0.6.0.
* comtypes.client.lazybind.Dipatch:
If __getitem__ fails the get the indexed default value, try
NewENUM. Implement __eq__ for Python 3 compatibility.
* Fix a problem with SAFEARRAYs where the contained data was
released too early.
* Fix property get handling for FUNC_PUREVIRTUAL functions in
lazybind.py
2008-12-18 Thomas Heller <theller@python.net>
* Fix memoryleak in IEnumVARIANT.
2008-12-12 Thomas Heller <theller@python.net>
* Merged changes from the dyndispatch branch:
* Add a comtypes.client.Constants class that provides a way to
access constants in the type library for an object, even when
no wrapper has been created for the type library. The
contants can be accessed as attributes like this, assuming
'obj' is a COM object that exposes type information at runtime
via the dispatch interface:
Constants(obj).MyConstant
* New comtypes.client.lazybind module.
* Implement NamedProperty.__call__(). Extend
NamedProperty.__getitem__() and NamedProperty.__setitem__() so
that they accept a tuple, which make lazy bound objects more
compatible with early bound objects.
* Finished (for now) the comtypes.client.lazybind module.
IEnumVARIANT instances get a _dynamic attribute which defaults
to False. The values returned from next() calls are retrived
by calling ._set_value(self._dynamic) on the VARIANT result.
* comtypes.client.dynamic:
* Started changes based on ideas from Michael Curran: better
dynamic dispatch support, and a way to disable the
time-consuming wrapper code generation on demand.
* comtypes\client: Add a new 'dynamic=False' parameter to the
CreateObject function. This parameter allows to create a
dynamic dispatch object, bypassing the code generation.
* comtypes\automation.py: Add a new parameter to the
VARIANT._get_value(dynamic=False) method. This allows to
retrieve the current value as a _Dispatch() instance if the
typecode is VT_DISPATCH, bypassing the code generation on the
result. The IDispatch.Invoke implementation now uses this to
ensure that dynamic objects are returned when possible.
* comtypes\client\dynamic.py: Implement _Dispatch.__eq__ so
that we can compare instances for equality.
2008-12-12 Thomas Heller <theller@python.net>
* Bumped version number to 0.5.3.
* Added VARIANT support for VT_I8 and VT_UI8 typecodes.
2008-12-11 Thomas Heller <theller@python.net>
* Workaround for Python bug: Python 3 cannot handle a distutils
installscript in the setup script
* Merged the py3-branch:
Various changes for py3 compatibility. The setup script now uses
distutils.command.build_py.build_py_2to3 when run with Python 3.x,
and converts the sources into py3 syntax on the fly (in the build
directory).
2008-11-26 Thomas Heller <theller@python.net>
* Added untested code to comtypes.server: RegisterActiveObject()
and RevokeActiveObject(), plus some flags.
* Applied a patch from Torbjørn Tyridal. This allows to
high-level implement methods in COM servers, and event handler
methods that have [in] and [out] arguments in mixed order.
2008-11-05 Thomas Heller <theller@python.net>
* Add the IPersistFile interface to the comtypes.persist module.
Add comtypes.shelllink module which contains IShellLinkA and
IShellLinkW interfaces, plus the ShellLink coclass.
2008-10-29 Thomas Heller <theller@python.net>
* Handle coclass pointers as arguments in com interface methods
correctly. Method calls will now accept pointers to the default
interface of this coclass.
* The Fire_Event() method in comtypes.server.connectionpoints now
returns a list of results.
2008-10-10 Thomas Heller <theller@python.net>
* Import cStringIO, which should always be available on Windows,
instead of first trying cStringIO and then StringIO.
* Python 2.6 compatibility: use 'types.MethodType' instead of
'new.instancemethod' to fix a -3 warning.
Use 'raise Exception(details)' instead of
'raise Exception, details'.
Don't use tuple unpacking in exception handlers:
'except COMError, err:
(hresult, text, details) = err'
instead of
'except COMError, (hresult, text, details)'
* Python 2.4 compatibility: os.stat() raises OSError instead of
WindowsError when a file is not found.
2008-09-19 Thomas Heller <theller@python.net>
* Bump version number to 0.5.3dev.
* Bump version number to 0.5.2.
Released comtypes-0.5.2.
* COMError nows prints the contained hresult in hex.
2008-09-18 Thomas Heller <theller@python.net>
* Changed the version-checking code that the code generator
creates. Reintroduced (sorry, Anthony!) the comparison of
timestamps, if both the typelib and the generated module are
files.
2008-09-10 Thomas Heller <theller@python.net>
* In comtypes\_comobject.py, Invoke: Named arguments passed to
COMObject.IDispatch_Invoke are now (hopefully!) unpacked
correctly. This should fix the order of parameters passed to MS
office (Word, Excel) and other (autocad?) event handlers.
2008-09-04 Thomas Heller <theller@python.net>
* Removed the code that compared the timestamps of Python wrapper
modules and type library files - this approach was totally broken.
Generated modules are out of date if they were created by the code
generator module with a different version number; the version
number is now checked when a module is imported.
The current mechanism also works correctly for generated modules
in frozen scripts.
Thanks to Anthony Tuininga.
2008-08-27 Thomas Heller <theller@python.net>
* Avoid double-free of BSTR strings under certain conditions.
* A NULL handler is now added to the comtypes logger; this
prevents messages like 'No handlers could be found for logger
"comtypes"' when an error message is logged and the logging module
is not configured.
https://sourceforge.net/tracker/index.php?func=detail&aid=2066024&group_id=115265&atid=692940
2008-08-20 Thomas Heller <theller@python.net>
* Changed the codegenerator to generate 'c_longlong' instead of
'c_float' for CURRENCY. This is not really correct since the
CURRENCY value is a fixed point integer scaled by a factor of
10000, but at least the code will not crash. Need a test case.
* comtypes.server.register: Add an optional 'executable' parameter
to Registrar.register(cls), can be used to override the executable
image name that comtypes detects itself. Patch by Michael
Robellard.
2008-08-15 Thomas Heller <theller@python.net>
* comtypes.client._find_gen_dir() improved (based on a patch and
helpful thoughts of Stefan Schukat): If comtypes.gen is not a
directory in the filesystem, or not writeable by users, a new
directory is created which will cache generated code. This could
be the case if comtypes is installed in a directory that has no
write permissions by the urrent user, if the comtypes package
resides in a zip-archive or a zipped egg, or if comtypes is used
in a py2exe'd script.
'%APPDATA%\<username>\Python\Python<XY>\comtypes_cache'
is used for a normal Python script, for a py2exe frozen executables
the directory will be
'%TEMP%\comtypes_cache\<imagebasename>-<XY>'
where <imagebasename> is the basename without extension of the
frozen executable image, and <XY> is the major and minor Python
version number, '25' for example.
This makes sure that generated modules will *always* cached in the
file system.
2008-08-13 Thomas Heller <theller@python.net>
* comtypes\automation.py: Allow this module to be imported on
Windows CE. Using safearrays on Windows CE will not work. I'm not
sure if they are used much.
2008-08-08 Thomas Heller <theller@python.net>
* Implement InterlockedIncrement and InterlockedDecrement for
win64.
2008-08-07 Thomas Heller <theller@python.net>
* Bump version number to 0.5.1
* comtypes\tools\codegenerator.py: Change the order of the
interfaces in the _com_interfaces_ and _outgoing_interfaces_ list
so that the default interface is the first one. This fixes the
bug that GetEvents() and ShowEvents() sometimes did use the wrong
event interface.
2008-08-06 Thomas Heller <theller@python.net>
* The repository was moved from python.org to sourceforge.net.
The svn trunk URL is now:
https://comtypes.svn.sourceforge.net/svnroot/comtypes/trunk
The script that extracted the repository is in
admin/extract_comtypes_repo. The repository structure and the
revision numbers have changed; the last revision on python.org is
rev 65336, this was imported as revision rev 355.
2008-07-18 Thomas Heller <theller@python.net>
* comtypes\test\find_memleak.py: Windows CE does not have
GetProcessMemoryInfo; disable the find_memleak function because it
cannot work.
* comtypes\client\_generate.py, comtypes\typeinfo.py: Windows CE
doesn't have QueryPathOfRegTypeLib - try to emulate it. Also it
doesn't use tha PATH environment variable; use a hardcoded search
path for type libraries.
* comtypes\test\runtests.py: Define a main() function.
2008-05-29 Thomas Heller <theller@python.net>
* Improved the [in, out] parameter workaround. These parameters
are now optional. Removed the special codegeneration for [in,
out] parameters in IEnumXXX.Next methods. Added test.
2008-05-16 Thomas Heller <theller@python.net>
* Provide a workaround for a bug in ctypes. This allows methods
using [in, out] parameters to correctly convert native Python
values.
* comtypes/tools/tlbparser.py: When GetRefTypeInfo(hreftype)
fails, emit a warning and generate a fake type instead.
2008-05-07 Thomas Heller <theller@python.net>
* Fixed the definition of VARIANT.empty and VARIANT.null; the
values were swapped.
https://sourceforge.net/tracker/?func=detail&atid=692940&aid=1959722&group_id=115265
2008-04-25 Thomas Heller <theller@python.net>
* Replace logger.info() calls with logger.debug() since it is more
appropriate.
In comtypes.server.connectionpoints, when a event notification
fails with an error indicating that the event sink is no longer
present, close the connection and log a warning.
The __repr__ of VARIANT changed again to make it a little bit shorter.
VARIANT instances of VT_BREF are NOT unpacked when the .value
attribute as accessed. The value instead can be got or set by
indexing, so the api is the same as for pointer instances:
print byref_var[0]
byref_var[0] = value
2008-04-17 Thomas Heller <theller@python.net>
* More changes merged from upstream svn 26400, add support for
implementing (non-dual) dispinterfaces (work in progress).
* Merge in a lot of changes from the private upstream repository
26394; mainly much better support for implementing comtypes
servers.
2008-04-09 Thomas Heller <theller@python.net>
* Bump version number to 0.4.3a
* Released version comtypes 0.4.2.
* comtypes.util: New module, containing the byref_at() and
cast_field() helper functions.
2008-04-07 Thomas Heller <theller@python.net>
* Fix the codegenerator to handle all kinds of IEnumXXX::Next
method signatures; the second and third parameters may be [out] or
[in, out].
2008-03-07 Thomas Heller <theller@python.net>
* Implemented support for SAFEARRAYs containing com interface
pointers.
2008-03-04 Thomas Heller <theller@python.net>
* Add comtypes.client.gen_dir to comtypes.gen.__path__ so that the
codegenerator can import its generated module(s).
2008-02-08 Thomas Heller <theller@python.net>
* Hacked support for 'open array' [out] parameters in COM methods.
These are arrays that have both size_is() and length_is() in IDL.
See the comments in comtypes\tools\codegenerator.py, search for
'OPENARRAY'.
2008-02-06 Thomas Heller <theller@python.net>
* The badly named comtypes.client.wrap function was renamed into
comtypes.client.GetBestInterface. For backwards compatibility the
old name stays as an alias.
* Replaced the comtypes.messageloop.add_filter(filter) function
with comtypes-messageloop.insert_filter(index, filter). This
allows to specify the order in which the filters are applied.
* Added a workaround for the buggy _ctypes.COMError in Python 2.5
and 2.51.
2007-12-19 Thomas Heller <theller@python.net>
* Bump version number to 0.4.2.
* Special methods (__iter__ and so on) did not work on
dispinterfaces, because the __map_case__ dictionary was not
populated.
2007-11-23 Thomas Heller <theller@python.net>
* Released version comtypes 0.4.1.
* Add a PumpEvents(timeout) function to comtypes.client. This
function calls the win32 CoWaitForMultipleHandles() function which
will wait in a way compatible with all types of apartments;
additionally this function can be interrupted with Control+C.
2007-11-21 Thomas Heller <theller@python.net>
* comtypes\__init__.py: Add docstrings to special methods. Make
named_property a data descriptor by providing a __set__ method
(which will raise AttributeError when called).
2007-11-15 Thomas Heller <theller@python.net>
* comtypes\__init__.py: Fix bound_named_property.__setitem__ so
that COM properties can be set that require zero or more than one
arguments.
* comtypes\__init__.py: Restructure the code that extend the COM
interface subclasses with __len__, __call__, __getitem__, and
__iter__ methods. This is done with the comtypes.partial module,
and apparently had strange behaviour when the code is run under a
debugger.
2007-11-07 Thomas Heller <theller@python.net>
* Changed version number to 0.4.1.
* Add an post-install script that will (after confirmation) remove
the comtypes\gen directory containing the generated modules.
2007-11-02 Thomas Heller <theller@python.net>
* Bump version number to 0.4.0.
Released version 0.4.0.
* In _wrap_coclass, attach a __clsid attribute to the returned
object. This allows, for example, to find outgoing interfaces when
a CoClass is returned from a COM method call.
2007-10-26 Thomas Heller <theller@python.net>
* Implemented property get, put, and putref with arguments
in comtypes.client.dynamic.
* When a COM property has both propput and propputref accessor
methods, the Python property fset methods determines the type of
the argument.
If the argument is a COM interface pointer, or a VARIANT
containing one, then propputref is called, otherwise proput is
called to set the property.
* Allow the creation of SAFEARRAY(UDT) types even if the UDT has
no _recordinfo_. Creating instances of these types will fail
however since no IRecordInfo pointer can be created. This change
allows to import typelib wrappers that have UDTs without guids.
2007-10-24 Thomas Heller <theller@python.net>
* When a COM property has a 'propputref' but no 'propput' accessor
method, use the former in the same way as a 'propput' would work.
When both 'propputref' and 'propput' are present, raise a
TypeError because we cannot handle this case for now.
* Fixed infinit recursion error in __getattr__ implementation.
* comtypes.dynamic._Dispatch now implements a __setattr__ methods
that will call to Invoke() with DISPATCH_PROPERTYPUT or
DISPATCH_PROPERTYPUTREF.
* Handle DISPATCH_PROPERTYPUTREF in IDispatch.Invoke
implementation.
* comtypes.dynamic._Dispatch objects can now be used as VARIANT
value.
2007-10-22 Thomas Heller <theller@python.net>
* The repr of a COM pointer instance now includes the pointer
value for easier debugging.
2007-10-17 Thomas Heller <theller@python.net>
* Disable the VT_UNKNOWN and VT_DISPATCH safearray codes, they do
not work yet.
* More multidimensional safearray tests, bug fixes.
* Speed up the unpacking of 1- and 2-dimensional safearrays.
* Lots of refatoring of the new SAFEARRAY code; added a docstring
to the public function comtypes.safearray._midlSAFEARRAY.
* For easier debugging, the repr of a VARIANT instance now
contains the vartype.
2007-10-16 Thomas Heller <theller@python.net>
* Changed version number to 0.3.4.
* Mega-patch: Completely rewritten safearray support. SAFERARRAYs
are now automatically converted to Python tuples when they are
received as [out] parameters in COM methods, and sequences are
accepted as SAFEARRAY [in] parameters. Multidimensional safearray
support still has to be added.
* VARIANTs can now also contain SAFEARRAYs. VARIANTs containing
SAFEARRAYs with a typecode other than VT_VARIANT, Python
array.array instances can be used.
* Added a comtypes.messageloop module that contains a simple
messageloop which allows to add and remove custom filter functions.
* Removed the comtypes.client.PumpWaitingMessages function.
* Fixed the codegenerator so that it handles unnamed method
parameters.
2007-10-04 Thomas Heller <theller@python.net>
* Several refactorings and a small bugfix from the upstream
repository.
* In the comtypes\gen\... type library wrappers, the code
generator now creates a commented out template that shows an
implementation for each interface it wraps.
2007-10-02 Thomas Heller <theller@python.net>
* comtypes.safearray.UnpackSafeArray can now unpack SAFEARRAYs
that containt UDT (user defined data types). Patch by Rimon Barr,
testcase by me.
2007-09-14 Thomas Heller <theller@python.net>
* Released version 0.3.3.
2007-09-12 Thomas Heller <theller@python.net>
* Bump version number to 0.3.3.
2007-09-03 Thomas Heller <theller@python.net>
* Add the partial module, which allows the usual class statement
syntax to attach methods to already existing classes.
* Use partial in comtypes.automation to attach methods to
POINTER(VARIANT).
2007-08-24 Thomas Heller <theller@python.net>
* Added a custom outgoing interface to TestComServer.idl.
Implemented IConnectionPointContainer in TestComServer.py.
* comtypes.server.automation: Fix the IProvideClassInfo2.GetGUID
implementation.
* comtypes.client: Fix ShowEvents(): COM methods must return a
HRESULT value, not None. Fix several NameErrors in the
PumpWaitingMessages function.
2007-08-14 Thomas Heller <theller@python.net>
* comtypes\tools\codegenerator.py: Generate the needed imports
when COM defaultvalues are used in parameter lists.
2007-08-10 Thomas Heller <theller@python.net>
* Add comtypes.client.PumpWaitingMessages() helper funtion. May
be used to dispatch COM events in single threaded appartments.
2007-08-09 Thomas Heller <theller@python.net>
* Added the IRecordInfo interface to comtypes.typeinfo.
* If UDTs (structures or unions) in a typelib have a GUID defined,
add a _recordinfo_ attribute to the generated code. This allows
to call GetRecordInfoFromGuids(*_recordinfo_) to get an
IRecordInfo pointer.
* Released comtypes-0.3.2
2007-08-08 Thomas Heller <theller@python.net>
* Add better support for dynamic dispatch, comtypes.CoUninitialize
function. Patch from Belyaev Dmitry.
2007-03-23 Thomas Heller <theller@python.net>
* Fixed: TextWrap did destroy the generated code when very long
symbol names used were in the type library.
* The IEnumVARIANT.Next(celt) method can now be called with
celt != 1. It will return a list of items then; this allows to get
more objects at a time.
2007-03-22 Thomas Heller <theller@python.net>
* In comtypes.hresult, add the hex HRESULT values in comments for
reference.
* In comtypes.errorinfo.ReportError, use the supplied hresult
value.
* Improved _NewEnum client-side handling.
* When a relative pathname to a type library is passed to
comtypes.client.GetModule(), the pathname is now interpreted
relative to the __file__ of the caller if this pathname actually
exists in the filesystem.
* Fixed several memory leaks and other problems in the BSTR
implementation. The previous change that requires ctypes version
1.0.2 was backed out again because it was the wrong approach.
2007-01-25 Thomas Heller <theller@python.net>
NOTE: This comment is no longer true, see above.
* Removed unneeded methods from comtypes.BSTR. The resource
management is handled by ctypes; this requires ctypes version
1.0.2 to correctly release BSTR resources.
2007-01-19 Thomas Heller <theller@python.net>
* The comtypes.test package is now self contained, it does no
longer depend on ctypes.test which may not be available.
2007-01-16 Thomas Heller <theller@python.net>
* comtypes.tools.tlbparser: Sort interface methods by VTable order
(there are typeinfos that list the methods in a different order).
2007-01-11 Thomas Heller <theller@python.net>
* comtypes codegenerator: Do not hardcode pointer and VARIANT size
and alignment. This fixes code generation issues on 64-bit
Windows.
* comtypes.automation: Fix size of VARIANT definition for 64-bit
Windows.
2007-01-10 Thomas Heller <theller@python.net>
* (Re-)Added comtypes.__version__ again, and set it to "0.3.2".
* Removed assert statements about sizeof() and alingment() of
generated Structure subclasses for portability to 64-bit Windows.
* Iterating over COM collections retrived the _NewEnum property
twice.
* Cleaned up the codegeneration. Generated modules now have a
'typelib_path' variable that points to the type library used to
generate them, 'CoClass' subclasses have '_typelib_path_' which is
used for registration.
2007-01-02 Thomas Heller <theller@python.net>
* comtypes\client\_generate.py: Make sure that generated modules
have a __file__ attribute, even if gen_dir is None. The filename
part of the __file__ attribute is '<memory>' in this case.
2006-12-20 Thomas Heller <theller@python.net>
* comtypes.client.GetModule now recreates the Python module
automatically if the type library file timestamp is newer than the
module. The actual code for GetModule now lives in a separate
module comtypes.client._generate, but the GetModule symbol is
still exposed from comtypes.client.
* COM method implementations are now found doing case insensitive
lookup if the interfaces "_case_insensitivity_" attribute is True.
* Some memory leaks with BSTR have been fixed.
2006-12-13 Thomas Heller <theller@python.net>
* Fix the case insensitivity for COM interfaces (client-side only,
so far): If the Python interface class has a "_case_insensitive_"
attribute which is True, access of methods and properties is case
insensitive.
By default, this attribute is set to True in interfaces generated
from type libraries, because type libraries generally don't
preserve the casing of identifiers from IDL interface definitions.
2006-12-06 Thomas Heller <theller@python.net>
* Fix comtypes.test.test_typeinfo to work when either IE6 or IE7
is installed.
* comtypes.hresult: Add MAKE_HRESULT and HRESULT_FROM_WIN32
functions which return HRESULT values.
* Receive events from the event interface plus all the super
interfaces.
* When a NULL IDispatch pointer is received as an [out] parameter,
return None instead of the NULL pointer.
* Changed the way COM is shut down. No longer a need to call the
possibly expensive (or dangerous?) _is_com_initialized.
2006-11-15 Thomas Heller <theller@python.net>
* comtypes.client._events.GetEvents: Catch the exception when
IProvideClassInfo::GetGUID fails, and try the next strategy for
finding the outgoing interface.
* comtypes now has a __version__ attribute. This is set to
"0.3.1". Added test command to the setup script.
* New function comtypes.client.ShowEvents(source, interface=None).
This function is useful for debugging; it connects the source
object to a special event receiver that will first print out all
the event names, and later print out the events as they occur.
2006-08-04 Thomas Heller <theller@python.net>
* Fixed quite some tests to work or be skipped on Windows CE.
* comtypes\typesinfo.py: Added ICreateTypeLib2 interface, and
changed the CreateTypeLib function to return a pointer to that
interface.
* Added a COM server for testing to the comtypes.test package,
plus tests for it. There are still several memory leaks in
comtypes, as the tests show.
2006-08-03 Thomas Heller <theller@python.net>
* comtypes\server\register.py: For localserver, the wrong script
was registered when the class was not in a toplevel module.
2006-08-02 Thomas Heller <theller@python.net>
* Version number changed to 0.3.0, added 'comtypes.server' package
to the setup script.
* Merged in a LOT of changes from the upstream version.
For details see the svn commit messages.
The most prominent changes are:
- The strings returned by ITypeInfo::GetDocumentation() do not
contain NUL characters any more (some buggy typelibs contain them)
- comtypes.client.GetEvents returns a 'connection object', which
will UnAdvise the connection when deleted. In other words, you
must keep the return value of the GetEvents call as long as you
want to reveive events.
- Pointer to COM interface pointer instances __setitem__ method manages
the COM refcount correctly.
- Changes in the COM shutdown code: maybe the win32com way of
never calling CoUninitialize() is the best compromise ;-), but I
have not yet given up.
2006-07-11 Thomas Heller <theller@python.net>
* Imported comtypes 0.2.1 into the python.org svn repository.
2006-04-25 Thomas Heller <theller@python.net>
* Released version 0.2.1 (svn revision 8).
2006-03-07 Thomas Heller <theller@python.net>
* Imported comtypes from the ctypes CVS repository into the
comtypes SVN repository.
2006-03-03 Thomas Heller <theller@python.net>
* (Repository): Move the code generator modules into the
comtypes.tools package. Should be refactored later - most
important is now that it works again.
2006-02-11 Thomas Heller <theller@python.net>
* Merged in lots of changes from the upstream version. Started
localserver support.
2005-10-20 Thomas Heller <theller@python.net>
* comtypes\__init__.py: Add logging for easier debugging. Add
COINIT_... flags. Use the value of sys.coinit_flags (when
defined) in the call to CoInitializeEx, this allows to use
multithreaded appartments.
Clean up the lifetime management of implemented COM objects. Make
COM attribute access case insensitive (has a large impact on the
performance, unfortunately).
Move the COMObject definition in a separate module
comtypes\_comobject.py.
* comtypes\tools\codegenerator.py: Don't generate dispid() for
non-dispatch based interfaces.
* comtypes\client\__init__.py: Add logging for easier debugging.
* comtypes\persist.py: Remove dispid() from non-dispatch based
interfaces. Correct the Read method. Hack around the
POINTER(c_wchar) <-> c_wchar_p problem.
2005-10-11 Thomas Heller <theller@python.net>
* comtypes\client\__init__.py: Renamed CreateModule() into
GetModule(). Removed the 'modulename' parameter from all the
function calls - the typelib wrapper alias name is now taken from
the typelib library name. Suggestions from Bruce Dodson.
2005-09-29 Thomas Heller <theller@python.net>
* comtypes\GUID.py: Rename the GUID.progid() classmethod into
GUID.as_progid().
2005-09-02 Thomas Heller <theller@python.net>
* comtypes\client\__init__.py: Can now receive events from custom,
non-dispatch interfaces.
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/yenmuse/comtypes.git
git@gitee.com:yenmuse/comtypes.git
yenmuse
comtypes
comtypes
master

搜索帮助