This is probably just a massive brain fart but if you declare a function with __declspec(dllexport) is it automatically __stdcall? does it not need to be explicit? trying them both together doesn't compile of course.