Comparing pseudo handles?

I know we can check whether 2 handles are same by using CompareObjectHandles API.

However this won't work for pseudo handles.
Is there any way to compare 2 pseudo handles for equality?

For example you 2 HWND's and need to compare if they are equal, that is both are same window.
Last edited on
Hi malibor

I hope this helps a little or not.

HWND window1
HWND window2

window1=CreateWindowEx ...
window2=CreateWindowEx ...

compare window1 with window2
from what I understand such comparison is not valid because system may reuse handle once one of the 2 windows is destroyed.

But otherwise comparison is valid as long as both windows live.
Last edited on
i am imagining a stack of windows handlers ... or hiding windows ...
What do you mean with "pseudo handles" ?
pseudo handles are local to process as opposed to real handles which are system wide.

After some researching I learned comparing pseudo handles is not reliably possible.
A workaround that works is to wrap the handle into C++ object, implement destruction events and compare objects instead.
Topic archived. No new replies allowed.