Export (0) Print
Expand All

RpcFinally macro

The RpcFinally statement provides developers with the ability to create termination handlers.

Syntax


void RpcFinally(void);

Parameters

This macro has no parameters.

Return value

This macro does not return a value.

Remarks

guarded statements

Statements that are executed while exceptions are being monitored. If an exception occurs during the execution of these statements, termination statements will be executed. Unwinding then continues to the next RpcTryExcept or RpcTryFinally statements.

termination statements

Statements that are executed when an exception occurs. After the termination statements are complete, the exception is raised again.

Use the RpcFinally statement to build termination handlers. All termination handlers created with RpcFinally execute whether or not an exception occurs. Your program can call the RpcAbnormalTermination function in termination statements to determine whether termination statements is being executed because an exception occurred. A nonzero return from RpcAbnormalTermination indicates that an exception occurred. A value of zero indicates that no exception occurred.

The following restrictions apply:

  • Jumping (through a goto) into guarded statements is not allowed.
  • Jumping (through a goto) into termination statements is not allowed.
  • Returning or jumping (through a goto) from guarded statements is not allowed.
  • Returning or jumping (through a goto) from termination statements is not allowed.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpc.h

See also

RpcAbnormalTermination

 

 

Community Additions

ADD
Show:
© 2014 Microsoft