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

Răspunsul a fost util?

 Tipărire

V-ar mai putea interesa și

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

SSL Certificate works for folders?

Posted by Energizer Bunny, 01-13-2008, 06:10 AMHi, Say i have domain zzzzz.com and have some...

How can I fix this?

Posted by TylerH, 09-18-2008, 06:06 AMFor some reason my sendmail is not working and I tired...

Custom nameservers question

Posted by emmzee, 09-14-2007, 08:47 PMHi everyone, (x.com = replacement for my actual domain) I...

FTP Question - Limiting types of Access

Posted by webtender, 03-29-2008, 11:17 PMHello, Is it possible to setup ftp accounts that have...