The provider keeps the context of the binding between the TLicenseUse object and its TLicenseProvider object in a TLicenseProviderSession object. Immediately after the TLicenseUse selects a provider, the provider is asked via CreateSession to construct a new TLicenseProviderSession object. The new object is held by the TLicenseUse until either the TLicenseUse object is destroyed or a request for units fails. In either case, TLicenseUse then destructs the TLicenseProviderSession.
The allocation request for units is directed by the TLicenseUse to the TLicenseProviderSession, as are requests to execute provider-specific operations. These requests are made via the Allocate and ExecuteOperations member functions of the TLicenseProviderSession, respectively. The session is responsible for maintaining the count of the allocated units, and provides access to that count via its GetNumberOfUnits and ConsumeUnits member functions.