The ImageEnumerateCertificates function is used to return information about the certificates currently contained in an image file.
BOOL ImageEnumerateCertificates(
IN HANDLE FileHandle,
IN DWORD TypeFilter,
OUT PDWORD CertificateCount,
IN OUT PDWORD Indices OPTIONAL,
IN OUT DWORD IndexCount OPTIONAL
);
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.
The ImageEnumerateCertificates function returns information about the certificates currently contained in an image file. It has filtering capabilities which allow certificates containing sections of any single type (or of any type) to be returned.
After the indices of interesting certificates are discovered, they can be passed to the ImageGetCertificateData function to obtain the actual bodies of the certificates.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in imagehlp.h.
Import Library: Use imagehlp.lib.
PE Image Helper (ImageHlp) Overview, Image Integrity, ImageGetCertificateData