dotnet / dotnet/samples

core/extensions/COMServerDemo Server not recognized by Tlbimp or OleView

Open
#4,482 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
5.1k
Avg merge
9h 11m
Merged PRs (30d)
1

Description

I have successfully built and executed the core/extensions/COMServerDemo project. The "regsvr32 COMServer.comhost.dll" executed successfully and COMClient.exe ran successfully.

However, "tlbimp COMServer.comhost.dll" produces error: TlbImp : error TI1002 : The input file 'C:\Users\cchessnz\source\DotnetSamples\core\extensions\COMServerDemo\COMServer\bin\x64\Debug\netcoreapp3.1\COMServer.comhost.dll' is not a valid type library.

Similarly, opening it with OleView causes TLB_E_CANTLOADLIBRARY.

I guess the problem is that this DLL does not actually contain a type library at all; the COMClient is working by extracting GUIDs and interface definitions from the .cs source files that are part of this project. The client doesn't import the DLL.

Is there a way to have the server DLL include the type library, so that it can be deployed for use with general COM clients ? (who will import the type library from the DLL as is normally the case for COM).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.