<p>Given a handle of type <code>HWND</code> is it possible to confirm that the handle represents a real window?</p>

[{'answer_id': 9670, 'author': 'Serge', 'author_id': 1007, 'author_profile': 'https://Stackoverflow.com/users/1007', 'pm_score': 5, 'selected': True, 'text': '<p>There is a function <code>IsWindow</code> which does exactly what you asked for.</p>\n\n<pre><code>BOOL isRealHandle = IsWindow(unknwodnHandle);\n</code></pre>\n\n<p>Look at <a href="http://msdn.microsoft.com/en-us/library/ms633528(VS.85).aspx" rel="nofollow noreferrer">this link</a> for more information.</p>\n'}, {'answer_id': 9671, 'author': 'graham.reeds', 'author_id': 342, 'author_profile': 'https://Stackoverflow.com/users/342', 'pm_score': 2, 'selected': False, 'text': "<p>Generally no. By the time you've got confirmation that a Window is valid another process/thread my come along and remove it for you.</p>\n"}]
['https://Stackoverflow.com/questions/9667', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/887/']