C# exe tlb

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
 
N

Nicholas Paldino [.NET/C# MVP]

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
 
W

Willy Denoyette [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top