extern "C " INT WINAPI Fun(DWORD dwP1); 然后新建一个def文件例如you.def中加上以下代码(ExportName是你的API的文件名): LIBRARY ExportName EXPORTS Fun @1