Thread: Small code fix
View Single Post
  #1  
Unread 08-18-2005, 02:37 PM
Ruddles Ruddles is offline
A small badger.
This person is a EQ2Map developer.
 
Join Date: Apr 2005
Server: Splitpaw
Posts: 86
Default Small code fix

Have a small fix to stop people opening up 2 instances of the updater up at the same time, thus stopping people (in theory) getting the "access is denied" error because the file is already locked:

In Public Sub New() under the comment "'Add any initialization after the InitializeComponent() call":

Code:
Dim gotit As Boolean
Dim mut As New Mutex(True, "EQ2UpdateMut", gotit)
This creates a Mutex that is locked til the program ends. If you start another instance of it up then it tried to get access to this mutex, can't, and exits nicely with "1 instance" error message.
Reply With Quote