Groups | Blog | Home
all groups > dotnet interop > september 2005 >

dotnet interop : referencing a .det component without a strong name from a vb6 app


Naim
9/20/2005 5:50:53 AM
hi,
we have a .net component that we want to call from a vb6 application.
The .net component doesn't have a strong name and we don't have the code
for the .net component.
Is there any way to call the .Net component from the vb6 application ?
or is it just impossible ?

regards



Kaustav.
9/21/2005 1:30:01 AM
Hi Naim,

AFAIK you will not be able to do a CCW with that assembly. Strong naming is
required for COM Interop to work. And if you would still wan't to do it, you
would have to reconstruct the assembly (am i hinting at decompilers :p) and
then proceed the usual way to create a CCW.


[quoted text, click to view]
TDC
9/22/2005 5:58:52 AM
No you don't have to strong name it. If you put the .NET component in
the same directory as you VB app, and then use RegAsm with the
/codebase option then you can access it fine.
Kaustav.
9/22/2005 7:06:06 AM
TDC is correct. It works. I was not aware of this. However you will get a
warning message for an unsigned assembly -

RegAsm warning: Registering an unsigned assembly with /codebase can cause
your assembly to interfere with other applications that may be installed on
the same computer. The /codebase switch is intended to be used only with
signed assemblies
.. Please give your assembly a strong name and re-register it.
Types registered successfully


[quoted text, click to view]
AddThis Social Bookmark Button