Prepares a CXlOper to be returned as a value to Excel
CXlOper* Ret( );
This function returns a pointer to some static memory containing a copy of this CXlOper.
The Ret() function is essential to the implementation of the memory management features of the library. When you return data to Excel from an add-in function, the data must be contained in memory which remains in scope even when the function goes out of scope.
The Ret() function takes the current value in the CXlOper and copies it into heap memory. It then releases the memory of the original copy and sets flags in the new copy so that Excel will properly manage the memory clean-up on your behalf.
Once you have called Ret(), a CXlOper is no longer valid, and cannot be used for any purpose.
Ret() is only used in the return statements of add-in functions, for example:
CXlOper xloResult; xloResult = 123.456; return xloResult.Ret();