comtypes 0.6.2 released

Thomas Heller theller at
Sat Jan 16 17:22:09 CET 2010

I'm happy to announce the 0.6.2 comtypes release:

Here are the release notes:

	comtypes 0.6.2 released.

Summary of important changes:

	- Several bug fixes for COM event handlers implemented in Python.

	- Allow typelib wrappers that (wrongly?) contain

	- DllCanUnloadNow() always returns S_FALSE in comtypes inproc
	COM servers.

	- The COM interfaces IViewObject, IViewObject2, and
	IViewObjectEx in the new module comtypes.viewobject.


Detailed changelog since version 0.6.0:

2010-01-15  Thomas Heller  <theller at>

	* Bumped version number to 0.6.2.

	* CoUninitialize() returns nothing, not HRESULT.

2009-12-22  Thomas Heller  <theller at>

	* Bug fixes for event handlers implemented in Python.

2009-12-11  Thomas Heller  <theller at>

	* 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

2009-11-26  Thomas Heller  <theller at>

	* Allow typelib wrappers that contain 'SAFEARRAY(VARIANT*)'
	parameter types to be imported.  Calling these methods will fail,

2009-11-13  Thomas Heller  <theller at>

	* To avoid a memory leak when PyInitialize()/PyUninitialize() are
	called several times, return S_FALSE from inproc server's

2009-11-05  Thomas Heller  <theller at>

	* 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\ When numpy is not installed, creating
	safearrays took a very long time.  This is fixed now.

	* comtypes\test\ New way to test COM client and
	server.  Work in progress.

2009-10-22  Thomas Heller  <theller at>

	* Support broken COM objects that provide IProvideClassInfo2, but
	not IProvideClassInfo (although the latter is derived from the
	former).  See

	* Fixed a regression from the 0.4 version, [out] parameters didn't
	accept pointers or arrays any longer. Thanks again to Michael

2009-10-19  Thomas Heller  <theller at>

	* Fix a memory leak in Python COM servers.  Thanks to Michael
	Eddington for the patch.

2009-10-02  Thomas Heller  <theller at>

	* comtypes\test\ Start a better approach to test
	both COM object calls and COM object implementations.

2009-09-09  Thomas Heller  <theller at>

	* 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 at>

	* CoTaskMemFree does not return a HRESULT.  Patch from James Teh.

2009-08-19  Thomas Heller  <theller at>

	* Bumped version number to 0.6.1.

2009-08-07  Thomas Heller  <theller at>

	* 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 at>

	* Added comtypes.CoGetClassObject() low-level function,
	comtypes.client.GetClassObject() high-level function, and
	implemented a pythonic interface to IClassFactory's CreateInstance

	    def CreateInstance(self,

	* 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 at>

	* 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 at>

	* Change version number in repository to

	* Replace the VARIANTEnumerator implementation class in
	comtypes.server.automation with a new one which should actually be

	* 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 at>

	* 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 at>

	* SAFEARRAYs can now also be created from multi-dimensional numpy

2009-04-23  Thomas Heller  <theller at>

	* Change version number in repository to

	* 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

	* 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 at>

	* 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 at>

	* Restore compatibility with Python 2.3.
	* comtypes\client\ Add missing 'import types' in



More information about the Python-announce-list mailing list