{"_id":"@bun-win32/comctl32","_rev":"4-4f8b5182d5364cef0db08993b655ebf8","name":"@bun-win32/comctl32","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/comctl32","version":"1.0.0","keywords":["bun","ffi","win32","windows","comctl32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/comctl32@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"6753ace5670764c5331aa7276f7454d2b1dfa729","tarball":"https://registry.npmjs.org/@bun-win32/comctl32/-/comctl32-1.0.0.tgz","fileCount":6,"integrity":"sha512-URmUIF5thnLs723MJXm9+F0pJL/SGwHnw1qEMYC4we9yJ4+z3EHq0D4WJ6gJVZXq3HAfbaw5FJHsNFOGm0mC9g==","signatures":[{"sig":"MEQCIDYyBqE9uyV1/BF+Op0/TyEQrPeDnOtr3LRgL/5KGCUJAiABdut2crZEJbAEaSXAC5oYiBwA4EgTle/F3MZtR7mepw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52675},"main":"./index.ts","type":"module","module":"index.ts","shasum":"6753ace5670764c5331aa7276f7454d2b1dfa729","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:dpa-sort-race":"bun ./example/dpa-sort-race.ts","example:common-controls-inspector":"bun ./example/common-controls-inspector.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-URmUIF5thnLs723MJXm9+F0pJL/SGwHnw1qEMYC4we9yJ4+z3EHq0D4WJ6gJVZXq3HAfbaw5FJHsNFOGm0mC9g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/comctl32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 COMCTL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/comctl32_1.0.0_1776867973329_0.2824290649095451","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/comctl32","version":"1.0.1","keywords":["bun","ffi","win32","windows","comctl32","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/comctl32@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"141a07db21a785894e17b3f119cfcba8e80c1ea1","tarball":"https://registry.npmjs.org/@bun-win32/comctl32/-/comctl32-1.0.1.tgz","fileCount":6,"integrity":"sha512-El8tFYi61TFUcOYlQuavfTN25R0W7xv2U0JdovqWP29bM76my8/3ZR9bkdyjCodsWxsRup4tUBf6UQzdD4xTUA==","signatures":[{"sig":"MEUCIQD1oKkM5OqUxRp5JgvcDuCVkzxu7TRNItywl++HfsgQSgIgP1pOKebzI+7IWjCzMQjNGGAg7AnOkPTuP6g3y8Hxczs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53887},"main":"./index.ts","type":"module","module":"index.ts","shasum":"141a07db21a785894e17b3f119cfcba8e80c1ea1","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:dpa-sort-race":"bun ./example/dpa-sort-race.ts","example:common-controls-inspector":"bun ./example/common-controls-inspector.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-El8tFYi61TFUcOYlQuavfTN25R0W7xv2U0JdovqWP29bM76my8/3ZR9bkdyjCodsWxsRup4tUBf6UQzdD4xTUA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/comctl32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 COMCTL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/comctl32_1.0.1_1781130801051_0.28847163388809194","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/comctl32","version":"2.0.0","keywords":["bun","ffi","win32","windows","comctl32","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/comctl32@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"89c107c75fc824fe8ed4c802d952d66bfc4b1109","tarball":"https://registry.npmjs.org/@bun-win32/comctl32/-/comctl32-2.0.0.tgz","fileCount":6,"integrity":"sha512-0lLOe3z1R0Vsp1/pNv4uoGYBovBz7znTkWkIVMHBPo4aStzbCZFzczd4SNB/Bd2URaws6UoRHvdjHiAlPlCqzg==","signatures":[{"sig":"MEQCIDFw1r4LtiS3zP7860wqERQjSPHEEjNUCrRdlgwqBKpRAiA6xhvmT8yG/QSIyiUXK5yLDD9jHfqy9pg5qXtZdTF1sw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54541},"main":"./index.ts","type":"module","module":"index.ts","shasum":"89c107c75fc824fe8ed4c802d952d66bfc4b1109","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:dpa-sort-race":"bun ./example/dpa-sort-race.ts","example:common-controls-inspector":"bun ./example/common-controls-inspector.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-0lLOe3z1R0Vsp1/pNv4uoGYBovBz7znTkWkIVMHBPo4aStzbCZFzczd4SNB/Bd2URaws6UoRHvdjHiAlPlCqzg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/comctl32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 COMCTL32 bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/comctl32_2.0.0_1782435281060_0.6624159828887879","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 COMCTL32 bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/comctl32","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/comctl32"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","comctl32","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:common-controls-inspector":"bun ./example/common-controls-inspector.ts","example:dpa-sort-race":"bun ./example/dpa-sort-race.ts"},"_id":"@bun-win32/comctl32@2.0.1","_integrity":"sha512-RUTu07TAaswSSbRRLtlufcPmYGuYNsHU3u620mDV85yNL5NFVwsENlS9AbuWiiHxllG79rerdOXwI0Vf/QKIrQ==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"530b2a5c18b38b21db75fc231ee318bd1dbe215f","dist":{"integrity":"sha512-RUTu07TAaswSSbRRLtlufcPmYGuYNsHU3u620mDV85yNL5NFVwsENlS9AbuWiiHxllG79rerdOXwI0Vf/QKIrQ==","shasum":"530b2a5c18b38b21db75fc231ee318bd1dbe215f","tarball":"https://registry.npmjs.org/@bun-win32/comctl32/-/comctl32-2.0.1.tgz","fileCount":6,"unpackedSize":54541,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDgPN8URjEaX/0oZFRZmTmBndHMFx+f/ilfSqDb/mfzcgIhANccSWx45UoDBOuF3ROQ9qHfy7Vy0+pghmunM4OaSvso"}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/comctl32_2.0.1_1782437738917_0.13273530818816992"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T14:26:13.199Z","modified":"2026-06-26T01:35:39.205Z","1.0.0":"2026-04-22T14:26:13.476Z","1.0.1":"2026-06-10T22:33:21.169Z","2.0.0":"2026-06-26T00:54:41.270Z","2.0.1":"2026-06-26T01:35:39.066Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","comctl32","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/comctl32"},"description":"Zero-dependency, zero-overhead Win32 COMCTL32 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/comctl32\n\nZero-dependency, zero-overhead Win32 Comctl32 bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/comctl32` exposes the `comctl32.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Comctl32`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `comctl32.dll` (common controls, image lists, property sheets, DPA/DSA dynamic arrays, flat scroll bars, window subclassing).\n- In-source docs in `structs/Comctl32.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Comctl32.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases (see `types/Comctl32.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/comctl32\n```\n\n## Quick Start\n\n```ts\nimport Comctl32, { DllVersionPlatform, ImageListCreateFlags } from '@bun-win32/comctl32';\n\nComctl32.Preload(['DllGetVersion', 'ImageList_Create', 'ImageList_Destroy', 'ImageList_GetImageCount', 'InitCommonControls']);\n\nComctl32.InitCommonControls();\n\nconst dllVersionInfoBuffer = Buffer.alloc(20);\ndllVersionInfoBuffer.writeUInt32LE(20, 0);\n\nif (Comctl32.DllGetVersion(dllVersionInfoBuffer.ptr) !== 0) {\n  throw new Error('DllGetVersion failed');\n}\n\nconst majorVersion = dllVersionInfoBuffer.readUInt32LE(4);\nconst minorVersion = dllVersionInfoBuffer.readUInt32LE(8);\nconst buildNumber = dllVersionInfoBuffer.readUInt32LE(12);\nconst platform = DllVersionPlatform[dllVersionInfoBuffer.readUInt32LE(16)];\n\nconsole.log(`comctl32 v${majorVersion}.${minorVersion}.${buildNumber} (${platform})`);\n\nconst imageListHandle = Comctl32.ImageList_Create(16, 16, ImageListCreateFlags.ILC_COLOR32 | ImageListCreateFlags.ILC_MASK, 8, 4);\n\nif (imageListHandle === 0n) {\n  throw new Error('ImageList_Create failed');\n}\n\nconsole.log(`ImageList handle 0x${imageListHandle.toString(16)} — ${Comctl32.ImageList_GetImageCount(imageListHandle)} images`);\n\nComctl32.ImageList_Destroy(imageListHandle);\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:common-controls-inspector\nbun run example:dpa-sort-race\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Comctl32.Preload()`.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `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`.\n","readmeFilename":"README.md"}