Is it possible to get returned object by value, for example:
string GetString();
Is it possible to get the returned string object? I'm not sure if i can get this with GetReturnAddress or not.
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Is it possible to get returned object by value, for example:
string GetString();
Is it possible to get the returned string object? I'm not sure if i can get this with GetReturnAddress or not.
GetReturnAddress() works, so does GetReturnObject(), and GetAddressOfReturnValue().
GetReturnAddress() is intended to be used for functions that return a reference or a handle (but it actually do work for functions returning objects by value too)
GetReturnObject() is intended to be used for functions that return objects, whether it is by value, reference, or handle.
GetAddressOfReturnValue() works for all return types, including primitives, objects, references, handles, etc. This method is intended to be used by template proxy functions.