{"_id":"@bun-win32/oleaut32","_rev":"4-6b3dd54769e8bbb09ccd5d547b707524","name":"@bun-win32/oleaut32","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/oleaut32","version":"1.0.0","keywords":["bun","ffi","win32","windows","oleaut32","ole","ole-automation","com","bstr","variant","safearray","idispatch","typelib","decimal","currency","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/oleaut32@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":"8b6d5a8b859234b02641c6a3942175f6274539c1","tarball":"https://registry.npmjs.org/@bun-win32/oleaut32/-/oleaut32-1.0.0.tgz","fileCount":6,"integrity":"sha512-Ed+8vwUbxprGaLEkHOO/YNCpTr85NUf+IufyLlmNn8H7XuEwh0XkT1L1VyBRI48BFP7cYvcwdwJTfo2NsE88yA==","signatures":[{"sig":"MEYCIQC0OYDNK7Usdlce/NPcQtUWf7Oiww/uu5JaPDtaw7whowIhAMgq9TauDy2guhNINvQC0ULab2W05T9POFsl0VecUP2k","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157417},"main":"./index.ts","type":"module","module":"index.ts","shasum":"8b6d5a8b859234b02641c6a3942175f6274539c1","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:typelib-explorer":"bun ./example/typelib-explorer.ts","example:variant-conversion-matrix":"bun ./example/variant-conversion-matrix.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-Ed+8vwUbxprGaLEkHOO/YNCpTr85NUf+IufyLlmNn8H7XuEwh0XkT1L1VyBRI48BFP7cYvcwdwJTfo2NsE88yA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/oleaut32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 OLEAUT32 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","@bun-win32/kernel32":"1.0.21"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/oleaut32_1.0.0_1778847652248_0.5797332302597835","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/oleaut32","version":"1.0.1","keywords":["bun","ffi","win32","windows","oleaut32","ole","ole-automation","com","bstr","variant","safearray","idispatch","typelib","decimal","currency","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/oleaut32@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":"3f7c478134d9cf8143d90fc9494afbb12583c034","tarball":"https://registry.npmjs.org/@bun-win32/oleaut32/-/oleaut32-1.0.1.tgz","fileCount":6,"integrity":"sha512-71m8mSl9hF2jdDaAuNENXgu6wgxTQfhQByORSYbEcTN6sUIKR+v8I2x1a1BsJWEScUiaMdHIpC7brcU732ZrtA==","signatures":[{"sig":"MEUCIClpP+Kkt8KiacrESugYSBTtjQpj99potM8aDnyrWnSRAiEAxYrW751CSm3Ej+gfZaGp0Iy+mMbbSwbXk6Vbkj2FGlo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157422},"main":"./index.ts","type":"module","module":"index.ts","shasum":"3f7c478134d9cf8143d90fc9494afbb12583c034","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:typelib-explorer":"bun ./example/typelib-explorer.ts","example:variant-conversion-matrix":"bun ./example/variant-conversion-matrix.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-71m8mSl9hF2jdDaAuNENXgu6wgxTQfhQByORSYbEcTN6sUIKR+v8I2x1a1BsJWEScUiaMdHIpC7brcU732ZrtA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/oleaut32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 OLEAUT32 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","@bun-win32/kernel32":"1.0.26"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/oleaut32_1.0.1_1781375539842_0.12917796501437517","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/oleaut32","version":"2.0.0","keywords":["bun","ffi","win32","windows","oleaut32","ole","ole-automation","com","bstr","variant","safearray","idispatch","typelib","decimal","currency","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/oleaut32@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":"0ce18ab640b78b82692c7c0cd1f11ac0f5294a53","tarball":"https://registry.npmjs.org/@bun-win32/oleaut32/-/oleaut32-2.0.0.tgz","fileCount":6,"integrity":"sha512-+FBmvlRKB5eB1ov0YzN3s1+EK09j0aKXvENbq3NPhNrZlk9p7pL7RgiX9OZsB34kHI91IkUQKQlmMkuxGtcHvQ==","signatures":[{"sig":"MEUCICN3mPSsc5ccfs9pu/zjeXA5ByrFXqsRtOlMB4NlfiqeAiEApI44sRqfwEqaw8RA6SX1iNo3W30Avwz8L9PnKCny/20=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":160488},"main":"./index.ts","type":"module","module":"index.ts","shasum":"0ce18ab640b78b82692c7c0cd1f11ac0f5294a53","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:typelib-explorer":"bun ./example/typelib-explorer.ts","example:variant-conversion-matrix":"bun ./example/variant-conversion-matrix.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-+FBmvlRKB5eB1ov0YzN3s1+EK09j0aKXvENbq3NPhNrZlk9p7pL7RgiX9OZsB34kHI91IkUQKQlmMkuxGtcHvQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/oleaut32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 OLEAUT32 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","@bun-win32/kernel32":"2.0.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/oleaut32_2.0.0_1782435487060_0.7222518076775717","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"},"devDependencies":{"@bun-win32/kernel32":"2.0.1","@types/bun":"latest"},"description":"Zero-dependency, zero-overhead Win32 OLEAUT32 bindings for Bun (FFI) on Windows.","exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/oleaut32","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/oleaut32"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","oleaut32","ole","ole-automation","com","bstr","variant","safearray","idispatch","typelib","decimal","currency","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:typelib-explorer":"bun ./example/typelib-explorer.ts","example:variant-conversion-matrix":"bun ./example/variant-conversion-matrix.ts"},"_id":"@bun-win32/oleaut32@2.0.1","_integrity":"sha512-6sedxdbqmqc2SyA5Q6USG4qalTn1D+GXEnsCLuI17Izh7D3qE4wyH7t55ElBLjjS1LF28HBaqavbluV4g3wxOw==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"37517bfc4da1b60ef6f9056efe3f3f2a6b1d62a9","dist":{"integrity":"sha512-6sedxdbqmqc2SyA5Q6USG4qalTn1D+GXEnsCLuI17Izh7D3qE4wyH7t55ElBLjjS1LF28HBaqavbluV4g3wxOw==","shasum":"37517bfc4da1b60ef6f9056efe3f3f2a6b1d62a9","tarball":"https://registry.npmjs.org/@bun-win32/oleaut32/-/oleaut32-2.0.1.tgz","fileCount":6,"unpackedSize":160488,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAcIZHITzYILAubI0bubANTXwOUfL0ypPGXqC5xv3oxkAiB+eKRaLo0FpaaAg63aMHbOktYhqBwtKqQMTyvj/OSw3Q=="}]},"_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/oleaut32_2.0.1_1782438147228_0.31704849518315714"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-15T12:20:52.052Z","modified":"2026-06-26T01:42:27.503Z","1.0.0":"2026-05-15T12:20:52.399Z","1.0.1":"2026-06-13T18:32:19.995Z","2.0.0":"2026-06-26T00:58:07.242Z","2.0.1":"2026-06-26T01:42:27.352Z"},"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","oleaut32","ole","ole-automation","com","bstr","variant","safearray","idispatch","typelib","decimal","currency","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/oleaut32"},"description":"Zero-dependency, zero-overhead Win32 OLEAUT32 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/oleaut32\r\n\r\nZero-dependency, zero-overhead Win32 OLEAUT32 bindings for [Bun](https://bun.sh) on Windows.\r\n\r\n## Overview\r\n\r\n`@bun-win32/oleaut32` exposes the `oleaut32.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Oleaut32`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\r\n\r\nThe bindings are strongly typed for a smooth DX in TypeScript.\r\n\r\n`oleaut32.dll` is the foundation of OLE Automation. It is the canonical companion to `ole32` and a hard dependency of nearly every COM client — IDispatch consumers, Active Scripting hosts, scripting bridges, type-library loaders, ActiveX containers, and anything that traffics in `VARIANT`, `BSTR`, `SAFEARRAY`, `DECIMAL`, or `CURRENCY` values.\r\n\r\n## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `oleaut32.dll` (BSTR, VARIANT, SAFEARRAY, type libraries, IDispatch helpers, OLE pictures, currency/decimal math, format and parse, and the full Var\\*From\\* conversion family).\r\n- 417 documented exports bound — every BSTR, VARIANT, SAFEARRAY, type-library, picture, error-info, active-object, dispatch-helper, marshaling, and Var conversion entry point.\r\n- In-source docs in `structs/Oleaut32.ts` with links to Microsoft Docs.\r\n- Lazy binding on first call; optional eager preload (`Oleaut32.Preload()`).\r\n- No wrapper overhead; calls map 1:1 to native APIs.\r\n- Strongly-typed Win32 aliases (see `types/Oleaut32.ts`).\r\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/oleaut32\r\n```\r\n\r\n## Quick Start\r\n\r\n```ts\r\nimport Oleaut32, { VarEnum } from '@bun-win32/oleaut32';\r\n\r\n// Optionally bind a subset up-front\r\nOleaut32.Preload(['SysAllocString', 'SysFreeString', 'VariantInit', 'VariantClear', 'VariantChangeType']);\r\n\r\n// Allocate a BSTR from a UTF-16LE buffer\r\nconst wide = Buffer.from('Hello, OLE!\\0', 'utf16le');\r\nconst bstr = Oleaut32.SysAllocString(wide.ptr);\r\n\r\nconst charCount = Oleaut32.SysStringLen(bstr);\r\nconst byteCount = Oleaut32.SysStringByteLen(bstr);\r\nconsole.log(`Length: ${charCount} chars, ${byteCount} bytes`);\r\n\r\n// Always free what you allocated\r\nOleaut32.SysFreeString(bstr);\r\n\r\n// Initialize a VARIANT, then clear it\r\nconst variant = Buffer.alloc(24); // VARIANT is 24 bytes on x64\r\nOleaut32.VariantInit(variant.ptr);\r\nconsole.log('VT:', variant.readUInt16LE(0), '== VT_EMPTY:', VarEnum.VT_EMPTY);\r\nOleaut32.VariantClear(variant.ptr);\r\n```\r\n\r\n> [!NOTE]\r\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.\r\n\r\n## Examples\r\n\r\nRun the included examples:\r\n\r\n```sh\r\nbun run example:variant-conversion-matrix  # Animated grid of Var*From* type coercions\r\nbun run example:typelib-explorer           # Full type-library inspection report\r\n```\r\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Oleaut32.Preload()`.\r\n- Windows only. Bun runtime required.\r\n- `BSTR` is a length-prefixed UTF-16LE string allocated by `SysAllocString*`. Always pair it with `SysFreeString` (or `SysReleaseString`).\r\n- `VARIANT` is 24 bytes on x64. Use `VariantInit` before populating and `VariantClear` before reuse/drop.\r\n- `CY` (currency) is a 64-bit fixed-point integer (10,000 units = 1 currency unit). Passed by value as `bigint`.\r\n- `DECIMAL` is a 16-byte struct passed by pointer in every API; allocate a 16-byte `Buffer`.\r\n","readmeFilename":"README.md"}