How to call/load .net dll(C#) from c++ code?

Posted by TajByte, 03-22-2007, 04:50 AM
How to call/load .net dll(C#) from c++ code?

Posted by cis4life, 03-24-2007, 02:11 PM
first you will have to add the dll as a ref. in your "Reference" area of VS.Net then, lets say in the dll the namespace is MyNameSpace and the class is MyClass, then you would write MyNameSpace.MyClass myObj = new MyNameSpace.MyClass(); (This can vary if you have an overloaded constructor and so forth) This will create a new MyClass Obj named 'myObj'. Now you can call that objects functions by writing... myObj.MyFunction(); Its kind of hard to explan without seeing the dll, also remember that only 'public' classes, functions, and variable can be used, if you defined them in your code as 'private' you won't have access to them directly. Cedric

آیا این پاسخ به شما کمک کرد؟

 پرینت این مقاله

در همین زمینه

When blog works forums stops working and viceversa

Posted by sash_007, 03-10-2010, 08:47 PMHello friends, I am having a weird problem my problem is...

Dataphorce update

Posted by AL-Benjamin, 09-27-2001, 12:58 PMHi there, this is really just an update to the...

No right click code

Posted by rumrunner439, 09-22-2008, 11:07 AMOk i saw some code that i though would stop right...

MySQLDumper Perl Command - It This Correct?

Posted by Greedisgood, 03-26-2007, 10:28 AMHi Guys, I was reading this tutorial:...

Command line to show mysql processes?

Posted by mrzippy, 10-30-2012, 11:43 AMHello, What is the command to show active mysql...