结果LabView在执行initFunc()加载“B.dll”时始终失败,提示原因“The specified module couldnot be found(error 126)”。我尝试将B.dll文件路径加到VI Search Path中,将其与A.dll放在同一路径,甚至将其放在/windows/system32路径下,问题始终存在。
请各位帮忙看看为什么始终找不到B.dll文件, 应该如何解决?谢谢!
-----------------------------------------------------------------------
PS:
1. A.dll代码片段如下所示:
-----------------------------------------------------
hwinIoDll= LoadLibrary(L"B.dll");
returnGetLastError(); // debug information to find the error code.
-----------------------------------------------------
2. 测试程序如下所示 (VC中成功执行)
---------------------------------------------------
intmain()
{
int ret_val = 0;
ret_val = initFunc(); /* The initial function of A.dll, it will execute LoadLibrary(L"B.dll").*/