Questions tagged [tlbimp]

The Type Library Importer is a Microsoft tool that converts the type definitions found within a COM type library into equivalent definitions in a common language runtime assembly.

The output of the Type Library Importer (tlbimp.exe) is a binary file (an assembly) that contains runtime metadata for the types defined within the original type library.

COM type definitions usually reside in a type library. In contrast, CLS-compliant compilers produce type metadata in an assembly. The two sources of type information are quite different. The Type Library Importer is used for generating metadata from a type library. The resulting assembly is called an interop assembly, and the type information it contains enables .NET Framework applications to use COM types.

More information is availabe on MSDN, including a guide on how to use it.

91 questions
4
votes
1 answer

Loading and using a type Library (.tlb) at runtime

I have a .tlb file, which exposes, via COM, functions of a C# DLL. I wish to load this .tlb at runtime and use the functions within my native project. While I can load the library by using LoadTypeLib function, I am not sure how the ITypeLib…
user1173240
  • 1,455
  • 2
  • 23
  • 50
4
votes
0 answers

Blank method in the type library C#

I have an .exe assembly with a class like [Guid("2D9EBA5F-7E4A-418B-B151-4E703AEDF396")] public interface MyInterface { int MyMethod(); } [GuidAttribute("D26278EA-A7D0-4580-A48F-353D1E455E50"), ProgIdAttribute("My_prog"), ComVisible(true),…
AndrewR
  • 592
  • 2
  • 6
  • 20
4
votes
1 answer

How can interop dll be easily updated?

Assume that we have a .NET project in VS 2005 (VB .Net). This project uses non-GUI COM object. When I add the reference to this object, VS creates interop dll. But I add new methods to COM object in another project. How can I update interop dll…
ilya
  • 1,103
  • 14
  • 36
4
votes
0 answers

Why would tlbimp convert interfaces to coclasses?

It's in fact a feature that in most cases tlbimp will convert an interface to a coclass. Specifically if in IDL I have interface IFirst { } interface ISecond { HRESULT GetFirst( IFirst** ); } coclass First { interface IFirst; } then tlbimp…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
4
votes
2 answers

TLBIMP.EXE - Error TI0000 - *.dll is not a valid type library

While building our project on the Build Server, the compilation fails with the error message: TlbImp: error TI0000 : The input file 'C:\*.dll' is not a valid type library. We tried to manually invoke the TlbImp command thru the VS2005 Command…
Ian
  • 5,625
  • 11
  • 57
  • 93
3
votes
1 answer

Where is the Wrapper Assembly Key File setting in VS 2008?

I'm trying to build an application that is strongly named. It is referencing a COM interop library that I add via the Add References dialog. It's been a while, but I seem to recall that in older versions of visual studio, there was a project…
Howard Pinsley
  • 11,300
  • 15
  • 49
  • 66
3
votes
2 answers

Referencing a COM assembly in Visual Studio vs converting a COM assembly via tlbimp.exe

When I import a COM assembly (dll) in to a Visual Studio project by adding it as a reference I can use the generated equivalent common language runtime assembly without issue. However if I try and convert the same COM assembly into a common language…
Fraser
  • 15,275
  • 8
  • 53
  • 104
3
votes
0 answers

"The type library importer could not convert the signature for the member" warning in a trivial setup

Observe this most trivial IDL file: import "unknwn.idl"; typedef struct _MyStruct { DWORD len; [size_is(len)] BYTE *buffer; } MyStruct; [ object, uuid(903C11E8-46A0-4E6E-B54C-6619B6A42CCB), pointer_default(unique) ] interface…
mark
  • 59,016
  • 79
  • 296
  • 580
3
votes
2 answers

What happens between the .NET interop layer and COM?

I am using COM in my C# .NET project. However one of the methods I call is not acting as expected. So I am curious to see what is happening between my .NET code, the Interop layer and COM. I know the tlbimp.exe generates the metadata wrapper for the…
shane87
  • 3,090
  • 12
  • 51
  • 65
3
votes
1 answer

Manually generate ActiveX wrapper after TLBIMP-ed dlls?

I have several ActiveX components that needed to be accessed from a C# project. I can import them via Visual Studio's add reference dialog, which will also automatically generate wrappers class. (i.e. ABCLib and AxABCLib) I know that I can generate…
chakrit
  • 61,017
  • 25
  • 133
  • 162
3
votes
1 answer

How to make .NET not to use registered TLB to marshal calls to COM methods?

Current configuration is: The main application is unmanaged. It contains DLL, containing TLB, which describes functions, exposed to COM model. To support ASMX web services, it loads .NET framework, and starts ASP.NET domain that serves web…
Abelevich
  • 293
  • 5
  • 9
3
votes
1 answer

Register tlb COM

I made a COM Wrapper for c# to use it in vba. I compiled it, after with gacutil and regasm I installed it on my pc, after I refered it in vba and it worked perfectly. Now I want to use this foo.tlb in another PC, but it doesn't have gacutil or VS.…
Muriel
  • 63
  • 1
  • 1
  • 5
3
votes
2 answers

Returning S_FALSE from a C# COM dll

I have a method defined in IDL as follows : interface IMyFunc : IDispatch { [id(1), helpstring("method GetNextFunction")] HRESULT GetNextFunction( [in,out] long* lPos, [out, retval] BSTR* bstrName); } Using C++ I always implemented this…
AntonyW
  • 2,284
  • 16
  • 21
3
votes
1 answer

Tlbimp Failed Generating Interop Dll

I have developed a COM library in Delphi. When I try to "add reference" in a Visual Studio project, VS crashes. I tried to build Interop assembly by tlbimp.exe and it failed with: TlbImp : error TI1000 : The type library importer encountered an …
Bahribayli
  • 346
  • 2
  • 11
3
votes
0 answers

Fatal error C1804. cannot read type library file

I have a c++ project that is importing two .tlbs in a header file. #import "..\bin\derived.tlb" named_guids raw_interfaces_only #import "..\bin\base.tlb" named_guids raw_interfaces_only Now derived.tlb is dependent on base.tlb. There are base…
Dan G
  • 836
  • 11
  • 31