Platform SDK: Debugging and Error Handling

ImageGetCertificateData

The ImageGetCertificateData function is used to return a complete certificate from a file.

BOOL ImageGetCertificateData(
  HANDLE FileHandle,               
  DWORD CertificateIndex,          
  LPWIN_CERTIFICATE Certificate,  
  PDWORD RequiredLength        
);

Parameters

FileHandle
[in] Handle to the image file to be modified. This handle must be opened for FILE_READ_DATA access.
CertificateIndex
[in] Specifies the index of the certificate to be returned.
Certificate
[out] Pointer to a WIN_CERTIFICATE structure that receives the certificate data.
RequiredLength
[in/out] On input, this parameter specifies the length of the Certificate buffer in bytes. On return, it receives the length of the certificate.

Return Values

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.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Header: Declared in Imagehlp.h.
  Library: Use Imagehlp.lib.

See Also

Image Help Library Overview, ImageHlp Functions