function pointer & memory selection

Perhaps you could pass in a pointer to a union and, upon return from the function, extract the value you need that the function placed in the union.