S
Steve
I need to restart my VB.NET 2.0 app but I need to delay the new
instance's start until I know the previous instance has ended and freed
up all use of its resources (DLLs). What I have is an app where the
EXE is basically a shell and there are multiple DLL "plug-in" modules.
Within the shell I have a "load new module" function which lets the
user import new plug-ins. When an updated plug-in is loaded, I can't
overwrite the DLL immediately since the DLL is in-use. What I am doing
is copying the new plug-in to a temporary location. Then when the app
starts, I check that location for new DLLs before I dynamically load
them. However, when I use Application.Restart or
System.Diagnostics.Process.Start(Application.ExecutablePath) to start
my new instance, followed immediate by an "End" statement, the new
instance is starting before the old instance completely ends.
Therefore, when the new instance trys to copy the new DLLs from the
temp location to the application folder, I get an exception. Does all
this make sense? Any ideas? TIA... Steve
instance's start until I know the previous instance has ended and freed
up all use of its resources (DLLs). What I have is an app where the
EXE is basically a shell and there are multiple DLL "plug-in" modules.
Within the shell I have a "load new module" function which lets the
user import new plug-ins. When an updated plug-in is loaded, I can't
overwrite the DLL immediately since the DLL is in-use. What I am doing
is copying the new plug-in to a temporary location. Then when the app
starts, I check that location for new DLLs before I dynamically load
them. However, when I use Application.Restart or
System.Diagnostics.Process.Start(Application.ExecutablePath) to start
my new instance, followed immediate by an "End" statement, the new
instance is starting before the old instance completely ends.
Therefore, when the new instance trys to copy the new DLLs from the
temp location to the application folder, I get an exception. Does all
this make sense? Any ideas? TIA... Steve