LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-building an EXE project after changing a DLL that it includes

 Hi All ,

 

Here is my question:

 

Stage I:

In project A I create a DLL and publish several functions to be used by external SW.

Project B includes the LIB of project A and uses some of the functions above. I build it and create an exe.

 

Stage II:

I made changes to the content of the functions in Project A and re-built the DLL.

Do I need also to re-build Project B with the new LIB? or can I only copy and overwrite the old DLL and LIB and run the exe of Project B ?

 

If I understand correctly, Project B uses the address map of the functions in the DLL (Project A) and accesses it when needed.

So any change of content (and not function header) should not affect the exe.

Is this correct or am I off course ? Smiley Happy (I could not find a good article on this subject)

 

            Gil

0 Kudos
Message 1 of 3
(3,137 Views)
If you do not change the interface functions at all (or if you only add new functions), and you keep the same file name for the DLL, then you will not have to rebuild the EXE file.


However, in certain circumstances - such as following a program crash or any other event where an open reference to the DLL is retained - Windows will keep the 'old' DLL in main memory. In this case, the new DLL will be ignored since Windows will already think it is loaded. So if you change the DLL and the changes do not appear to have been implemented when you run the EXE, you will need to log out and back in (or perhaps even reboot) in order to discard the old DLL from main memory.


--

Martin.

--
Martin
Certified CVI Developer
Message 2 of 3
(3,116 Views)

Thank you Martin,

This answers my question.

 

Gil

0 Kudos
Message 3 of 3
(3,094 Views)