Creates a new handle for the supplied pointer, and adds the pointer to the object cache.
std::tstring CreateHandleInCache( T* ptr ); std::tstring CreateHandleInCache( RTDHANDLES_PTR_CLASS<T>& sptr ); |
A pointer to T
.
Once a pointer has been passed to CreateHandleInCache, the object pointed
to is owned by the HandleCache, and will be deleted when it is no longer in use.
A smart pointer to T
.
Once a smart pointer has been passed to CreateHandleInCache, the object pointed
to is partially owned by the HandleCache,
and will be kept alive until it is no longer in use either by the object cache,
or by the library which created the object.
Returns the handle for the object, which should immediately be returned to Excel as the result of a handle creator function.
Header: rtdhandles.h