Ticket #1112: SetCheckMethod.au3.txt

File SetCheckMethod.au3.txt, 1.3 KB (added by Yashied, 16 years ago)

The necessary variables and functions

Line 
1...
2
3Global $WinAPI_SilentCheck = False
4
5...
6
7Func _WinAPI_Check($sFunction, $fError, $vError, $fTranslate = False)
8        If ($fError) And (Not $WinAPI_SilentCheck) Then
9                If $fTranslate Then $vError = _WinAPI_GetLastErrorMessage()
10                _WinAPI_ShowError($sFunction & ": " & $vError)
11        EndIf
12EndFunc   ;==>_WinAPI_Check
13
14...
15
16; #FUNCTION# ====================================================================================================================
17; Name...........: _WinAPI_SetCheckMethod
18; Description....: Sets the method of checking for the _WinAPI_Check() function.
19; Syntax.........: _WinAPI_SetCheckMethod ( $fForce )
20; Parameters.....: $fForce - This parameter can be one of the following values:
21;                  |TRUE  - Checks in accordance with the description of the _WinAPI_Check() function.
22;                  |FALSE - Silent checks (do nothing): you can use _WnAPI_GetLastError() function to get a last error code.
23; Return values..:
24; Author.........: Yashied
25; Modified.......:
26; Remarks........:
27; Related........:
28; Link...........:
29; Example........: No
30; ===============================================================================================================================
31Func _WinAPI_SetCheckMethod($fForce)
32        $WinAPI_SilentCheck = ($fForce = 0)
33EndFunc   ;==>_WinAPI_SetCheckMethod