网站首页  词典首页

请输入您要查询的函数:

 

术语 werregisterfile
释义 WerRegisterFile
语法:
C++
HRESULT WINAPI WerRegisterFile(
__in PCWSTR pwzFile,
__in WER_REGISTER_FILE_TYPE regFileType,
__in DWORD dwFlags
);
WerRegisterFile功能
注册了一个文件时收取疫情周报创建一个错误报告。
参数
pwzFile [in]
完整的文件路径。这条道路的最大长度为MAX_PATH字符。
regFileType [in]
文件类型。此参数可从WER_REGISTER_FILE_TYPE枚举类型为下列值之一。
ValueMeaning
WerRegFileTypeOtherAny其他类型的文件。
WerRegFileTypeUserDocumentThe文件,使用由在该事件发生时的应用。这份文件只是收集沃森服务器如果它要求。
dwFlags [in]
此参数可以是一个或多个下列值。
ValueMeaning
WER_FILE_ANONYMOUS_DATAThe文件不包含个人信息,可以用来识别或联系用户。
WER_FILE_DELETE_WHEN_DONEAutomatically删除后,它被添加到报表文件。
返回值
这个函数返回S_OK的成功或失败的错误代码,其中包括以下错误代码。
返回codeDescription
WER_E_INVALID_STATEThe进程状态是无效的。例如,在应用过程是恢复模式。
HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)注册的内存块和文件的数量超过了限制。
备注
已注册的文件添加到只有当更多的数据由服务器要求的报告。
对崩溃,挂起,操作系统会自动提供错误报告(不需要提供任何错误报告在应用程序代码)。如果您使用此函数来注册一个文件时,操作系统将文件添加到错误报告在系统崩溃时创建或挂起(此文件,除了文件的操作系统已经收集补充)。
对于一般事件的报告,应用程序使用WerReportAddFile函数来代替。另外,要求与WER_SUBMIT_ADD_REGISTERED_DATA旗WerReportSubmit功能将包括文件的WerRegisterFile功能补充。
若要从列表中删除的文件,调用WerUnregisterFile功能。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWerapi.h
LibraryKernel32.lib
DLLKernel32.dll
参见
WER Functions
WerUnregisterFile
Windows错误报告
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==WerRegisterFile Function
Registers a file to be collected when WER creates an error report.
Syntax
C++
HRESULT WINAPI WerRegisterFile(
__in PCWSTR pwzFile,
__in WER_REGISTER_FILE_TYPE regFileType,
__in DWORD dwFlags
);
Parameters
pwzFile [in]
The full path to the file. The maximum length of this path is MAX_PATH characters.
regFileType [in]
The file type. This parameter can be one of the following values from the WER_REGISTER_FILE_TYPE enumeration type.
ValueMeaning
WerRegFileTypeOtherAny other type of file.
WerRegFileTypeUserDocumentThe document in use by the application at the time of the event. This document is only collected if the Watson server asks for it.

dwFlags [in]
This parameter can be one or more of the following values.
ValueMeaning
WER_FILE_ANONYMOUS_DATAThe file does not contain personal information that could be used to identify or contact the user.
WER_FILE_DELETE_WHEN_DONEAutomatically deletes the file after it is added to the report.

Return Value
This function returns S_OK on success or an error code on failure, including the following error codes.
Return codeDescription
WER_E_INVALID_STATEThe process state is not valid. For example, the process is in application recovery mode .
HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)The number of registered memory blocks and files exceeds the limit.

Remarks
The registered file is added to the report only when additional data is requested by the server.
For crashes and hangs, the operating system automatically provides error reporting (you do not need to provide any error reporting code in your application). If you use this function to register a file, the operating system will add the file to the error report created at the time of a crash or hang (this file is added in addition to the files the operating system already collects).
For generic event reporting, the application has to use the WerReportAddFile function instead. Alternatively, calling the WerReportSubmit function with the WER_SUBMIT_ADD_REGISTERED_DATA flag will include the files that the WerRegisterFile function added.
To remove the file from the list, call the WerUnregisterFile function.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWerapi.h
LibraryKernel32.lib
DLLKernel32.dll
See Also
WER Functions
WerUnregisterFile
Windows Error Reporting
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/bb513619(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:29:07