WerReportAddFile function
Adds a file to the specified report.
Syntax
HRESULT WINAPI WerReportAddFile( _In_ HREPORT hReportHandle, _In_ PCWSTR pwzPath, _In_ WER_FILE_TYPE repFileType, _In_ DWORD dwFileFlags );
Parameters
- hReportHandle [in]
-
A handle to the report. This handle is returned by the WerReportCreate function.
- pwzPath [in]
-
A pointer to a Unicode string that contains the full path to the file to be added. This path can use environment variables. The maximum length of this path is MAX_PATH characters.
- repFileType [in]
-
The type of file. This parameter can be one of the following values from the WER_FILE_TYPE enumeration type.
- dwFileFlags [in]
-
This parameter can be one or more of the following values.
Return value
This function returns S_OK on success or an error code on failure, including the following error code.
| Return code | Description |
|---|---|
|
The specified file does not exist. |
|
The specified file is a user-document and is stored on an encrypted file-system; this combination is not supported. |
Remarks
Although this function can also be used to add memory dumps (using specific flags) to the error report, the preferred function to use for adding memory dumps is WerReportAddDump. You should use this function only if you want to collect the dump yourself and then add it to the report.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also