我用VC写了一个DLL,是这样导出的:
_declspec(dllexport) unsigned char WINAPI GetPath(LPGUID pGuid, char* DevPath);但是我用C++ Builder调用时
必须要用
FARPROC Proc = GetProcAddress(Library, "?GetPath@@YAEPAU_GUID@@PAD@Z");
这样莫名其妙的名称才可以找到 GetPath 函数怎样才可以让C++ Builder调用时可以直接用 "GetPath" 名称来引用 GetPath 函数呢?麻烦各位高手。
_declspec(dllexport) unsigned char WINAPI GetPath(LPGUID pGuid, char* DevPath);但是我用C++ Builder调用时
必须要用
FARPROC Proc = GetProcAddress(Library, "?GetPath@@YAEPAU_GUID@@PAD@Z");
这样莫名其妙的名称才可以找到 GetPath 函数怎样才可以让C++ Builder调用时可以直接用 "GetPath" 名称来引用 GetPath 函数呢?麻烦各位高手。
"_GetPath@8"
这样的名称
#pragma comment(linker,"/export:GetPath=_GetPath@8")
1、_stdcall(WINAPI),也就是pascal调用,output:_GetPath@8
2、_cdecl,output:_GetPath,前面加_declspec(dllexport)则会去掉"_",output:GetPath
3、_fastcall