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 mövzu kifayət qədər köməkçi oldu mu?

 Çap

Digər Başlıqlar

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......

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...

How to perform an FSCK

Posted by mark1hos, 09-16-2007, 02:52 PMHi guys, we've got our server hooked up to a KVM, as the...

How Change Owner?

Posted by hichkas, 07-17-2007, 07:59 AMHi How i Can Change Owner to User! In VPS? Posted by...

CACTI with cPanel

Posted by hosteur, 05-07-2007, 07:29 AMMy other box gear by DedicatedPlace and they guys still...