LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How does CVI find a DLL?

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

0 Kudos
Message 1 of 5
(3,508 Views)

Pilot error.

 

The test program executable is in the same folder as the DLL.

0 Kudos
Message 2 of 5
(3,504 Views)

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

 

 

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 3 of 5
(3,442 Views)

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 Smiley Wink

 

Menchar

 

 

0 Kudos
Message 4 of 5
(3,438 Views)

Believe me, I understand pilot error.

 

I was simply adding some more info for those who might not know.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 5 of 5
(3,419 Views)