Detection rewrite for issue #153 - Pass 3
This commit is contained in:
@@ -11,6 +11,7 @@ Public Class mgrProcessDetection
|
|||||||
Private oGame As clsGame
|
Private oGame As clsGame
|
||||||
Private oDuplicateGames As New ArrayList
|
Private oDuplicateGames As New ArrayList
|
||||||
Private bDuplicates As Boolean
|
Private bDuplicates As Boolean
|
||||||
|
Private bVerified As Boolean = False
|
||||||
|
|
||||||
Property FoundProcess As Process
|
Property FoundProcess As Process
|
||||||
Get
|
Get
|
||||||
@@ -305,9 +306,6 @@ Public Class mgrProcessDetection
|
|||||||
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
||||||
End If
|
End If
|
||||||
Catch exWin32 As System.ComponentModel.Win32Exception
|
Catch exWin32 As System.ComponentModel.Win32Exception
|
||||||
'If an exception occurs the process is:
|
|
||||||
'Running as administrator and the app isn't.
|
|
||||||
'The process is 64-bit and the process folder is required, shouldn't happen often.
|
|
||||||
If exWin32.NativeErrorCode = 5 Then
|
If exWin32.NativeErrorCode = 5 Then
|
||||||
bNeedsPath = True
|
bNeedsPath = True
|
||||||
iErrorCode = 5
|
iErrorCode = 5
|
||||||
@@ -323,12 +321,20 @@ Public Class mgrProcessDetection
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
|
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
|
||||||
|
|
||||||
|
'This will force two cycles for detection to try and prevent issues with UAC prompt
|
||||||
|
If Not bVerified Then
|
||||||
|
bVerified = True
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
bVerified = False
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user