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

Hjalp dette svar dig?

 Print denne artikel

Læs også

PERM_FAILURE: SMTP Error (state 14)

Posted by Fahd, 03-29-2008, 05:42 PMMy mailserver has stopped accepting mail from all non-local...

Lots of dedicated server problems.

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

Drop-down header (yahoo like?)

Posted by coume, 03-13-2010, 07:40 AMHello, I struggled to find the right title for the thread...

subdomain and directory question

Posted by azn_romeo_4u, 03-27-2008, 01:02 AMHow do those websites do a website like this....

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