Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RpcExceptionFilter
Collapse the table of content
Expand the table of content

RpcExceptionFilter function

The RpcExceptionFilter function is a default exception filter that determines whether an exception is fatal or non-fatal.RpcExceptionFilter is recommended for structured exception handling for the most common exceptions as an alternative to custom filters with RpcExcept.

Syntax


int RPC_ENTRY RpcExceptionFilter(
  _In_ unsigned long ExceptionCode
);

Parameters

ExceptionCode [in]

Value of an exception. Any of the following exception values will return EXCEPTION_CONTINUE_SEARCH:

STATUS_ACCESS_VIOLATION
STATUS_POSSIBLE_DEADLOCK
STATUS_INSTRUCTION_MISALIGNMENT
STATUS_DATATYPE_MISALIGNMENT
STATUS_PRIVILEGED_INSTRUCTION
STATUS_ILLEGAL_INSTRUCTION
STATUS_BREAKPOINT
STATUS_STACK_OVERFLOW
STATUS_HANDLE_NOT_CLOSABLE
STATUS_IN_PAGE_ERROR
STATUS_ASSERTION_FAILURE
STATUS_STACK_BUFFER_OVERRUN
STATUS_GUARD_PAGE_VIOLATION
STATUS_REG_NAT_CONSUMPTION

Return value

A value that specifies whether the exception was fatal or non-fatal.

Return codeDescription
EXCEPTION_CONTINUE_SEARCH

The exception is fatal and must be handled.

EXCEPTION_EXECUTE_HANDLER

The exception is not fatal.

 

Remarks

The recommended usage of RpcExceptionFilter is:



RpcTry
{
    … RPC calls here …
RpcExcept(RpcExceptionFilter(RpcExceptionCode()))
{
    … error handling here …
}
RpcEndExcept

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Rpcdce.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

Exception Handling
RpcExcept
RpcExceptionCode
RpcTryExcept

 

 

Community Additions

ADD
Show:
© 2015 Microsoft