How do I create a class that I can reference to and directly use to call methods from an unmanaged dll? (assuming an unmanaged dll is a dll that doesn’t exists/is known @ compile time)
For example I have a dll which contains the class helloWorld and I want to create an instance of the class and then call helloWorld.tell().
You can use your assembly with a COM interface, which is available from unmanaged code.
There are some examples here that you can download. Check out the COM Interop Part II code. http://code.msdn.microsoft.com/windowsdesktop/Visual-Studio-2010-Samples-31b491f3
If you’re feeling brave, here’s another explanation: http://msdn.microsoft.com/en-us/library/aa645738(v=vs.71).aspx
Hope that helps.