EstimateFileRiskLevel function
[This function is available on Windows XP with Service Pack 2 (SP2) through Windows Vista. It might be altered or unavailable in subsequent versions of Windows. Client applications instead should use IAttachmentExecute to present a user environment that provides safe download and exchange of files through email and messaging attachments.]
Estimates the risk of executing unknown code when a handler is called on a given file. This risk is based on an understanding of the handler and the code content of the file.
Syntax
HRESULT EstimateFileRiskLevel( _In_ LPCWSTR pszFilePath, _In_ LPCWSTR pszExt, _In_ LPCWSTR pszHandler, _Out_ FILE_RISK_LEVEL *pfrlEstimate );
Parameters
- pszFilePath [in]
-
Type: LPCWSTR
A pointer to a null-terminated string that contains the path of the file that is being checked against the handler.
- pszExt [in]
-
Type: LPCWSTR
A pointer to a null-terminated string that contains the extension of the file that is being checked, either with or without its leading period. For instance, ".txt" or "txt".
- pszHandler [in]
-
Type: LPCWSTR
A pointer to a null-terminated string that contains the path of the handler for the file.
- pfrlEstimate [out]
-
Type: FILE_RISK_LEVEL*
When this function returns successfully, contains a pointer to one of the following values that state the estimated risk.
-
The format of the file is not identified or the handler is not identified. Insufficient information available for a meaningful answer.
-
The format of the file is completely understood, the handler is known, and there is high confidence that no extraneous code will be executed.
-
The format of the file is identified, but it is not sufficiently understood to label as either a high or low risk.
-
The file format is understood and elevated risk factors have been identified.
-
The file format is specifically blocked for this handler.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This function is not declared in a public header or included in a library file. To use it you must load it directly from Winshfhc.dll by ordinal 101.
Requirements
|
Minimum supported client |
Windows XP with SP2 [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
DLL |
|