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

Hjälpte svaret dig?

 Skriv ut denna artikeln

Läs även

Premature data download disconnections from server. Challanging one!

Posted by astounding, 05-06-2007, 07:41 AMHi folks, Recently our network of servers all started...

Antivirus for Linux

Posted by bonjurkes, 09-17-2008, 05:59 PMHello, I am looking for an antivirus that i can...

antivirus.exim

Posted by its_joy, 03-29-2008, 07:20 AMhi, i have installed antivirus.exim on server but if...

sdb instead of sda -> Help needed

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

multi line edit with php and mysql

Posted by recklessop, 01-15-2008, 09:54 PMDoes anyone know of an example of a php mysql script....