Commit 672d92cc by 李定达

1定义def导出函数名称

parent 64ef34c5
...@@ -111,25 +111,25 @@ void DoCopyFile(const char *dir) ...@@ -111,25 +111,25 @@ void DoCopyFile(const char *dir)
extern "C"{ extern "C"{
__declspec(dllexport) int _stdcall GetValue(char *indata, char *outdata) // __declspec(dllexport) int _stdcall GetValue(char *indata, char *outdata)
{ //{
HMODULE hMod = GetInstance(); // HMODULE hMod = GetInstance();
if (hMod) { // if (hMod) {
PFN_GETVALUE pfn_GetValue = (PFN_GETVALUE)GetProcAddress(hMod, "_GetValue@8"); // PFN_GETVALUE pfn_GetValue = (PFN_GETVALUE)GetProcAddress(hMod, "_GetValue@8");
if (pfn_GetValue) { // if (pfn_GetValue) {
return pfn_GetValue(indata, outdata); // return pfn_GetValue(indata, outdata);
} // }
FreeLibrary(hMod); // FreeLibrary(hMod);
} // }
return -1; // return -1;
} // }
__declspec(dllexport) int _stdcall RESGetValue(char *indata, char *outdata) __declspec(dllexport) int _stdcall RESGetValue(char *indata, char *outdata)
{ {
HMODULE hMod = GetInstance(); HMODULE hMod = GetInstance();
if (hMod) { if (hMod) {
PFN_RESGETVALUE pfn_GetValue = (PFN_GETVALUE)GetProcAddress(hMod, "_RESGetValue@8"); PFN_RESGETVALUE pfn_GetValue = (PFN_GETVALUE)GetProcAddress(hMod, "RESGetValue");
if (pfn_GetValue) { if (pfn_GetValue) {
return pfn_GetValue(indata, outdata); return pfn_GetValue(indata, outdata);
} }
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>freemudwrapper.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
...@@ -59,11 +60,15 @@ ...@@ -59,11 +60,15 @@
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>freemudwrapper.def</ModuleDefinitionFile>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="FreemudWrapper.cpp" /> <ClCompile Include="FreemudWrapper.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="freemudwrapper.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>
......
...@@ -19,4 +19,9 @@ ...@@ -19,4 +19,9 @@
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="freemudwrapper.def">
<Filter>源文件</Filter>
</None>
</ItemGroup>
</Project> </Project>
\ No newline at end of file
LIBRARY
EXPORTS
RESGetValue
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment