Func _IsSign($sFile)
Local $Result
If Not FileExists($sFile) Then
Return SetError(1, 0, 0)
EndIf
;~ $Result = DllCall('crypt32.dll', 'bool', 'CryptQueryObject', 'dword', $CERT_QUERY_OBJECT_FILE, 'wstr', $sFile, 'dword', $CERT_QUERY_CONTENT_FLAG_PKCS7_SIGNED_EMBED, 'dword', $CERT_QUERY_FORMAT_FLAG_BINARY, 'dword', 0, 'dword*', 0, 'dword*', 0, 'dword*', 0, 'handle*', 0, 'handle*', 0, 'ptr', 0)
$Result = DllCall('crypt32.dll', 'bool', 'CryptQueryObject', 'dword', 0x0001, 'wstr', $sFile, 'dword', 0x0400, 'dword', 0x0002, 'dword', 0, 'dword*', 0, 'dword*', 0, 'dword*', 0, 'handle*', 0, 'handle*', 0, 'ptr', 0)
If (@Error) Or (Not $Result[0]) Then
Return SetError(2, 0, 0)
EndIf
;~ If $Result[7] = $CERT_QUERY_CONTENT_PKCS7_SIGNED_EMBED Then
If $Result[7] = 10 Then
Return 1
Else
Return 0
EndIf
EndFunc ;==>_IsSign