Setting up a REDsdk software vendor license

You must have received a customer ID and an activation key from REDWAY3D to follow the code procedure detailed below. These licensing informations uniquely identify yourself or your company for any REDsdk based application:

// Initial creation or access to the resource manager:
RED::Object* resmgr = RED::Factory::CreateInstance( CID_REDResourceManager );
if( !resmgr )
  exit( 1 );

// Assuming we have a customer ID and activation key:
unsigned int customer_id = 123456789;
const char* activation_key = "111122223333444555666777888";

// Supply licensing informations to REDsdk:
RED::ILicense* ilicense = resmgr->As< RED::ILicense >();
RC_TEST( ilicense->SetLicense( activation_key, customer_id ) );

// Verify activation of the product:
bool is_activated;
RC_TEST( ilicense->IsProductActivated( is_activated, RED::PROD_REDSDK ) );
if( is_activated == false )
{
  // We're in trouble. Maybe '123456789' does not work ;-)
  exit( 1 );
}