Hi,
I am new to comtypes as I have recently found myself wanting to implement
a low(ish) level COM interface, ISmartTagAction, and I thought I would try
it via comtypes rather than pythoncom and IDispatch (which is how I have
done everything else thus far).
I implemented the interface as per the documentation (comtypes) and
registered it. However, when I try and create an instance of it in
IPython, I get an error (-2147467259, 'Unspecified error', None, None). I
am not sure how much (if any) of the python files are loaded.
I don't get any error in Excel and Process Explorer seems to indicate
_ctypes.pyd being mapped in to Excel (so it looks like it is being loaded
but not working correctly .. which is fine but I want to learn how to
debug it). I have had sxs issues with loading dlls when running Python
'embedded' as certain extensions are not able to load the msvc runtime.
However, this does not appear to be the problem in this case (as I see the
DLL loaded)
I would love to know how _ctypes.pyd is being called to create the inproc
instance. Also, despite registering with debugging, I can't seem to find
any of the debugging output. Where does it go to?
pjjH
class Action(ISmartTagAction):
_reg_progid_ = "Foo.SmartTagAction"
_reg_clsctx_ = CLSCTX_LOCAL_SERVER | CLSCTX_INPROC_SERVER
_reg_clsid_ = "{066AAA1B-C2BE-490E-8308-BC80C701D4F5}"
_typelib_guid_ = '{9B92EB61-CBC1-11D3-8C2D-00A0CC37B591}'
_com_interfaces_ = ['ISmartTagAction']
_regcls_ = comtypes.server.localserver.REGCLS_MULTIPLEUSE
[HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{066AAA1B-C2BE-490E-8308-BC80C701D4F5}\InprocServer32]
@="C:\\Python26\\DLLs\\_ctypes.pyd"
"PythonClass"="action.Action"
"PythonPath"="C:\\work\\foo\\ext\\mostl"
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/comtypes-users