C# dll with InterOp

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,
Using VS 2005, i created a class lib using C#. i compiled this as a
dll with the "Register for Com Interop" Option checked.

In microsoft access, i am able to create the classes in that dll and
call the methods. HOWEVER, i am unable to invoke code complete on the
objects in that dll. WHeni look at Object browser, it shows the
objects, but not their methods. the methods are declared as public in
the source.

any ideas why this might be happening
 
What is also interesting about this is that when i try to unregister the dll,
i get a message that states "...dll was loaded, but the DllUnregisterServer
entry point was not found".

anyone have any idea why?
 
So does this mean that the dlls created usning C# and VS with the "Register
for Com Interop" switch on do not create "real" COM style dlls, with the
DLLRegister and DLLUnRegister entry points? If so, does this mean i would
not be able to use these dlls in older apps, such as those written in VB5 or
6?

where is Regasm.exe?

thanks
 
So does this mean that the dlls created usning C# and VS with the "Register
for Com Interop" switch on do not create "real" COM style dlls, with the
DLLRegister and DLLUnRegister entry points?

Yes you're right. Registration is handled by Regasm (or the
corresponding APIs in the class library), and instantiation
(DllGetClassObject) is handled by Mscoree.dll.

If so, does this mean i would
not be able to use these dlls in older apps, such as those written in VB5 or
6?

No you can still use them from classic VB clients.

where is Regasm.exe?

In the framework directory, %WINDIR%\Microsoft.NET\Framework\vX.Y.ZZZZ



Mattias
 
Back
Top