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

Je li Vam ovaj odgovor pomogao?

 Ispiši članak

Također pročitajte

Phpmyadmin and Webmail access problem from cpanel

Posted by Doctor_Web, 09-07-2007, 01:02 PMHello, we have a important problem with our cPanel...

litespeed standard 150 connect limit, high enough?

Posted by aww, 05-04-2007, 03:12 PMHow can I tell if the 150 connection limit in 3.1 litespeed is...

*****

Posted by OverSkilled, 09-30-2001, 01:27 PMHi, I'm starting a reselling business also. I'm gonna...

iframe help with internet explorer

Posted by galleline, 02-20-2011, 10:05 AMI have web page with embed video player and i have put...

Netacore Support Links Broken?

Posted by kjedwards, 09-05-2002, 04:19 AMHi Can anyone tell me how to access Netacore support...