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

?האם התשובה שקיבלתם הייתה מועילה

 הדפסת המאמר

קראו גם

Apache and extensions

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

flushing iptables

Posted by hazarus, 09-16-2007, 04:34 AMhello, I keep trying to flush my iptables on my linux...

PlanetDomain API - Frustrating - Waiting for almost a decade!

Posted by MrLeN, 09-21-2008, 10:55 AMI have been a PlanetDomain reseller for about 8 years or so...

Lots of dedicated server problems.

Posted by erix920, 05-07-2007, 08:26 PMOur current problem is that when we try to start sshd...

Exchange Replication?

Posted by regmac01, 09-16-2007, 12:19 AMWhat would be the best way to replicate two exchange...