-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
On Windows, I noticed that devices.utils.load_lib.load_lib
has an unintuitive order to search for DLLs: the last DLL found is actually the one used. This means the effective order is:
%PATH%
,C:\Windows\System32\
etc.- Application-specific install directories (in
C:\Program Files\
etc.) - The custom directory specified in
pylablib.par
This has two issues:
- It is the opposite order of what I expected
- This led to a fun afternoon of debugging after updating the UC480 drivers and noticing things stopped working. Turns out, pylablib was still using an old version of the DLL in System32, while the new version was only in
C:\Program Files\
- This led to a fun afternoon of debugging after updating the UC480 drivers and noticing things stopped working. Turns out, pylablib was still using an old version of the DLL in System32, while the new version was only in
- It opens file descriptors for and loads all available DLLs but only ends up using one.
I don't know if this is the intended behavior, but even if it is, this should probably be documented in a better way. For example, the generic docs leave the actual order very vague, and only say that System32 will be searched in "many cases" while also saying the "requirements are described in detail for the specific devices".
(FWIW, I'm willing to open another PR if you have a clear vision of how it should work.)
Metadata
Metadata
Assignees
Labels
No labels