Skip to content

Instantly share code, notes, and snippets.

View GageSorrell's full-sized avatar

Gage Sorrell GageSorrell

View GitHub Profile
@GageSorrell
GageSorrell / Win32MessageLoopNodeAddonApi.cpp
Last active January 24, 2024 10:27
Create a Windows API (Win32) message loop with the node-addon-api.
/* Gist: Win32 Message Loop with `node-addon-api`
* Author: Gage Sorrell <[email protected]>
* Copyright: (c) 2023 Gage Sorrell
* License: MIT
*/
/* This file demonstrates how to get access to the Windows API (Win32)
* message loop in your NodeJS application via node-addon-api.
* This code goes into your node-addon-api package, with no additional
* build tools necessary.