If I remember well, there was something special about the typecasting bit shifting thing.

I can't test it right now, but you could try something like this:
int type = (int)(handle(Object) >> 14);

Last edited by Myrkling; 09/13/11 08:27. Reason: Striked typecasting.