Hello..
How do I get smart pointer from pointer address?
For instance:
class someclass {
public:
char test;
};
typedef boost::shared_ptr<someclass> someclass_p; //smart pointer
int main() {
someclass_p testp = someclass_p( new someclass() );
ULONG_PTR uptr = (ULONG_PTR)testp.get();
//so I have pointer address here
//How do I get testp from uptr?
return 0;
}
The reason I want to do that is because I call windows API with pointer address, and it will return it for action.