samples icon indicating copy to clipboard operation
samples copied to clipboard

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

Open cchessnz opened this issue 3 years ago • 1 comments

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).

cchessnz avatar Mar 29 '21 02:03 cchessnz

I'v got the same problem with PHP, https://www.php.net/manual/en/book.com.php

bertasoft avatar Aug 08 '22 14:08 bertasoft