Dll in C# for C++ program

  • Thread starter Thread starter winthux
  • Start date Start date
Is it possible to use COM server in c++ without importing *.tlb file
No, the type systems are not even close to the same. The COM type system
doesn't have anything to do with the .NET one. The article you listed by my
good friend Mike Gunderloy shows that you have to "import" the type library
by using tlbiimp. It's not like import in the C++ days - this process is a
*conversion* from COM IDL data types to CLR data types. For a lot more on
the "why" and the differences between the two worlds, check out the first
article in my 5-part COM Interop series on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/bridge.asp


--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
 
You asked >Is it possible to use COM server in c++ without importing *.tlb
file

I am answering the question based on the C++ being a COM component. If it is
a straight C++ unmanaged piece of code, you can use Managed C++'s ability to
mix unmanaged and managed C++ to write a managed wrapper such that that code
would be accessible to C# (and other .NET) clients.
--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
 
I am answering the question based on the C++ being a COM component.

I'm sorry I asked wrongly... Thank you for answering

If it is
a straight C++ unmanaged piece of code, you can use Managed C++'s ability to
mix unmanaged and managed C++ to write a managed wrapper such that that code
would be accessible to C# (and other .NET) clients.

I thought it could be but is anywhere how to do it? I found only how to call
C++ function in c#.... I need sth diffrent..
 
I'm sorry I asked wrongly... Thank you for answering
No problem. This is my area so I am glad to help.
C++ function in c#.... I need sth diffrent..
Yes I show how to call unmanaged C++/C from MC++ in my OR article
http://www.ondotnet.com/pub/a/dotnet/2003/03/03/mcppp2.html

Its also covered in Chapter 7 of my book (now out of print). Let me know if
you need further help.

--
-----
Sam Gentile
Microsoft MVP - C#/.NET
..NET Blog http://samgentile.com/blog/

Please do NOT contact me directly but respond to
the newsgroup instead.
---------
 
Let me know if you need further help.

I have some question about how parameters can be exchanged between two dlls.
I'm writing this wrapper as a plugin for program and this wrapper must post
and gets params from other dll which is written in C#. My Question is how
can I run specific function in C# plugin and return value to wrapper?
 
Back
Top