【发布时间】:2014-07-24 08:10:53
【问题描述】:
我想加载如下代码所示的dll基地址。
HMODULE g_hDll;
g_hDll = LoadLibraryW(_T(“4FM.dll”));`
当我运行它时,我收到以下错误消息:
C:\Qt\UPI_ProIII_062414085021\fpga_lib\sipif.cpp:106: error: C2664: ‘HMODULE LoadLibraryW(LPCWSTR)’ : cannot convert argument 1 from ‘const char [8]’ to ‘LPCWSTR’
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
我也尝试了Qlibrary,但我无法在hmodule 上加载。
当我使用 Visual Studio 2010 运行相同的代码时,它运行良好。
【问题讨论】: