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

هل استفدت من هذا الجواب؟

 أطبع هذا المقال

اقرأ أيضا

beating my head over a php/my_sql error

Posted by star_dancer, 01-16-2008, 06:15 PMI'm getting an error and I can't figure it out. I...

Question on array sorting in php

Posted by computerwiz3491, 01-17-2008, 05:10 PMI have the following array that I printed using...

wordpress jquery

Posted by Seeking Knowledge, 10-16-2012, 08:43 AMHi there, I'm facing a problem with few...

SSL Certificate works for folders?

Posted by Energizer Bunny, 01-13-2008, 06:10 AMHi, Say i have domain zzzzz.com and have some...

Apache and extensions

Posted by attroll, 01-14-2008, 12:01 AMI have found a hole in one of my servers that someone else...