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

Was dit antwoord nuttig?

 Print dit artikel

Lees ook

what could be the problem ?

Posted by jjk2, 06-26-2008, 03:13 AMi am experiencing some strange thing. i have to reload a page...

No right click code

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

Reseller account with H-Sphere?

Posted by dontknownutn, 09-04-2002, 10:02 PMWhere can I get a private label reseller package with...

Remount back up hard drive

Posted by Peter_Net, 09-15-2007, 07:41 PMHello, I have a second hard disk for cpanel back up...

Invoking classes via Nested includes (php)

Posted by lifewater, 03-15-2007, 04:00 PMHello, I apologize if this is a repeated question,...