[pywin32-bugs] [ pywin32-Patches-3612570 ] Determine type of interface
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2013-05-06 01:13:55
|
Patches item #3612570, was opened at 2013-05-03 06:51 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3612570&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: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Stefan Schukat (sschukat) Assigned to: Nobody/Anonymous (nobody) Summary: Determine type of interface Initial Comment: If you are using dynamic dispatch you cannot determine the type of an interface in an easy way. This patch adds two methods which returns the name of the interface of an dynamic object. With this a basic type check could be done for an interface. ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2013-05-05 18:13 Message: I'm not that keen on this. In general, I don't see there is demand for these functions (eg, I don't recall ever seeing a mailing-list question asking how this might be done, there seems nothing in pywin32 itself which would want to use it, and I've never personally come across the need for it). Regarding the code itself: * New code should use pep8 * GetComIdentity() is a misleading name - the "identity" of a COM object is defined as the address of the pointer returned by a QI for IUnknown, so people familiar with COM will possibly be confused. GetDefaultInterfaceName would seem a better choice if this was to be implemented at all. * IsTypeOf() seems misleading - if I already have an object which has been QI'd to the non-default interface, it seems the function will return False when passed that interface name. If these make sense to your app/toolkit, they should probably be defined in your app/toolkit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551956&aid=3612570&group_id=78018 |