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
3
votes
0 answers

Using `COMFileReference` instead of `COMReference` for automated builds?

I'm trying to put a Windows Mobile 6.0 C# project on our continuous integration server (Jenkins). There's an error when trying to compile the project, which references a TLB: ResolveComReferences always return TYPE_E_LIBNOTREGISTERED. Even when…
3
votes
1 answer

Debugging into COM C++ code through an .net interop class

Is it possible to step into the COM C++ code that is being used through a .net interop layer created by tlbimp.exe from a C++ program. I see that the symbols for the COM C++ dll is loaded in the Debug->Modules window.
TrustyCoder
  • 4,749
  • 10
  • 66
  • 119
2
votes
1 answer

How to pass one COM class instance as a parameter to another COM method in C#?

I created a wrapper for 2 COM DLLs using TlbImp.exe. One has a class that the wrapper describes as using System; using System.Runtime.InteropServices; namespace GNOTDRSIGNATURESERVERLib { [CoClass(typeof(GNOTDRSignatureServerClass)), …
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
2
votes
1 answer

COM Interface question - .NET

Recently I was reading about interop marshalling but I still don't understand one thing. To make .NET assembly visible to COM I need to use tlbexp tool and/or regasm tool. To make COM visible to .NET assebly I have to use tlbimp tool - all that is…
pkolodziej
  • 1,347
  • 3
  • 17
  • 24
2
votes
0 answers

tlbimp.exe / COM interop generation: different result in VS2017

I have been using VS2015 to generate an interop wrapper for a COM object in the past. The COM object is under ongoing development so sometimes the interface changes and I have to regenerate the interop wrapper. So far no problem. But since I have…
Jero
  • 193
  • 1
  • 1
  • 7
2
votes
2 answers

Understanding .NET + COM interoperability

I'm in need of help on understanding the architecture when calling COM/DLL's created with TLBIMP.EXE, from a .NET application. The scenario is: I have a DLL called XYZ.DLL which contains methods, classes etc. I can now create a .NET wrapper around…
user155814
  • 101
  • 1
  • 9
2
votes
3 answers

Tool to import Type Libraries as C# code

Is there a tool to import/convert COM type libraries into C# code rather than generating an assembly? The TLBIMP tool and the TypeLibaryConverter class only generate assemblies. I've had some success ripping the C# ComImport definitions by running…
Duncan Smart
  • 31,172
  • 10
  • 68
  • 70
2
votes
0 answers

On Importing tlb file function name changed

I have a Dll built in C# code and due to some need I want to use it with C++ code. After a long search I found a solution and created abcd.tlb from my abcd.dll file using RegASM.exe. I imported the tlb file in my C++ project and everything worked…
Pankaj Goyal
  • 103
  • 1
  • 11
2
votes
1 answer

MIDL2015 warning when using importlib attribute

I have a legacy Visual Studio solution which contains several projects (has been upgraded to Visual Studio 2013). One of these projects generates a COM DLL. The TLB from this DLL is then imported into an IDL file of another project via the importlib…
steinybot
  • 5,491
  • 6
  • 37
  • 55
2
votes
1 answer

Allowing multiple versions of the same COM library

I wrote a C# program and library that allow a user to more easily use a particular proprietary simulator's COM interface. Currently I have to build and distribute a different version of the C# library for each version of the simulator I wish to…
Jim
  • 651
  • 2
  • 7
  • 15
2
votes
1 answer

Different Results from TLBIMP and AXIMP

I have a ActiveX COM control and its source code. I wanted to change one of the method's input parameter, so I changed the IDL etc and generated the COM DLL and TLB. But when I imported the COM DLL in a .NET project the method had retained its old…
Venkatesh Kumar
  • 642
  • 1
  • 7
  • 19
2
votes
1 answer

Adding a COM Reference with Visual Studio renames interfaces in Interop Assembly

I'm adding a C++ COM dll as a reference to a C# project (Visual Studio 2008). VS adds the reference however the generated interop library does not reflect the naming in the original typelib (.idl) definition. Here's what my library definition looks…
user160995
2
votes
1 answer

How to use tlbimp.exe's /keycontainer switch?

Anybody have an example of how to use tlbimp.exe's /keycontainer command line switch? The googles...they don't help. It's always /publickey, or /keyfile. No example of using /keycontainer.
Yoopergeek
  • 5,592
  • 3
  • 24
  • 29
2
votes
0 answers

How to reference and access proprietary COM component using TLBIMP wrapper on Windows 7

I created a wrapper to a commercial closed-source program by using TLBIMP.EXE. (The program can't be referenced directly by Visual Studio although it can be referenced in VB6.) VS references the wrapper just fine, and is able to create an object. …
LucasMcGraw
  • 129
  • 3
  • 12
2
votes
1 answer

Load TLB at runtime in C# .net 4.0

I have a tlb file from a third party library. There are many versions of this library, however the functions that I use within the tlb are constant i.e. do not change from one version to the next. I have added the tlb file to the project as a COM…
t.smith.htc
  • 203
  • 1
  • 3
  • 12