Files
electron/spec/fixtures/native-addon/is-valid-window/src/impl_win.cc
John Kleinschmidt b2e73d28e2 build: update to yarn v4 (#48994)
* build: update to yarn v4

(cherry picked from commit 6adec744f3)

* chore: fixup types after yarn v4 migration

* chore: update nan yarn.lock patch

* build: automatically install git for dugite
2025-11-19 17:32:30 -05:00

15 lines
256 B
C++

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