// Test.h extern "C" { // __declspec is a Microsoft specific extension. __declspec(dllexport) int MySum(int first, int second); } // Test.cpp #include "windows.h" #include "test.h" BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } __declspec(dllexport) int MySum(int first, int second) { return first + second; }I have compiled and built this from VC++ 6 SP4 and checked the exported ordinal MySum appears correctly.