E
ECathell
I have done some searches on this and have found Herfrieds suggestions on opening the DLL in a different appDomain. I have not done this before and am curious on the consequences. Below is the code I am currently using, but it locks the dll.
<STAThread()> _
Public Shared Sub Main()
Try
Dim t As New Thread(AddressOf StartApplication)
t.Name = "DLLThread"
t.Start()
If CheckforUpdates() = True Then
' Prompt user if he wants to apply the updates
If MessageBox.Show("Updates are available for this program. Do you wish to install the updates?", "Updates Available", MessageBoxButtons.YesNo, MessageBoxIcon.Information) = DialogResult.Yes Then
t.Abort()
t = Nothing
UpdateApplication()
StartApplication()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.ToString, "Exception Thrown")
Finally
End Try
End Sub
Private Shared Sub StartApplication()
Dim frm As New TestingForm.Form1
Application.Run(frm)
End Sub
<STAThread()> _
Public Shared Sub Main()
Try
Dim t As New Thread(AddressOf StartApplication)
t.Name = "DLLThread"
t.Start()
If CheckforUpdates() = True Then
' Prompt user if he wants to apply the updates
If MessageBox.Show("Updates are available for this program. Do you wish to install the updates?", "Updates Available", MessageBoxButtons.YesNo, MessageBoxIcon.Information) = DialogResult.Yes Then
t.Abort()
t = Nothing
UpdateApplication()
StartApplication()
End If
End If
Catch ex As Exception
MessageBox.Show(ex.ToString, "Exception Thrown")
Finally
End Try
End Sub
Private Shared Sub StartApplication()
Dim frm As New TestingForm.Form1
Application.Run(frm)
End Sub