WerReportAddFile function
Applies to: desktop apps only
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 |
|---|---|
|
Minimum supported server | Windows Server 2008 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/7/2012