#include "impl.h" #include namespace impl { bool IsValidWindow(char* handle, size_t size) { if (size != sizeof(HWND)) return false; HWND window = *reinterpret_cast(handle); return ::IsWindow(window); } } // namespace impl