How to check type of Handles?

I have 2 ref classes.
I want to make some code to check the type of handles, not pointers.

For pointers, I know that I can use dynamic_cast to check, see here:
http://www.cplusplus.com/reference/std/typeinfo/bad_cast/

For handles, I have no idea. I tried to use dynamic_cast from handle of ref class A to handle of ref class B. No bad_cast exception appears.

Can anyone give me some ideas? Thanks in advance!
What do you mean "handle"? Windows HANDLEs?
A handle is an integer that's used to locate resources in a table. If whatever library you're using doesn't provide an interface for getting the type of object a given handle points to, you can't get that information.
I mean handles to managed objects.
I know how to check types of pointers to unmanaged objects using dynamic_cast,
but I am seeking for ways to check types of handles to managed objects.....
Topic archived. No new replies allowed.