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

Hai trovato questa risposta utile?

 Stampa Articolo

Leggi anche

Hosting With support for MS SBS 4.5?

Posted by SimonC, 09-29-2001, 09:26 AMDoes anyone know of a reseller package with support for...

.htaccess to *.com/index.php/example

Posted by shally87, 03-12-2010, 02:36 PMI am using wordpress and currently i have problem with...

disable php functions?

Posted by Calibaba, 09-15-2007, 06:28 PMDoes the below look good for a private server (linux,...

Reselling SSL certificates

Posted by luxor, 09-28-2001, 11:11 AMHi: Does anyone know which company is the most...

Hosting Related Press Releases

Posted by SoftWareRevue, 04-29-2009, 10:30 AM Post your press release for the WHT community...