Yes, those handles are not fake handles lol.
But I found what you need, when you make a call to a dll, the prototype of the function include an "aWnd" parameter, which is the handle of the window in which the command is being issued, this should be your correct target window.