Another way to pass around unknown pointers is to use (void *) type. I like this because I understand it even without knowing too much about C/C++ . (intptr_t is sort of higher magic for me )
There is nothing magic about intptr_t, just one of standard headers (I think stdlib.h, but not quite sure) has something like
#ifdef *****
typedef int intptr_t;
#endif
#ifdef *****
typedef _int64 intptr_t;
#endif
(where ***** depends on platform, compiler etc...)