tlbexp

Using tlbexp.exe on a COM dll

巧了我就是萌 提交于 2020-01-12 08:29:33
问题 I am trying to set up communication between Centura and a COM .dll. (Downloaded from http://download.resip.fr for a database import) Centura requires a .tlb file to be able to communicate to this component. Normally I would use regasm /tlb to generate the .tlb but seeing as it is a COM .dll this is not possible. I found that I could use tlbexp for .NET dll's: http://msdn.microsoft.com/en-us/library/hfzzah2c(v=vs.80).aspx I tried this out, knowing it would probably fail (as I have COM .dll). I

How to Register a Type Library without RegAsm.exe

房东的猫 提交于 2020-01-03 15:16:18
问题 I want to know if it's possible to register a type library without using the RegAsm tool. Here is my situation, which will hopefully explain why I want to do this: I'm developing an assembly in .NET that will provide some modern functionality for our older VB6 applications. I have successfully registered the assembly and the type library on my development machine using RegAsm like so: regasm.exe MyAssembly.dll /tlb /codebase The above command generates the type library (MyAssembly.tlb) and

“The public struct contains one or more non-public fields that will be exported” - but there are no fields?

别说谁变了你拦得住时间么 提交于 2020-01-03 05:26:06
问题 I have the struct below which is being compiled for COM interop. I get the following build warning: warning : Type library exporter warning processing 'MyNamespace.MyStruct.k__BackingField, MyAssemblyName'. Warning: The public struct contains one or more non-public fields that will be exported . But I don't see what it is referring to - there are no non-public fields nor fields at all . Maybe the compiler is generating something I can't see? What does this warning mean, and what if anything

TlbExp.exe error:This assembly is built by a runtime newer

与世无争的帅哥 提交于 2019-12-23 07:59:28
问题 We are moving part of our server to .net 4.0. We already did the move to Vs2010 as a first step but did not change the target framework of any project. As a second step I'm moving a specific part of our server to target 4.0 so we can use some of the new functionality. I've run into a problem when calling TLBexp.exe on a Class library DLL that targets 4.0. This DLL also references a lot of DLLs that target 2.0. I get the error: TlbExp : error TX0000: Could not load file or assembly 'file

Which features of .NET framework do interop assemblies reference?

余生长醉 提交于 2019-12-13 19:06:56
问题 We have a Visual Studio solution with about 90 projects. Most of them are built to DLL files, some are written in C++, others in C#. The projects communicate with each other via COM. We use tlbexp to generate TLB files of some C# projects (the ones that are referenced in C++ projects). And we use tlbimp to generate interop DLLs of the C++ projects. I did not completely dig into the topic, but I think, the interop files just define the interfaces of the C++ classes, to make them usable from

.NET Core 2.1 - How to create COM object and generate *.tlb file

霸气de小男生 提交于 2019-12-07 06:12:04
问题 I would like to build COM object in .net Core and then register by RegAsm. My .csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>netcoreapp2.1;net4.7.2</TargetFrameworks> <RuntimeIdentifier>win7-x64</RuntimeIdentifier> <Platforms>x64</Platforms> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> </Project> My program.cs: using System; using System.Runtime.InteropServices; namespace ComExample { [Guid("7ce1e40f-760a

tlbexp.exe changes method names' case

天大地大妈咪最大 提交于 2019-12-06 02:52:16
问题 I have a rather strange problem. I am exporting an interface from a C# library to COM. I have enabled the 'register with COM' project setting, so it calls tlbexp.exe to make the type libs. We use camel case on our method names and I noticed that the exported type library changes these any method that happens to coincide with a class name to Pascal case... e.g interface IFoo { void randomClass() } class RandomClass { } The exported IFoo in the type lib defines IFoo->RandomClass() instead of

.NET Core 2.1 - How to create COM object and generate *.tlb file

强颜欢笑 提交于 2019-12-05 10:51:28
I would like to build COM object in .net Core and then register by RegAsm. My .csproj file: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>netcoreapp2.1;net4.7.2</TargetFrameworks> <RuntimeIdentifier>win7-x64</RuntimeIdentifier> <Platforms>x64</Platforms> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> </PropertyGroup> </Project> My program.cs: using System; using System.Runtime.InteropServices; namespace ComExample { [Guid("7ce1e40f-760a-4d81-b70b-61108ed15cb4")] [ComVisible(true)] public interface IComExampleClass { IComModelClass

tlbexp.exe changes method names' case

℡╲_俬逩灬. 提交于 2019-12-04 07:09:04
I have a rather strange problem. I am exporting an interface from a C# library to COM. I have enabled the 'register with COM' project setting, so it calls tlbexp.exe to make the type libs. We use camel case on our method names and I noticed that the exported type library changes these any method that happens to coincide with a class name to Pascal case... e.g interface IFoo { void randomClass() } class RandomClass { } The exported IFoo in the type lib defines IFoo->RandomClass() instead of IFoo->randomClass() Any ideas on what causes this and how to stop it? Since COM is case-insensitive, both

Using tlbexp.exe on a COM dll

放肆的年华 提交于 2019-12-03 15:59:40
I am trying to set up communication between Centura and a COM .dll. (Downloaded from http://download.resip.fr for a database import) Centura requires a .tlb file to be able to communicate to this component. Normally I would use regasm /tlb to generate the .tlb but seeing as it is a COM .dll this is not possible. I found that I could use tlbexp for .NET dll's: http://msdn.microsoft.com/en-us/library/hfzzah2c(v=vs.80).aspx I tried this out, knowing it would probably fail (as I have COM .dll). I received this error: TlbExp : error TX0000 : Could not load file or assembly 'file:///C:\Windows