This example shows what a call to VSAEndSession looks like. Refer to VsaRpcl Example to see the constant declarations and to see this code in a form you can run with minor modifications.
// End the session when you are finished generating events.
static void RpcSampleEndSession(long VSAId)
{
RpcTryExcept
{
VSAEndSession(VSAId);
}
RpcExcept(1)
{
LastErrorCode = RpcExceptionCode();
}
RpcEndExcept;
}