This function sets the root object and size for the pad.


virtual void setRootObject(void *ptr, size_t size)


This function can be called only once per a CPad instance; subsequent calls throw an exception. The size is the size of the root object, not the root object plus all its children. The size argument must correspond to the size of the object as it is allocated by using allocate(), and as such is subject to the same restrictions.


This function throws an exception if the pad already has a root object. You cannot reset the root after it is set.