About Registering Your Product

InitializeChronicle() registers the application with the Screencast recorder, using the appropriate API call. It starts by constructing a new waypoint.

  // [CHRONICLE] Register product.
  Chronicle::Waypoint *waypoint = NULL;
Note: The sample application illustrates a complex registration scenario that includes registering a UPI code. Your implementation might not require the complexity.

When registering an Autodesk product, InitializeChronicle() creates a string, strUPIPath. strUPIPath is used to create a full path that points to the location of the application's upiconfig.xml file. Then it tests whether that file exists, using an if{...}else{...} clause. If the file exists, then InitializeChronicle() calls registerProductFromUPIConfigFile() to add product data to the waypoint, as shown in this code fragment.

  if (ATLPath::FileExists(strUPIPath))
	 {
  		// Register product using UPI XML configuration file.
  		waypoint = Chronicle::Facade::Waypoints::registerProductFromUPIConfigFile((LPCWSTR)strUPIPath);

  		// Include product name with product registration.
  		waypoint->addAttribute(Chronicle::Metadata::toString(Chronicle::Metadata::ProductName),
  			L"ChronicleMFCClient");
 	}

When registering a product that is not an Autodesk product, use registerProduct(), part of the else-branch code.

The else branch includes code to add attributes to the waypoint for ProductLine and ProductMaster values. Non-Autodesk developers can ignore this branch.

  // Register product by specifying product name, product version and product build.
		waypoint = Chronicle::Facade::Waypoints::registerProduct(L"ChronicleMFCClient", L"1.0", L"1.0.0.1");

The registerProduct() function returns the constructed waypoint instance.