Qt中调用VC++ dll, 函数指针的参数列表类型如何转换

哪个帅哥知道,声明函数指针时候,参数列表类型怎么转换?

typedef bool (*ENCFILE) (LPCSTR fpath);
typedef bool (*DECFILE) (LPCSTR fpath, LPCSTR tpath);
typedef bool (*ENCBUFFER) (char* pcBuffer, char* pcOut);
typedef bool (*DECBUFFER) (char* pcBuffer, char* pcOut);
typedef bool (*ENCFILEBF) (LPCSTR fpath);
typedef bool (*DECFILEBF) (LPCSTR fpath, LPCSTR tpath);
typedef bool (*CALCFILECRC32) (LPCSTR fpath, LPCSTR pcOut);
typedef bool (*CALCBUFFERCRC32) (LPCSTR pBuf, int iBufsizeInChar, LPCSTR pcOut);
typedef bool (*ENCBUFFERBF) (LPCSTR pBuf, int iBufsizeInChar, LPCSTR pcOut);
typedef bool (*DECBUFFERBF) (LPCSTR pBuf, int iBufsizeInChar, LPCSTR pcOut);

如上声明函数指针的参数类型,在Qt中获得函数地址可以成功吗?

EncFileAES = (ENCFILE)GetProcAddress(hMod, "EncFileAES");

DecFileAES = (DECFILE)GetProcAddress(hMod, "DecFileAES");

EncBufferAES = (ENCBUFFER)GetProcAddress(hMod, "EncBufferAES");

DecBufferAES = (DECBUFFER)GetProcAddress(hMod, "DecBufferAES");

EncFileBF = (ENCFILEBF)GetProcAddress(hMod, "EncFileBF");

DecFileBF = (DECFILEBF)GetProcAddress(hMod, "DecFileBF");

CalcFileCRC32 = (CALCFILECRC32)GetProcAddress(hMod, "CalcFileCRC32");

CalcBufCRC32 = (CALCBUFFERCRC32)GetProcAddress(hMod, "CalcBufferCRC32");
EncBufferBF = (ENCBUFFERBF)GetProcAddress(hMod, "EncBufferBF");

DecBufferBF = (DECBUFFERBF)GetProcAddress(hMod, "DecBufferBF");

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐