WPRCFormatError

WPRCFormatError is a function designed to format error messages based on HRESULT error codes. It provides a way to retrieve error messages.

Syntax

HRESULT WPRCFormatError(  
    _In_ HRESULT Hresult,   
    _In_opt_ LPUNKNOWN pUnknown,   
    _Out_ BSTR* pbstrMessage,   
    _Out_opt_ BSTR* pbstrDescription,   
    _Out_opt_ BSTR* pbstrDetailedDescription  
); 

Parameters

Hresult

(_In_ HRESULT): The HRESULT error code that needs to be formatted. This is a mandatory parameter.

pUnknown

(_In_opt_ LPUNKNOWN): An optional interface pointer that might provide additional context for formatting the error. This can be NULL if not used.

pbstrMessage

(_Out_ BSTR*): A pointer to a BSTR string that will receive the primary error message. This is a mandatory output parameter.

pbstrDescription

(_Out_opt_ BSTR*): An optional pointer to a BSTR string that will receive a more detailed description of the error. This can be NULL if not required.

pbstrDetailedDescription

(_Out_opt_ BSTR*): An optional pointer to a BSTR string that will receive an even more detailed description of the error. This can also be NULL if not required.

Return Value

The function returns an HRESULT code. A successful execution is typically indicated by S_OK. Failure is indicated by any other HRESULT code, which signifies an error occurred during the execution of the function.

Remarks

Functions