LoaderVerifierAuthenticateFile (Compact 2013)
3/28/2014
This function obtains authentication information for a file.
Syntax
HRESULT LoaderVerifierAuthenticateFile(
__in const GUID* guidAuthClass,
__in_opt HANDLE hFile,
__in LPCWSTR szFilePath,
__in_opt LPCWSTR szHashHint,
__in HANDLE hReserved,
__out LPHANDLE phslauthnFile
);
Parameters
- guidAuthClass
[in] GUID that indicates the type of file to be authenticated. For more information, see Security Loader File Type Authentication GUIDs.
- hFile
[in] Handle to the file to be authenticated. This may be NULL for some file types (for example, the type LV_AUTHENTICATIONGUID_ROM_EXE).
- szFilePath
[in] Full path to the file to be authenticated.
- szHashHint
[in] Identifier of a hash algorithm, which requests that the Loader Verifier calculate the hash of the file using that algorithm. Typically, a program specifies this parameter before later calling the LoaderVerifierGetHash function. If the caller does not need a specific hash, pass NULL.
- hReserved
[in] Reserved for future use. Set this parameter to NULL.
- phslauthnFile
[out] Pointer to the variable that receives a handle to the authentication information for the file.
Return Value
If it is successful, this function returns the value described in the following table. If the function is not successful, it returns a standard error code that indicates the cause.
Value |
Description |
---|---|
S_OK |
The function successfully obtained the authentication information for the file. |
Remarks
The caller should close the handle returned by this function by calling CloseHandle.
Requirements
Header |
loaderverifier.h |
Library |
coredll.lib |
See Also
Reference
Security Loader Functions
Security Loader File Type Authentication GUIDs
LoaderVerifierGetHash