It would be... std::string newFoo = *fooPtr;
I'm just not sure about std::string *fooPtr = static_cast<std::string *>(value);.
If you want the other conversion (std::string to std::string *), it's like this: std::string * fooPtr = &newFoo;
Coming back to the original post - It is possible to have problems if you pass
pointers from one thread to the next - the first thread may finish before the second and things may go awry.
Better use "WaitForSingleObject", as far as you are using WinAPI, but then ok, anyways i'm not making Threaded apps... And if i was going to, i would use the new operator, and pass a explicitly casted pointer, as i don't know what static_cast does. I think i should study a bit more the castings.