Hello,
I have tested this myself and confirmed the behavior, as well as know a deterministic workaround to the problem. Here's what I did to test:
1. Built a dll named add.dll with an add function which adds 2 numbers and returns the result.
2. Built a dll named subtract.dll ALSO with an add function but it actually subtracts 2 numbers and returns the result (same name, different functionality so that I could confirm the problem - that it was not using the function from the newly pointed dll)
3. Built a VI which calls the add function from add.dll - it returns the sum as expected.
4. Double-clicked to edit the Call Library Function Node in the VI from the previous step, and changed the reference to point to subtract.dll.
5. Ran the VI, and it STILL ADDED!!!
6. Closed the VI which calls the dll function, and reopened it.
7. Ran it again, and it SUBTRACTED!
The good news is, based on what I noted in the previous email, I think I know what's going on! You see, LabVIEW loads the dll into memory when the VI is loaded into memory, so in step 3, LabVIEW loads add.dll and references it's add function. Then, even though I change the Call Library Function Node to point to subtract.dll, I think LabVIEW is not ever loading subtract.dll, and the reason is because we are calling a function with the same name. That is to say,
LabVIEW is looking at the function name, and if it already finds that function in a currently loaded dll, it won't attempt to load the other dll you point it to UNTIL YOU SAVE, THEN CLOSE, AND THEN REOPEN THE VI.
To confirm this, I pointed LabVIEW to a new dll, and pointed to a function named subtract. This forced LabVIEW to load the new dll, because the dll it WAS pointing to did NOT have a function named subtract. Thus, if I switch between dlls where I choose DIFFERENT FUNCTION NAMES, LabVIEW WILL load and use the new dll. Otherwise, if it finds the function in the current dll, it won't load the new one.
I verified this behavior in both 7.1 and 8.0. I will file a corrective action request to have this addressed by R&D. For now, you know the workaround to get your new dll to be loaded and use the correct function. To reiterate, you need to point the call library function node to the new dll, save the VI containing that call library function node (so it saves the new path in the call library function node), close the VI containing that call library function node, and then reopen the VI. Based on my previous post, we can see why this works - when we close the VI, the old dll gets unloaded from memory, and when we open the VI again, it loads the newly pointed dll and then of course uses ITS version of the function.
Best regards, and sorry for the inconvenience!
JLS