{"_id":"@bun-win32/wlanapi","_rev":"7-9541e72cb4e0ffc569214e07381611ea","name":"@bun-win32/wlanapi","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/wlanapi","version":"1.0.0","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/wlanapi@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":"e71c3a85063cd6168b14bd296c3e90fddff5feb0","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-1.0.0.tgz","fileCount":6,"integrity":"sha512-Ym+B4O9Ha79CGW8tUMz2hPg5HM6fg/XADPmDZ66nB3lhQoE1eDIvu3aS+IQ7JY2g1AttB+Q1HaxakW/yduZGfg==","signatures":[{"sig":"MEUCIQCXf7dELRll9VRdGGsRNCtqNPqdMb+cchKDVJW71IroAwIgbC9U/oPTAd3agglzca0H90iQGUeC8w9AZ3IfhJ5+//w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43831},"main":"./index.ts","type":"module","module":"index.ts","shasum":"e71c3a85063cd6168b14bd296c3e90fddff5feb0","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/wlanapi.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-Ym+B4O9Ha79CGW8tUMz2hPg5HM6fg/XADPmDZ66nB3lhQoE1eDIvu3aS+IQ7JY2g1AttB+Q1HaxakW/yduZGfg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WLANAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wlanapi_1.0.0_1775606562816_0.19887356425146785","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/wlanapi","version":"1.0.1","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/wlanapi@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":"b3568142eac5f6a3a5e4fb8368635488ba253269","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-1.0.1.tgz","fileCount":6,"integrity":"sha512-DY3NnabXGUD0rAi4kDkAQrFbw5BWXhaA7iNOefiWljwH5JnlFkNvbS2SOHrcecANsMyd5t5D0Mqp8fPPF2aS3g==","signatures":[{"sig":"MEUCIQC8kUH/BjXdDDjZwWXtpgGNASx5AIucHIBHns7t3w6uWQIgfRCNC0FzfcLk9G6vuwBaengxqRXgdwujKOH2GZLFLRo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43837},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"2b64bef7a2042aebf24b0a409ee4a8f130ffca62","private":false,"scripts":{"example":"bun ./example/wlanapi.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 WLANAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"20.8.0","dependencies":{"@bun-win32/core":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wlanapi_1.0.1_1775615810182_0.2838718924617347","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bun-win32/wlanapi","version":"1.0.2","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/wlanapi@1.0.2","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":"59fd8833a4bf0da9d555db3f689bff4ddf1c040d","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-1.0.2.tgz","fileCount":6,"integrity":"sha512-vQYSox9Yiox9B6Tjm5Lpk9Hmg/g5TMGq8ZbR5gM6nOnkwG/R7DbgFOhSD98j10nPb5YKJ7F6aoRpl5Bbhu6xzg==","signatures":[{"sig":"MEUCIQDoRhv8e/ZrUERGi/2mVOLAmo4UGUkXNcgP/WQ2Oa4zzAIgTcjQZZ0k4OuPOGMFPlIZJgTRZOoA+Ak2Sn+tSkKLwHk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43831},"main":"./index.ts","type":"module","module":"index.ts","shasum":"59fd8833a4bf0da9d555db3f689bff4ddf1c040d","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/wlanapi.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-vQYSox9Yiox9B6Tjm5Lpk9Hmg/g5TMGq8ZbR5gM6nOnkwG/R7DbgFOhSD98j10nPb5YKJ7F6aoRpl5Bbhu6xzg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WLANAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wlanapi_1.0.2_1775615913621_0.4105056266117719","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bun-win32/wlanapi","version":"1.0.3","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/wlanapi@1.0.3","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":"d30d6c7b719c23cb01ce18675df58ba67f05f478","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-1.0.3.tgz","fileCount":6,"integrity":"sha512-z6gW0cYSq5gbXO/MMxtv/E9rX6B/8tkdNyckCVLKROOrHqF+4JPekauMygkI8j/csUWf0JLVpUT+WwRl4mEe2g==","signatures":[{"sig":"MEQCIBA7vLBjxQ2/g3H0b5+Jrjhr+is3T+SsdPrWEc3XcV9OAiBbFdhpZNdkxFnJ9RopUNRVp/7NlRKwpBR7Tc0WYH6RiA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43920},"main":"./index.ts","type":"module","module":"index.ts","shasum":"d30d6c7b719c23cb01ce18675df58ba67f05f478","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:signal-monitor":"bun ./example/signal-monitor.ts","example:wifi-diagnostic":"bun ./example/wifi-diagnostic.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-z6gW0cYSq5gbXO/MMxtv/E9rX6B/8tkdNyckCVLKROOrHqF+4JPekauMygkI8j/csUWf0JLVpUT+WwRl4mEe2g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WLANAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.1"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wlanapi_1.0.3_1775687632770_0.6188525324197258","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bun-win32/wlanapi","version":"1.0.4","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/wlanapi@1.0.4","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":"380541e4eb42e6d06e9e89da5af34de29adafe8b","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-1.0.4.tgz","fileCount":6,"integrity":"sha512-e7TwY1qsHLZobS2gP7gnQNUrfzIdrmB484S0OsPbKPUaiGi5UEqHXKlp8maLOe+q07bg/IRsvvGYiZF8IPgf4Q==","signatures":[{"sig":"MEQCIE9XPOfu3grTecUNSonBWTlel7MKP+BLtDRP+34dvw08AiAdrD1BjZpaQag+vQutmYG32A/LrK8tOnsUkNBjhaNkhA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43925},"main":"./index.ts","type":"module","module":"index.ts","shasum":"380541e4eb42e6d06e9e89da5af34de29adafe8b","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:signal-monitor":"bun ./example/signal-monitor.ts","example:wifi-diagnostic":"bun ./example/wifi-diagnostic.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-e7TwY1qsHLZobS2gP7gnQNUrfzIdrmB484S0OsPbKPUaiGi5UEqHXKlp8maLOe+q07bg/IRsvvGYiZF8IPgf4Q==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WLANAPI 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/wlanapi_1.0.4_1781375564485_0.5138240968822518","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/wlanapi","version":"2.0.0","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/wlanapi@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":"da5bbc9e256b04717d143477854a758a80c4fca4","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-2.0.0.tgz","fileCount":6,"integrity":"sha512-MMCdeLGPkoIGqoJIJdLG6bpwxEiaXzDB5xRIVP4CxDf31rsfUZueUk/cOKbZFQgZ57W+AVqXvq62v31yQWb9cw==","signatures":[{"sig":"MEYCIQCzG7hcQAQNL320ODqxgXtk19RlOk7xDjPD11O0+m3RCAIhAN2qBZPfABbVal1qy6ZTdbfAity6UW5G2aCuNx5QH/8x","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45785},"main":"./index.ts","type":"module","module":"index.ts","shasum":"da5bbc9e256b04717d143477854a758a80c4fca4","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:signal-monitor":"bun ./example/signal-monitor.ts","example:wifi-diagnostic":"bun ./example/wifi-diagnostic.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-MMCdeLGPkoIGqoJIJdLG6bpwxEiaXzDB5xRIVP4CxDf31rsfUZueUk/cOKbZFQgZ57W+AVqXvq62v31yQWb9cw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wlanapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WLANAPI 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/wlanapi_2.0.0_1782436002293_0.4727091096678817","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 WLANAPI bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/wlanapi","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/wlanapi"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:signal-monitor":"bun ./example/signal-monitor.ts","example:wifi-diagnostic":"bun ./example/wifi-diagnostic.ts"},"_id":"@bun-win32/wlanapi@2.0.1","_integrity":"sha512-MTaoRVDw+FZLa/1zDsqiJOlOuXnhaqwoonQxh+f3NG7yEJV+g3kP+kbXTezdoG263FwqXI8CQEIYhy0Ef88dBA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"253b694f2fdc52b646d5159e994ff323b9ad5d34","dist":{"integrity":"sha512-MTaoRVDw+FZLa/1zDsqiJOlOuXnhaqwoonQxh+f3NG7yEJV+g3kP+kbXTezdoG263FwqXI8CQEIYhy0Ef88dBA==","shasum":"253b694f2fdc52b646d5159e994ff323b9ad5d34","tarball":"https://registry.npmjs.org/@bun-win32/wlanapi/-/wlanapi-2.0.1.tgz","fileCount":6,"unpackedSize":45785,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICPcLI2Dl7Ao9rRikGUrXc8ksoSEKXRfhTIbpgvNTiLlAiBzi7pPqWfAUA4DA9w1ULl3zl3s+vKWoDT0i5uzqQLrng=="}]},"_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/wlanapi_2.0.1_1782438227370_0.7574332414390663"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-08T00:02:42.688Z","modified":"2026-06-26T01:43:47.647Z","1.0.0":"2026-04-08T00:02:42.962Z","1.0.1":"2026-04-08T02:36:50.331Z","1.0.2":"2026-04-08T02:38:33.779Z","1.0.3":"2026-04-08T22:33:52.922Z","1.0.4":"2026-06-13T18:32:44.636Z","2.0.0":"2026-06-26T01:06:42.449Z","2.0.1":"2026-06-26T01:43:47.531Z"},"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","wlanapi","wifi","native-wifi","wifi-direct","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/wlanapi"},"description":"Zero-dependency, zero-overhead Win32 WLANAPI bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/wlanapi\n\nZero-dependency, zero-overhead Win32 Wlanapi bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/wlanapi` exposes the `wlanapi.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Wlanapi`, 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 `wlanapi.dll` (Native Wifi, hosted network, and Wi-Fi Direct APIs).\n- In-source docs in `structs/Wlanapi.ts` with links to Microsoft Learn.\n- Lazy binding on first call; optional eager preload (`Wlanapi.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases, enums, and constants (see `types/Wlanapi.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/wlanapi\n```\n\n## Quick Start\n\n```ts\nimport { type Pointer, read, toArrayBuffer } from 'bun:ffi';\n\nimport Wlanapi, { WLAN_API_VERSION_2_0 } from '@bun-win32/wlanapi';\n\nconst negotiatedVersion = Buffer.alloc(4);\nconst clientHandle = Buffer.alloc(8);\n\nconst openStatus = Wlanapi.WlanOpenHandle(WLAN_API_VERSION_2_0, null, negotiatedVersion.ptr, clientHandle.ptr);\n\nif (openStatus !== 0) {\n  throw new Error(`WlanOpenHandle failed with status ${openStatus}`);\n}\n\nconst handle = clientHandle.readBigUInt64LE(0);\nconst interfaceList = Buffer.alloc(8);\n\ntry {\n  const enumStatus = Wlanapi.WlanEnumInterfaces(handle, null, interfaceList.ptr);\n\n  if (enumStatus !== 0) {\n    throw new Error(`WlanEnumInterfaces failed with status ${enumStatus}`);\n  }\n\n  const listPointer = read.ptr(interfaceList.ptr) as Pointer;\n\n  if (listPointer) {\n    const listHeader = new DataView(toArrayBuffer(listPointer, 0, 8));\n    const interfaceCount = listHeader.getUint32(0, true);\n\n    console.log(`Wireless interfaces: ${interfaceCount}`);\n\n    Wlanapi.WlanFreeMemory(listPointer);\n  }\n} finally {\n  Wlanapi.WlanCloseHandle(handle, null);\n}\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 example:\n\n```sh\nbun run example\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Wlanapi.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"}