HOT TO Use Tlb In VB.NET DLL ?

T

Tiraman

Hi ,

I have a tlb which i m using in VB6 and i would like to keep using it in
VB.NET

how can I import it or reference it to my Dll ?

Best Regards ,

Tiraman ;-)
 
G

Gary Chang

Hi Tiraman,

Currently I am looking for somebody who could help you on it. We will reply
here with more information as soon as possible.
If you have any more concerns on it, please feel free to post here.


Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
P

Peter Huang

Hi Tiraman,

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to use the tlb file in
VB.NET.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I think we can add reference to the tlb file directly just as we do with
the COM dll in IDE.(You may just browse to the tlb in the Add reference
dialog)
Also we can use the tlbimp.exe tool to achieve our aim, which is used by
the VS.NET IDE.

Type Library Importer (Tlbimp.exe)
The Type Library Importer converts the type definitions found within a COM
type library into equivalent definitions in a common language runtime
assembly. The output of Tlbimp.exe is a binary file (an assembly) that
contains runtime metadata for the types defined within the original type
library. You can examine this file with tools such as Ildasm.exe.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
l/cpgrftypelibraryimportertlbimpexe.asp

Please apply my suggestion above and let me know if it helps resolve your
problem.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
T

Tiraman

Hi Peter ,

10x for your response .
your article helped me a lot .

i tried to use the reference tot he tlb file and it work fine .
i also tried to convert the tlb file to assembly file and this was good 2
:)

which solution is better?

10x
 
P

Peter Huang

Hi Tiraman,

As I said, VS.NET IDE will do the same thing as the tlbimp did. So in
nature the two solutions are the same to some extent. But I think if we do
it with IDE will save you the time to input the commmand line usually. :)
Also the tlbimp tool will give you more flexible approach to generate the
RCW(Runtime Callable Wrapper)

Runtime Callable Wrapper
ms-help://MS.MSDNQTR.2004APR.1033/cpguide/html/cpconRuntimeCallableWrapper.h
tm


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top