Boylan, Ross wrote:
I have a Python 3.7, 32 bit, COM server and am calling it from 32 bit Office 2010 in VBA. I am attempting to pass some COM objects from VBA to Python. The trace collector full output appears below, but I think the key clues are several messages likein <BSTImport.BSTImport object at 0x009F62F0>._QueryInterface_ with unsupported IID {00000003-0000-0000-C000-000000000046} ({00000003-0000-0000-C000-000000000046})
Those are not important. The COM framework is just probing to find out what extras you support. 00000003-etc is IMarshal and 0000001B-etc is IStandardMarshal; both can be used to help in the RPC process.
and, later, rst = fedb.OpenRecordset("foo") AttributeError: 'PyIDispatch' object has no attribute 'OpenRecordset'
You can't just pass an Access database object to another process and expect it to work. The support pieces aren't there. Thus, the crux of your problem is this:
_reg_progid_ = "Fahy.BST" # for unknown reasons the inprocess server isn't working _reg_clsctx_ = pythoncom.CLSCTX_LOCAL_SERVER
That's the problem you need to chase. You need to be an in-process server if you want to share state with the original code. What happens when you register yourself as in-process? Note that the registry has to look different for this.
-- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc.
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32