Partager via


CDebugReportHook::CDebugReportHookProc

The custom reporting function that is hooked into the C run-time debug reporting process.

static int __cdecl CDebugReportHookProc(
   int reportType,
   char* message,
   int* returnValue 
) throw( );

Parameters

  • reportType
    The type of the report (_CRT_WARN, _CRT_ERROR, or _CRT_ASSERT).

  • message
    The message string.

  • returnValue
    The value that should be returned by _CrtDbgReport.

Return Value

Returns FALSE if the hook handles the message in question completely so that no further reporting is required. Returns TRUE if _CrtDbgReport should report the message in the normal way.

Remarks

The reporting function attempts to open the named pipe and communicate with the process at the other end. If the pipe is busy, the reporting function will wait until the pipe is free or the timeout expires. The timeout can be set by the constructor or a call to CDebugReportHook::SetTimeout.

The code in this function is executed in the underlying security context of the calling thread, that is, impersonation is disabled for the duration of this function.

Requirements

Header: atlutil.h

See Also

Concepts

CDebugReportHook Class

CDebugReportHook Members

_CrtDbgReport, _CrtDbgReportW