ImageAddCertificate

The ImageAddCertificate function is used to add a DICE_CERTIFICATE to the specified file.

BOOL ImageAddCertificate(
  IN HANDLE FileHandle,              
  IN PDICE_CERTIFICATE Certificate,  
  OUT PDWORD Index                   
);
 

Parameters

FileHandle
Handle to the image file to be modified. This handle must be opened for FILE_READ_DATA and FILE_WRITE_DATA access.
Certificate
Specifies a buffer containing a DICE_CERTIFICATE header and all associated sections. The Length member in the certificate header will be used to determine the length of this buffer.
Index
Receives the index of the newly added 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.

Remarks

The ImageAddCertificate function adds a DICE_CERTIFICATE to the specified file. The certificate is added at the end of the existing list of certificates and is assigned an index.

QuickInfo

  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.

See Also

PE Image Helper (ImageHlp) Overview, Image Integrity