vs2015引用dll文件时一直出现错误,总是会弹出“没找到modbus_tcp.dll!”。这个问题怎么解决?
modbus_tcp.dll已放置在项目目录和debugger目录下。代码如下:
hinstDLL = LoadLibrary("modbus_tcp.dll"); //modbus_tcp.dll modbus_tcp.dll
if (hinstDLL)
{
AfxMessageBox("modbus_tcp.dll已成功载入!");
}
else
{
AfxMessageBox("没找到modbus_tcp.dll!");
//SendMessage(WM_CLOSE);
}