_Security__IsValidSid
Validates a SID
#include <Security.au3>
_Security__IsValidSid($pSID)
Параметры
$pSID | Pointer to a SID |
Возвращаемое значение
Успех: | True: SID is valid |
Ошибка: | False: SID is not valid |
См. также
_Security__GetLengthSidСм. также
Искать IsValidSid в библиотеке MSDNПример
#include <Security.au3>
Local $tSID = _Security__GetAccountSid(@ComputerName)
If Not @error Then
; $tSID is structure filled with SID data for spesified account
; Check this SID for validity:
Local $fValid = _Security__IsValidSid($tSID)
If $fValid Then
ConsoleWrite("The SID is valid." & @CRLF)
; ... The rest of the script here...
Else
ConsoleWrite("The SID is NOT valid." & @CRLF)
Exit
EndIf
EndIf