- dll returning reference
- Posted by todma on November 14th, 2007
is it safe for a .DLL to return a reference (to a vector<>) to the
main application if the main application uses it to access data from
the DLL immediately?
Todd.
- Posted by Scott McPhillips [MVP] on November 14th, 2007
"todma" <toddmarshall2002@yahoo.com> wrote in message
news:1195051616.642432.118490@o3g2000hsb.googlegro ups.com...
Yes.
However, if the main application attempts to modify the vector in a way that
causes reallocation, it is only safe if both the app and DLL use the same
DLL runtime library. If they use different libraries then modifications
will fail.
--
Scott McPhillips [VC++ MVP]
Similar Posts
- returning lvalue in C vs C++ (Programming) by Ben C
- Returning a HDD to Seagate or WD (Computers & Technology) by Bill
- Returning from Subroute (Microprocessors) by terry
- File Keeps Returning (Computers & Technology) by Inter Pares
- NdisIMInitializeDeviceInstanceEx Not Returning (Drivers) by Gramps

