06-16-2010 06:57 PM
I have a simple DLL written with CVI. I call it from a test routine that's another CVI project in the same workspace. I include the .lib file in the test routine project. The test routine finds the DLL all OK somehow, it's in a separate folder from the .exe and it's not in the system32 folder or any other folder for that matter. Another project in the same workspace cannot find the same DLL for some reason. I can see no differences in the projects - both load the same .lib file - yet one finds the DLL and one doesn't.
I would have thought that neither exe would find the DLL.
Are there any special rules for search paths for DLL's when you're running out of CVI development environment?
Thanks,
Menchar
06-16-2010 07:39 PM
Pilot error.
The test program executable is in the same folder as the DLL.
06-22-2010 07:25 PM
Just to clarify, it is NOT CVI looking for a DLL, it is Windows that does it on behalf of the application calling a DLL function.
The DLL search methodology is documented here:
http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx
06-22-2010 08:56 PM
Thanks, I do understand the DLL searchpath, and DLL loadtime/runtime linking issues.
What happened was I thought I was seeing behavior that made me think the CVI debug environment was somehow intervening when running debug builds of the executable and of a DLL out of the same workspace.
Then I realized that it was following the normal DLL searchpath rules for Win32 and an implicit DLL load.
That's why I followed up the OP with another in which I indicated that it was "pilot error", meaning I realized my mistake
Menchar
06-23-2010 11:00 AM
Believe me, I understand pilot error.
I was simply adding some more info for those who might not know.