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

Bu cevap yeterince yardımcı oldu mu?

 Bu dökümanı yazdır

Also Read

Can some explain this in a simple way?

Posted by subhash, 02-21-2011, 07:52 AMHello Guys, Can some body explain what exactly is...

Configuring a DR site

Posted by AQORN-Adam, 06-29-2008, 12:31 AMHi everyone, I'm a programmer and not exactly a web...

The Planet Monitoring System .... SSH critical status

Posted by xmlxp, 09-15-2007, 03:52 PMam recieving an email every hour from the Monitoring System...

Bind an IP to a UID?

Posted by zawk, 06-22-2008, 11:34 AMI Finally had a question worth asking so I signed up......

sdb instead of sda -> Help needed

Posted by CoolMike, 07-17-2007, 03:23 AMHi I have a server with a raid5 configuration. Linux...