I’m using a DLL which performs some memory allocation and returns a pointer.
The code is something like that:
ObjectClass *obj = FunctionFromDLL();
obj is a valid pointer but obj->SubObject is a bad pointer (0xcdcdcd)
I checked and FunctionFromDLL() correctly allocates SubObject, this pointer only gets a bad value when function is returning to caller.
Is there something special for the DLL to “share” its memory?
It was because I defined _USE_32BIT_TIME_T as preprocessor value.
I removed it and now it works fine.
Thanks everyone.