CryptSIPRetrieveSubjectGuidForCatalogFile function (mssip.h)

The CryptSIPRetrieveSubjectGuidForCatalogFile function retrieves the subject GUID associated with the specified file.

Syntax

BOOL CryptSIPRetrieveSubjectGuidForCatalogFile(
  [in]           LPCWSTR FileName,
  [in, optional] HANDLE  hFileIn,
  [out]          GUID    *pgSubject
);

Parameters

[in] FileName

The name of the file. If the hFileIn parameter is set, the value in this parameter is ignored.

[in, optional] hFileIn

A handle to the file to check. This parameter must contain a valid handle if the FileName parameter is NULL.

[out] pgSubject

A globally unique ID that identifies the subject.

Return value

The return value is TRUE if the function succeeds; otherwise, FALSE.

If this function returns FALSE, additional error information can be obtained by calling the GetLastError function. GetLastError will return one of the following error codes.

Return code Description
ERROR_INVALID_PARAMETER
One or more of the parameters are not valid.

Remarks

This function only supports subject interface packages (SIPs) that are used for portable executable images (.exe), cabinet (.cab) images, and flat files.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header mssip.h
Library Crypt32.lib
DLL Crypt32.dll