Samjog
Samjog

Reputation: 31

Call a .net dll from VB

whether .net framework required to run a .tlb file generated from c#?

Upvotes: 0

Views: 334

Answers (2)

Frederik Gheysels
Frederik Gheysels

Reputation: 56934

You have to:

  • make sure the classes that you want to use in your VB app are ComVisible
  • make sure the classes that you want to use in your VB app have a Guid assigned to it
  • it is best practice to create an interface for those classes
  • create a tlb file from the assembly using regasm
  • The .NET framework (runtime) needs to be installed. It is not that regasm will 'compile' your assembly into another language or something that does not need the .NET runtime. A runtime callable wrapper is created, so that you can invoke the .NET assembly as from VB6, which means the .NET runtime is still required.

Upvotes: 1

TheVillageIdiot
TheVillageIdiot

Reputation: 40497

In VB.Net you can use it normally. In previous version use Runtime Callable Wrapper. More information is here in this KB article.

Upvotes: 0

Related Questions