LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Two DLLs calling each other's exposed functions

I have two DLLs that will be calling each other's exposed functions. In short, I have an App that loads two separate DLLs (DLL_A and DLL_B). DLL_A has external functions that will be called by DLL_B and vice-versa. Is this possible or do I need to re-structure the sw?
0 Kudos
Message 1 of 2
(3,088 Views)
What you want to do is certainly possible. It's no different than writing a program which depends on the CVI runtime engine and then compiling that into a DLL and writing a new program in CVI which will then call into that DLL (which depends on the CVI runtime) and the runtime itself. (While the CVI runtime will not call into your other DLL explicitly, any registered callback functions will be called from it, so the dependency is there.) It may or may not be safe to do this depending on whether your DLLs are stateful, etc. Also, depending on your use case, the use of a callback model may simplify communication between the DLLs in question. However, in most cases you should be fine. If you have more specific questions, I can try to be more specific to your particular case.

Regards,

Alex
0 Kudos
Message 2 of 2
(3,071 Views)