[continuing on answering my own questions in case someone else encounters this problem in the future]
So the answer to the logging question is that the logging output goes whereever you configure it to go to! I had a deep-rooted assumption (incorrect) that the diagnostic output was viewable with the windows trace tool in pythonwin (this is true for pythoncom aka win32com) logging.basicConfig(filename='C:/ftp/action.log',level=logging.DEBUG) logging.getLogger('.').setLevel(logging.DEBUG) The problem quickly reveals itself and it seems that my class is not implementing IUnknown. Traceback (most recent call last): File "C:\Python26\lib\site-packages\comtypes\_comobject.py", line 62, in call_with_this result = mth(*args, **kw) File "C:\Python26\lib\site-packages\comtypes\server\inprocserver.py", line 23, in IClassFactory_CreateInstance result = self._cls().IUnknown_QueryInterface(None, riid, ppv) AttributeError: 'Action' object has no attribute 'IUnknown_QueryInterface' I assume that I have messed up some of the attributes in my implmentation class. My assumption is that if I want to implement the ISmartTagAction from MSTAG.TLB ({9B92EB61-CBC1-11D3-8C2D-00A0CC37B591}), that I derive from comtypes.gen.SmartTagLib.ISmartTagAction and implement all the entry-points (cut and paste and uncomment from the code template in the comments of the file in comtypes.gen) Full diagnostic output (what a joy to have debug now!) appended. pjjH DEBUG:comtypes.server.inprocserver:insert path u'C:\\ftp' DEBUG:comtypes.server.inprocserver:modname: action_123, classname Action DEBUG:comtypes.server.inprocserver:Found class <class 'action_123.Action'> DEBUG:comtypes._comobject:<comtypes.server.inprocserver.ClassFactory object at 0x02791950>.QueryInterface({00000001-0000-0000-C000-0 00000000046}) -> S_OK DEBUG:comtypes._comobject:1 active COM objects: Added <comtypes.server.inprocserver.ClassFactory object at 0x02791950> DEBUG:comtypes._comobject:<comtypes.server.inprocserver.ClassFactory object at 0x02791950>.AddRef() -> 1 DEBUG:comtypes.server.inprocserver:DllGetClassObject() -> 0 DEBUG:comtypes.server.inprocserver:ClassFactory.CreateInstance({00020400-0000-0000-C000-000000000046}) ERROR:comtypes._comobject:Exception in IClassFactory.CreateInstance implementation: Traceback (most recent call last): File "C:\Python26\lib\site-packages\comtypes\_comobject.py", line 62, in call_with_this result = mth(*args, **kw) File "C:\Python26\lib\site-packages\comtypes\server\inprocserver.py", line 23, in IClassFactory_CreateInstance result = self._cls().IUnknown_QueryInterface(None, riid, ppv) AttributeError: 'Action' object has no attribute 'IUnknown_QueryInterface' DEBUG:comtypes:Release <POINTER(ICreateErrorInfo) ptr=0x443a4c at 279d170> DEBUG:comtypes._comobject:<comtypes.server.inprocserver.ClassFactory object at 0x02791950>.Release() -> 0 DEBUG:comtypes._comobject:0 active COM objects: Removed <comtypes.server.inprocserver.ClassFactory object at 0x02791950> DEBUG:comtypes._comobject:Remaining: [] DEBUG:comtypes:Calling CoUnititialize() DEBUG:comtypes:CoUnititialize() done. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users