Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with COM interop

Status
Not open for further replies.

jonnyknowsbest

Technical User
Feb 3, 2004
163
GB
I am trying to create a C# dll for use with a VBA project. I have my class and have created an interface to be exposed to COM. The class has a single method i want to expose, but with 2 constructors. THe interface looks like this:

[Guid("A92226CF-99D4-4bcd-9F9A-7AB1EE95B0FC")]

[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]

public interface _SignedRequestHelper
{
[DispId(1)]
string Sign(IDictionary<string, string> request);

[DispId(2)]
string Sign(string queryString);

}

The project is set to register for com interop and i have created the tlb using regasm. I have then added the reference in my VBA, but I cannot access any of the DLL types.

Any ideas where im going wrong?

Cheers
 
Hi Jonny.

Are all the classes you want to use public?
Is the dll installed into the Gac? If yes uninstall all of the dlls from this project from the GAC. Rebuild the VBA project (should error) and then reinstall the c# dll back into the GAC.


I use com everyday in VB projects but not VBA. I assume they are the same though . . .

Can your VBA project see the dll?

Age is a consequence of experience
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top