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

Дали Ви помогна овој одговор?

 Испечати

Исто така прочитајте

NT vs Linux

Posted by Thebeginner, 09-15-2001, 07:15 AMhi guys can somebody explain me the following:...

Redirect domain/user to user.domain ONLY IF folder 'user' doesn't exist

Posted by ThatScriptGuy, 05-07-2007, 04:22 PMWell, I thought I knew enough about my .htaccess...

Editting the default web page using SSH

Posted by MrDGOrman, 03-09-2010, 09:44 AMThis might be in the wrong section - if so, ma bad....

Dataphorce update

Posted by AL-Benjamin, 09-27-2001, 12:58 PMHi there, this is really just an update to the...

Seem Internet Solutions gone down?

Posted by Jollyjohn, 09-11-2001, 07:41 PMwww.seem.co.uk appear to have disappeared, taking my...