[pywin32-bugs] [ pywin32-Patches-3519768 ] Allow multiple type libraries
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2012-04-20 09:08:17
|
Patches item #3519768, was opened at 2012-04-20 02:08 Message generated for change (Tracker Item Submitted) made by stelzbock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3519768&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: YanXu (stelzbock) Assigned to: Nobody/Anonymous (nobody) Summary: Allow multiple type libraries Initial Comment: As explained in my post to the python-win32 mailing list ("How to write a COM Server implementing interfaces from type lib?"), I have patched the policy.py to support multiple type libraries. This should work in parralel to the exisisting one-type-lib feature. Using the changed version, a new attribute can be used in the COM implementation class called "_typelib_interfaces_". This attributes is expected to be a list tuplse of the library CLSID string, the major and minor version, the LCID and a list of Interface strings. Here is an example I used in my server: class OPCServer(): (...some other attributes...) _typelib_interfaces_ = [ ("{3B540B51-0378-4551-ADCC-EA9B104302BF}", 3, 0, 0, [ 'IOPCServer', 'IOPCItemProperties', ] ), ("{B28EEDB1-AC6F-11D1-84D5-00608CB8A7E9}", 1, 0, 0, [ 'IOPCCommon', 'IConnectionPointContainer' ] ) ] Actually, the patch includes some comment that say "PATCH START". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3519768&group_id=78018 |