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

There is a function
```
IsWindow
```
which does exactly what you asked for.
```
```
BOOL isRealHandle = IsWindow(unknwodnHandle);
```
```
Look at
this link
for more information.