michael sorens wrote:
Quote:
(2) Do I need a Guid attribute on the class, the interface, and the assembly
to expose this for COM access? How do I choose a proper Guid for each? |
I have a managed class which implements two interfaces. Both of the
interfaces have their own GUID and the derived class also has a
different GUID. When you say "proper" I'm not sure what you mean, but
in VS2005 you just go to Tools, Create GUID, and use the Registry
Format, minus the {} braces.
I have an managed add-in working as an Excel UDF. It works fine on my
development system but it's not deploying properly - seems the Setup
Project doesn't include all of the registry entries, or maybe I need
to use regasm with the tlb, like you're doing. The difference between
my code and yours is that I have a COM shim between the Excel/COM
client and my code.
If you'd like to see my setup, I've written a series of blogs on the
topic - unfortunately after 6 articles I still don't have a successful
deployment, but there are a lot of good references for anyone who is
researching this area of interop. I've documented why shim's are
supposed to be helpful for COM interop (with references) and exactly
how to use the COM Shim Wizard from Microsoft (to the best of my
knowledge).
HTH
Tony
remove.mungeNebula-rnd.com/blog/tech/2007/12/excel-tools6.html
Please remove the anti-spam munge from the link.