-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaraAppsHelper.pas
More file actions
39 lines (33 loc) · 801 Bytes
/
laraAppsHelper.pas
File metadata and controls
39 lines (33 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
Main features:
- Detect installed Apps:
- Web Browsers
- Text Editors
- Command Line Terminals
- Hyper-V and WSL
- Executable's info
- Vendor and Signature
- Version
- IconExtractor
}
unit laraAppsHelper;
interface
uses
Winapi.ImageHlp, Winapi.Windows;
implementation
function HasDigitalSignature(const Filename: string): Boolean;
var
FileHandle: THandle;
CertHeader: TWinCertificate;
begin
Result := False;
FileHandle := CreateFile(PChar(Filename), GENERIC_READ, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0);
if FileHandle <> INVALID_HANDLE_VALUE then
try
FillChar(CertHeader, SizeOf(CertHeader), 0);
Result := ImageGetCertificateHeader(FileHandle, 0, CertHeader);
finally
CloseHandle(FileHandle);
end;
end;
end.