Hi All,
I have a problem for which I am unable to find a solution myself. The
scenario is like this:
We have a slow-starting application (that has a VBA sub-system which
works the same as Word's VBA) for which we develop applications in VBA.
My current task requires me to develop a certain subcomponent in a C++
dll.
The VBA references the dll with a declare statement, ie it late-binds
to the dll.
When the dll is loaded (or its methods executed) the first time it
loads and works fine. However it seems as if this application then
locks the dll. When I try to rebuild this dll i get a "LINK : fatal
error LNK1104: cannot open file 'Debug/filename.dll'" error from Visual
Studio.
I presume that this is because the big application stil has a reference
of some sort to it and therefore I am unable to overwrite it.
Is there a way to overcome this problem? As I stated earlier the bigger
application is rather SLOW in starting so restarting it each and
everytime to release the dll this way is rather cumbersome. I am really
looking for a OS specific way of releasing the application's dependancy
on the dll.
Any comments or suggestions would be appreciated.
Friendly Regards
Pieter Breed
pieter - 18 Nov 2004 05:15 GMT
Hi All,
It seems I have solved my own problem. For those who are interested:
It seems as if the dll lock was kept by the specific VBA project which
I was working on. Since there is a command line with which I can call
the VBA Sub from within the master application, it will work if I do
the following:
"vba load file; vba run function; vba unload file"
In this way the dll lock is released and I can recompile the dll from
within VS.
Friendly Regards
Pieter Breed