wiauDbgErrorHr function (wiautil.h)
The wiauDbgErrorHr function logs a message containing an HRESULT and its error message string.
Syntax
void wiauDbgErrorHr(
HRESULT hr,
LPCSTR fname,
LPCSTR fmt,
...
);
Parameters
hr
Specifies the HRESULT that is to be logged.
fname
Pointer to a string containing the name of the function or method into which the call to wiauDbgDump is inserted.
fmt
Pointer to a format string that specifies a variable argument list, which starts with an ANSI format string containing the message and any conversion specifiers. The ellipsis (...) specifies a variable number of arguments that are to be output.
...
Additional parameters.
Return value
None
Remarks
The wiauDbgErrorHr function typically logs two lines to the log file, or debugger, or both. The first line contains the text of the fmt parameter, including data, if provided. The second line contains the HRESULT and the message string associated with that HRESULT. The following example shows how this function might be called:
wiauDbgErrorHr(hr, "AllocateBuffer", "Buffer size is %d bytes", size);
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | wiautil.h (include Wiautil.h) |