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
1
vote
1 answer

Convert TLB file to assembly with custom assembly information

I am using tlbimp.exe to generate an assembly from a TLB file. I know that I can use the "asmversion" command line switch to set a custom version number, but how do I set the other information? I would like to set the fields like "Product Name" and…
Jon Tackabury
  • 47,710
  • 52
  • 130
  • 168
1
vote
1 answer

Preventing TlbImp from generating interop assemblies for referenced type libraries

I'm generating interop assemblies using TlbImp. Several of my type libraries reference a single core type library. When I run TlbImp against First.dll I get Interop.First.dll and Interop.Core.dll. The problem is that when I run it again, against…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
1
vote
1 answer

How to CreateObject in C#?

I want to translate the following VB6 code into C# If optHost(0).Value Then Set m_oScpiAccess = New IcSCPIActiveX.IcSCPIAccess Else sHost = txtHost.Text Set m_oScpiAccess = CreateObject("Exfo.IcSCPIActiveX.IcSCPIAccess", sHost) End If I…
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
1
vote
2 answers

Disadvantages of using TLB (and tlbimp.exe) with C#

We're integrating a communications company's software into our own for doing things like answering calls, transfering calls, matching numbers with clients etc. They have given us the API documentation, which includes a TLB file. We've used the…
CarllDev
  • 1,294
  • 2
  • 19
  • 34
0
votes
2 answers

Can Windows installer deploy an assembly based on the version of an external application?

I am developing a small program (a dll) in Visual Studio 2010 / .NET 4 that integrates with an external application (we'll call it ExApp) through COM interop. I am generating the interop assemblies myself using TlbImp.exe, as none are provided by…
Scott B
  • 240
  • 3
  • 10
0
votes
1 answer

How can I get tlbimp to not automatically generate assemblies for referenced types?

I want to create an interop assembly from a type library using the tlbimp.exe tool that is included in the .NET SDK. My problem is that the source type library is referencing a type in another library that I do not have available. How can I get…
Magnus Lindhe
  • 7,157
  • 5
  • 48
  • 60
0
votes
1 answer

Can tlbimp.exe generate interop assemblies with customized version info?

The Microsoft Type Library Importer tool (tlbimp.exe) generate interop assemblies without some version info, i.e. no company, no copyright, no trademarks and number version always set to 1.0.0.0. Is it possible to get the tool to generate interop…
aledeniz
  • 431
  • 3
  • 13
0
votes
2 answers

shdocvw in managed C++

I am trying to use shdocvw in a managed C++ program. I have read COM Interop using managed C++ - CodeProject. I used the instructions in How to add references to a managed Visual C++ project to create Interop.shdocvw.dll. I moved the file to my…
Sam Hobbs
  • 3
  • 2
0
votes
0 answers

When should we use tlbimp.exe instead of "normal" DLLs?

my question relates to the program tlbimp.exe and its generation of DLLs. We have been working with DLLs from a specific SDK for some time. (PDFXChange Editor SDK to be exact) And we work with VB.NET on Visual Studio. So far, the associated DLL…
Kevin
  • 45
  • 4
0
votes
1 answer

ActiveX component cannot create Sage Data Object

I'm using some slightly amended VBA code provided by Sage to connect to Sage 50 Accounts - this works on some machines, but not with others, despite them all having the same version of Sage (25.1.128), and has previously worked on all machines…
MrClip
  • 17
  • 5
0
votes
0 answers

Load tlb at runtime in C++

I have created a dll in C# which needs to be consumed by various C++ applications. During installation of my product, I execute the regasm command to generate the .tlb file for my dll. How can I load this tlb from my C++ application and call…
The King
  • 833
  • 1
  • 15
  • 41
0
votes
1 answer

TlbImp System.TypeLoadException: Int32[49285]' has too many dimensions

I have a C++-built tlb that uses SAFEARRAY; I used tlb importer to generate a DLL and build it with C#,I tried different options such as /sysarray and /noclassmembers to generate different signatures for a method: public void GetList(ref Array…
Salah Alshaal
  • 860
  • 2
  • 17
  • 41
0
votes
1 answer

How to generate 64 bit Interop from 64 bit dll?

I have an issue with generating Interop by using tool TlbImp.exe The input dll is 64 bits, but output Interop is 32 bits. I do not have control over the input dll, it is given by third part. I have downloaded dumpbin feature and test both dlls. A.…
jan kowalski
  • 189
  • 3
  • 21
0
votes
1 answer

Compiler Error when adding dll reference to managed c++ project

I am using VS 2008 and get compiler errors sporadically when adding a dll reference to a managed c++ file in my C++ project. I am trying to add a reference to the dll so as to be able to use smart pointers. ex: #import items.tlb The problem is that…
ak3nat0n
  • 6,060
  • 6
  • 36
  • 59
0
votes
1 answer

Create interop dll from .tlb file

I have a C++ project and a c# project. The C# project accesses methods of the C++ project through 2 interop dlls called interop.X.dll and interop.XCom.dll. When my C++ project rebuilds it creates X.tlb and XCom.tlb files, it also creates x_i.c,…
Madz
  • 1,273
  • 2
  • 18
  • 35