LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

require function prototypes with external DLL

Solved!
Go to solution

To belabor this further Smiley Wink

 

The NI tutorial on static Vs.. Dynamic DLL linkage indicates that if the DLL changes you will "likely" have to relink with the new .lib when using load-time linkage.

 

Is anyone able to be specific on this likelihood?

 

There's another thread on this forum where we explored this but could not determine anything other than that empirically it seemed evident that if we didn't change the function signature (changed just the body of a previously included function) relinking wasn't necessary.  As I recall I determined that if I added a new function I didn't have to rebind old clients that didn't know about or try to use the new function.   All of this was with CVI 8.x using the native compiler to compile both the client app and the DLL.

 

Can anyone detail the circumstances when using load-time (static) linking to a modified DLL function whereby we know that relinking is needed?  Going through the MSDN info on DLL's did not seem to clarify it, for me at least.  When I inspected the modified DLL, I found the function ordinals had in fact changed, yet I did not have to rebind the old client to use the new DLL.  At least some of the MSDN docs would lead you to believe that this couldn't possibly be true.

 

One of the advantages of the DLL mechanism is that it is possible to revise a DLL and not have to rebind previous clients.  To be safe, should I necessarily be using dynamic binding (GetProcAddress) in all cases?    Does use of an external compiler affect this behavior?  Was I "getting away with" not relinking to a modified DLL becuase I was using the native CVI compiler?   Does anyone know how to dynamically bind to DLL functions from VB?  When I include a type library (generated from .fp for all of the exported functions)and call from VB am I doing static or dynamic binding to the DLL? 

 

Lots of kudos waiting for anyone who can clarify this!!

 

Menchar

 

 

 

 

 

 

0 Kudos
Message 11 of 11
(1,151 Views)