Sorry for the spam. I got the answer, how to do it. Ignore my previous mail.[quote]#include <boost/shared_ptr.hpp>
#include <iostream>
using namespace std;
class A {
public:
void hello () { cout << "Hello, friends...!" << endl; }
};
typedef boost::shared_ptr<A> APtr;
void* callbk (void* o) {
APtr a = *static_cast<APtr*>(o);
a->hello();
}
int main() {
A* rawPtr = new A;
boost::shared_ptr<A>sPtr(rawPtr);
callbk((void*)&sPtr);
return 0;
}
[/quote]