0

I have registered a type library on a server (server 1) using REGASM. The type library allows me to use code in a VB.NET DLL from a VB6 application.

Ideally the VB.NET DLL needs to access code in another VB.NET project on another server (server 2). I have added the DLL of VB.NET project 2 as a reference in Visual Studio, which has project 1 open. This works ok.

If a VB6 has a reference to a type library to use VB.NET code, then can the VB.NET project use code in another VB.NET applications that are registered in the Global Assembly Cache that is registered on the same PC?

w0051977
  • 15,099
  • 32
  • 152
  • 329

1 Answers1

1

If a VB6 has a reference to a type library to use VB.NET code, then can the VB.NET project use code in another VB.NET applications that are registered in the Global Assembly Cache that is registered on the same PC?

Yes, this should work exactly as if the VB.Net assembly was used in any other program. It is perfectly acceptable for a .NET assembly being used via COM to use other assemblies - in fact, they always do, as the framework is, itself, just other assemblies on the system.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • Thanks. This is exactly what I thought. Could you provide a brief description of exactly what is contained in the Type Library or provide a link to a web page that does? Also is there anything I should be aware of with regards to variable sizes etc e.g. an integer in VB6 is 16 bit and in VB.NET is 32 bit. – w0051977 Jul 10 '12 at 16:49
  • @w0051977 The type library contains whatever is flagged `ComVisible` - see http://www.codeproject.com/Articles/3511/Exposing-NET-Components-to-COM – Reed Copsey Jul 10 '12 at 19:13