VSAOpenConnection Example

   Applies To

This example shows what a call to VSAOpenConnection 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.

// The VSAOpenConnection function returns an ID that is used to uniquely
// identify this session of the component.

static long RpcSampleOpenConnection()
{
   long VSAId = 0;

   RpcTryExcept
   {
      VSAOpenConnection(&VSAId);  
   }
   RpcExcept(1)
   {
      LastErrorCode = RpcExceptionCode();
   }
   RpcEndExcept;
      
   return VSAId;
}