// Import the creation function with standard calling convention [ DllImport( @"MyDLL.dll", EntryPoint = "??CreateMyClass@@PFWR@Q", CallingConvention = CallingConvention.StdCall ) ]
public static extern IntPtr CreateMyClass();
Which is not too bad, although I do find it very annoying that I need to specify the decorated function name myself, this is something that the compiler should figure out, I guess it'll get better in next versions of the language (there's some talk about it being real easy in VS.net 2005), regardless, that part was annoying, but more annoying is that I apparently need to create a static function in my DLL called "CreateMyClass" that all it does is call new on MyClass and return it.
So, I found all this to be an insane amount of work for such a simple standalone test bed program, so I ended up going for a really simple Win32 app.
So I'm looking forward to going home tonight and just getting the Win32 stuff out of the way so that I can start playing with some net code.
And now, it's time for lunch.