2007-08-08 Thomas Heller * Add better support for dynamic dispatch, comtypes.CoUninitialize function. Patch from Belyaev Dmitry. 2007-03-23 Thomas Heller * 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 * 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 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 * 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 * 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 * 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 * (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 * 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 '' in this case. 2006-12-20 Thomas Heller * 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 * 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 * 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 * 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 * 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 * 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 * 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 * Imported comtypes 0.2.1 into the python.org svn repository. 2006-04-25 Thomas Heller * Released version 0.2.1 (svn revision 8). 2006-03-07 Thomas Heller * Imported comtypes from the ctypes CVS repository into the comtypes SVN repository. 2006-03-03 Thomas Heller * (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 * Merged in lots of changes from the upstream version. Started localserver support. 2005-10-20 Thomas Heller * 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 * 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 * comtypes\GUID.py: Rename the GUID.progid() classmethod into GUID.as_progid(). 2005-09-02 Thomas Heller * comtypes\client\__init__.py: Can now receive events from custom, non-dispatch interfaces.