C# exe tlb

  • Thread starter Thread starter Abhishek
  • Start date Start date
A

Abhishek

Hi All,

Is it possible to create a tlb file for a c# exe, so that i can import that
into a cpp exe and call the functions exposed by that exe. if yes then how.

Thanks in advance for all and any help.

Regards
Abhishek
 
This won't work, as he is using an EXE. The OP has to separate his
logic out into a DLL and then follow the guidelines in the links that you
specified. .NET does not support out of process COM servers.

Additionally, some work is needed to correctly expose your .NET types to
COM. Here is a good starting point for doing so:

http://msdn2.microsoft.com/en-us/library/zsfww439.aspx
 
Nicholas Paldino said:
This won't work, as he is using an EXE. The OP has to separate his
logic out into a DLL and then follow the guidelines in the links that you
specified. .NET does not support out of process COM servers.

The OP isn't talking about an out-proc scenario.
An EXE is just another assembly container, it's perfectly possible for
regasm and tlbexp to create a typelib from an EXE and use it as an import
library in C++.

Willy.
 
Back
Top