
Company News
Jerod Santo Joins Socket as Head of Media
Allow myself to introduce... myself.
@bun-win32/dwmapi
Advanced tools
Zero-dependency, zero-overhead Win32 DWMAPI bindings for Bun (FFI) on Windows.
Zero-dependency, zero-overhead Win32 DWMAPI bindings for Bun on Windows.
@bun-win32/dwmapi exposes the dwmapi.dll exports using Bun's FFI. It provides a single class, Dwmapi, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via Preload().
The bindings are strongly typed for a smooth DX in TypeScript.
dwmapi.dll (27 bindings covering Desktop Window Manager composition, blur, thumbnails, and window attributes).structs/Dwmapi.ts with links to Microsoft Docs.Dwmapi.Preload()).types/Dwmapi.ts).bun add @bun-win32/dwmapi
import Dwmapi, { WindowAttribute } from '@bun-win32/dwmapi';
// Optionally bind a subset up-front
Dwmapi.Preload(['DwmIsCompositionEnabled', 'DwmGetWindowAttribute', 'DwmSetWindowAttribute']);
// Check if DWM composition is enabled
const enabledBuf = Buffer.alloc(4);
Dwmapi.DwmIsCompositionEnabled(enabledBuf.ptr);
console.log('Composition enabled:', !!enabledBuf.readInt32LE(0));
// Get the system colorization color
const colorBuf = Buffer.alloc(4);
const opaqueBuf = Buffer.alloc(4);
Dwmapi.DwmGetColorizationColor(colorBuf.ptr, opaqueBuf.ptr);
console.log('Color:', '0x' + colorBuf.readUInt32LE(0).toString(16));
// Enable immersive dark mode on a window (requires a valid HWND)
// const darkMode = Buffer.alloc(4);
// darkMode.writeInt32LE(1, 0);
// Dwmapi.DwmSetWindowAttribute(hwnd, WindowAttribute.DWMWA_USE_IMMERSIVE_DARK_MODE, darkMode.ptr, 4);
[!NOTE] AI agents: see
AI.mdfor the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.
Run the included example:
bun run example
Dwmapi.Preload().Optional<T> (formally optional, SAL _*opt_) and Nullable<T> (plain [in]/[out] the docs say can be NULL), the null sentinel derived from T (null for pointers LP*/P*, 0n for handles/by-value addresses); direction is in the parameter name — _out (_Out_), _in_out (_Inout_), _In_ bare. See AI.md and the repo AGENTS.md.FAQs
Zero-dependency, zero-overhead Win32 DWMAPI bindings for Bun (FFI) on Windows.
The npm package @bun-win32/dwmapi receives a total of 76 weekly downloads. As such, @bun-win32/dwmapi popularity was classified as not popular.
We found that @bun-win32/dwmapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Allow myself to introduce... myself.

Research
/Security News
A Twitch browser extension on Chrome and Firefox forwards users’ live OAuth session tokens through proxies controlled by a Russian bot service.

Security News
Anthropic found biased reasoning and recklessness drove Claude Mythos 5 to publish malware on PyPI and compromise a security vendor.