问题描述
我不是在谈论从C#各地调用COM VBA ...其他的方式!
I'm not talking about calling a VBA COM from C#... the other way around!
我想要做的就是调用在MS Access使用VBA一个C#库没有注册DLL。我一直在玩弄并排侧互操作了一段时间没有成功,它终于发生,我认为一个mdb.manifest可能不是一个exe.manifest(可接受的替代可能是显而易见的,我知道,但我试着保持乐观)。
What I would like to do is call a C# library using VBA in MS Access without registering the DLL. I've been playing around with side-by-side interop for a while without success and it has finally occurred to me that a mdb.manifest is probably not an acceptable replacement for an exe.manifest (probably obvious, I know, but I was trying to be optimistic).
我的问题:是否有可能得到VBA加载并排侧COM组件
My question: Is it possible to get VBA to load a side-by-side COM component?
或者,是否有另一种方式使用访问未注册的C#库?
Or, is there another way to use an unregistered C# library in Access?
(你问之前,我的理由是:绝对没有办法,我将被授予访问我的客户端的Windows注册表 - 这就是为什么它被写在首位访问和,我将需要实现相同。在C#应用程序的功能,并很快不想做两次)。
(Before you ask, my reasons are: there is absolutely no way I will be granted access to my client's Windows registry -- that's why it was written in Access in the first place. And, I will need to implement the same functionality in a C# application soon and rather not do it twice).
推荐答案
您不必自己使用的SxS exe文件,血散是的。
如果你能导入相关的Win32调用到VBA(你可以),那么你可以使用的加载您的清单文件。
You don't have to own the exe to use SxS, SxS is another word for Activation Context.If you can import the relevant win32 calls into vba (and you can), then you can use the activation context api to load your manifest file.
更多关于这个问题的一些例子可以发现。
More on the subject and some examples can be found here.
这篇关于侧并排COM互操作与C#和VBA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!