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

¿Fue útil la respuesta?

 Imprimir éste Artículo

Leer también

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

Soap

Posted by parag, 03-12-2010, 09:58 AMHello, I installed SOAP - which tells me it has installed...

DNS & MX RECORDS ON A CPANEL WHM VPS SERVER

Posted by Harry E, 01-13-2008, 10:37 AMHello i have been having probelems for the past few...

[php] Need advices on writing a counter script

Posted by kennethinvest, 09-22-2008, 06:04 PMhello, I would like to make a very simple couter...

litespeed standard 150 connect limit, high enough?

Posted by aww, 05-04-2007, 03:12 PMHow can I tell if the 150 connection limit in 3.1 litespeed is...