XLL+ Class Library (7.0)

HandleCache<T> Class

Manages object handles in Excel.

class psl::HandleCache<T>


The HandleCache<T> class holds a set of objects in memory and allows them to be represented in Excel as "handles". It actively manages the lifetime of the cached objects.


If a handle cache of the appropriate type for an object is not found at run-time, then it will be created when required, using the static method HandleCache<T>::GetOrCreateInstance.

However, if you choose to construct a HandleCache<T> object yourself, either as a global object or as a member of your application class, then that instance will be used, and no additional instances will be created.

Handle Format

RTD handles consist of a set of keys, combined to form a handle. The keys include:

Using the default handle format, a handle looks like this:


The developer can implement their own handle formatting class, and thereby take control of the appearance of the handle, by deriving a class from CHandleFormatter<T>. See CHandleFormatter<T> for more details and an example of a custom formatter.


Header: rtdhandles.h
Namespace: psl

See Also

HandleCache<T> Methods | rtdhandles.h