{"_id":"@bun-win32/netapi32","_rev":"7-7570c952e32d57108d7a18d52cf21f83","name":"@bun-win32/netapi32","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/netapi32","version":"1.0.0","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/netapi32@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":"21014e4072e5cb905a5afefa5cc243b62244e7e1","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-1.0.0.tgz","fileCount":5,"integrity":"sha512-nzGxPFZycWpC24JFbYDnAAV9EoHKMGYOpEoF/uhs66Wyq9scijGjDbZkRVlPfxPF6T4aaP1ee/eQ4nBjIunZ6A==","signatures":[{"sig":"MEUCIQC4egGNNJGbmCGHwnyBtq7p2bE4yPwoJFxQqPWmQorxBwIgC9tjZqWeKl1UzmsTaIwkVSIaHVr1xdE+1tiWFrP67Bw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73302},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"47397bc962d76e1406f36433b6af2961da0a71d6","private":false,"scripts":{"example":"bun ./example/netapi32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_1.0.0_1775496368274_0.14916095894184478","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/netapi32","version":"1.0.1","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/netapi32@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":"ba5962b7d00efb30a6e06889b60a146567fe5cff","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-1.0.1.tgz","fileCount":6,"integrity":"sha512-0g1Rvy4dhqFl4W3lJDUaD8m+eCzJv4OU73lYN8u3/m6x/kuqtHVpKTNRdRycQ/et9MzpQSNhIiXlppnd/iTuGw==","signatures":[{"sig":"MEQCIExiHLoyvllov8AAJuBdWWF6uPtTkghDoyd8x58XfEZbAiBgEI74b99ygVA1siO40kLWTfrArdG7M0jXEnMTUbLamQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75535},"main":"./index.ts","type":"module","module":"index.ts","shasum":"ba5962b7d00efb30a6e06889b60a146567fe5cff","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/netapi32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-0g1Rvy4dhqFl4W3lJDUaD8m+eCzJv4OU73lYN8u3/m6x/kuqtHVpKTNRdRycQ/et9MzpQSNhIiXlppnd/iTuGw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_1.0.1_1775514758208_0.9483818060569782","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bun-win32/netapi32","version":"1.0.2","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":{"name":"Stev Peifer","email":"stev@bell.net"},"license":"MIT","_id":"@bun-win32/netapi32@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":"97c088afe3200d1fcec7204696e3ed63a0fbd8c5","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-1.0.2.tgz","fileCount":6,"integrity":"sha512-dWsqpM1Ts3VPo0iXEtTj184quTE9hj+GXDU6o0KgsVVijaeDkl5C/kYVQJUB81H6erTL2OEOeqHGSdRqQpsCRg==","signatures":[{"sig":"MEYCIQCU8Pimi+Wn68a5wtxNn7gY1m0bu8ULsEnqEtH/taI/vAIhAJao7xcAGrHYxvzMj9Tg1Di6Q0gvOAIids/YfRMm2BLS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75883},"main":"./index.ts","type":"module","module":"index.ts","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"gitHead":"f86f0df557aa6cfee8907bf3af5592855a854c15","private":false,"scripts":{"example":"bun ./example/netapi32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.1.0","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_1.0.2_1775584499929_0.11819964728812171","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@bun-win32/netapi32","version":"1.0.3","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/netapi32@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":"1a065ff9d45c7e584d5f19095f4ea15b6a9d4977","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-1.0.3.tgz","fileCount":6,"integrity":"sha512-1y+jl4QJGV5jobaIDo7UvS+aRbUhuuEOxeutLW8jNa/S0c8a0NKp8ghrmkoxKd5pQ8snu69G16kIxgwb3+Pq3g==","signatures":[{"sig":"MEUCIG5Sb8qcpKL3zqkqv26tAvtWHhOfxC5iyrrXZUgNoTXqAiEAoiCFPO2fQR5dOmn/hT7mkj+3vqv3Gh7nP5k5pdH8FIg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":75940},"main":"./index.ts","type":"module","module":"index.ts","shasum":"1a065ff9d45c7e584d5f19095f4ea15b6a9d4977","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example":"bun ./example/netapi32.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-1y+jl4QJGV5jobaIDo7UvS+aRbUhuuEOxeutLW8jNa/S0c8a0NKp8ghrmkoxKd5pQ8snu69G16kIxgwb3+Pq3g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_1.0.3_1775616188395_0.7206651351989903","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@bun-win32/netapi32","version":"1.0.4","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/netapi32@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":"e280166d5808ec2d7d6b9668d70991070c9fe17b","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-1.0.4.tgz","fileCount":6,"integrity":"sha512-tOA0z6f43RpsOgEspkuxeL0qKx7NYwEgHJGL0QMiVgz3LFbrJdXV5OjrkUYAjTkMH71LZyMsxGlDgPJlJWUN/Q==","signatures":[{"sig":"MEYCIQCg3JasRGmvWW989ba7fmnRszCojBeyON4CNw1HKYFWRwIhANRYL41NdCoLBW0ZlzGzgzWfp10BsMZkFWUk1nZoA6A9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76042},"main":"./index.ts","type":"module","module":"index.ts","shasum":"e280166d5808ec2d7d6b9668d70991070c9fe17b","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:domain-audit":"bun ./example/domain-audit.ts","example:network-discovery":"bun ./example/network-discovery.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-tOA0z6f43RpsOgEspkuxeL0qKx7NYwEgHJGL0QMiVgz3LFbrJdXV5OjrkUYAjTkMH71LZyMsxGlDgPJlJWUN/Q==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_1.0.4_1775687637268_0.4343891560930535","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/netapi32","version":"2.0.0","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/netapi32@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":"9abb61417815ac9b2563653bcc729edbb3ed0a81","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-2.0.0.tgz","fileCount":6,"integrity":"sha512-K1/bBx0Q/cjX+bq4Cnd0gfPNegSMd80qPRNHYpDpIa0yK4KWyrImuZcU0yes/nTG/9zFC3f3QBwbuuBVKyUZhA==","signatures":[{"sig":"MEUCIGq2PbKzXTc/VD3pgakkWyIlcKi6087Y+5oDUEn60CBAAiEAiNNi+9VYkFrMmTzaZOiQ+sY9xYZW8tWME3hUC9zXwAs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78533},"main":"./index.ts","type":"module","module":"index.ts","shasum":"9abb61417815ac9b2563653bcc729edbb3ed0a81","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:domain-audit":"bun ./example/domain-audit.ts","example:network-discovery":"bun ./example/network-discovery.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-K1/bBx0Q/cjX+bq4Cnd0gfPNegSMd80qPRNHYpDpIa0yK4KWyrImuZcU0yes/nTG/9zFC3f3QBwbuuBVKyUZhA==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/netapi32"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 NETAPI32 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/netapi32_2.0.0_1782435478534_0.5057525793448916","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 NETAPI32 bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/netapi32","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/netapi32"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","netapi32","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:network-discovery":"bun ./example/network-discovery.ts","example:domain-audit":"bun ./example/domain-audit.ts"},"_id":"@bun-win32/netapi32@2.0.1","_integrity":"sha512-VLeWN2fk52NSCxm0DaQZphtcUDTNfvI5d6Y6uXtE10li5g86XATVlFcOFXERaZ7ztypAGJfP14oiJLPxsKvnqA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"4885eae0483058edd1472944258af98414aee0b0","dist":{"integrity":"sha512-VLeWN2fk52NSCxm0DaQZphtcUDTNfvI5d6Y6uXtE10li5g86XATVlFcOFXERaZ7ztypAGJfP14oiJLPxsKvnqA==","shasum":"4885eae0483058edd1472944258af98414aee0b0","tarball":"https://registry.npmjs.org/@bun-win32/netapi32/-/netapi32-2.0.1.tgz","fileCount":6,"unpackedSize":78533,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDrMEN7nKGtf3CGD1KhCxrUbHYPYZZUlrCx9vUwnmlm6QIhAObOnFFLno+dxXzEkLJQKm+vykxeLLeA3EfjzDGDE5SR"}]},"_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/netapi32_2.0.1_1782438137883_0.44612270068671234"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-06T17:26:08.115Z","modified":"2026-06-26T01:42:18.160Z","1.0.0":"2026-04-06T17:26:08.411Z","1.0.1":"2026-04-06T22:32:38.379Z","1.0.2":"2026-04-07T17:55:00.088Z","1.0.3":"2026-04-08T02:43:08.538Z","1.0.4":"2026-04-08T22:33:57.436Z","2.0.0":"2026-06-26T00:57:58.676Z","2.0.1":"2026-06-26T01:42:18.059Z"},"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","netapi32","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/netapi32"},"description":"Zero-dependency, zero-overhead Win32 NETAPI32 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/netapi32\r\n\r\nZero-dependency, zero-overhead Win32 NETAPI32 bindings for [Bun](https://bun.sh) on Windows.\r\n\r\n## Overview\r\n\r\n`@bun-win32/netapi32` exposes the `netapi32.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Netapi32`, 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## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `netapi32.dll` (users, groups, shares, sessions, servers, workstations, domain joins, WebDAV, DC locator, and more).\r\n- In-source docs in `structs/Netapi32.ts` with links to Microsoft Docs.\r\n- Lazy binding on first call; optional eager preload (`Netapi32.Preload()`).\r\n- No wrapper overhead; calls map 1:1 to native APIs.\r\n- Strongly-typed Win32 aliases (see `types/Netapi32.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/netapi32\r\n```\r\n\r\n## Quick Start\r\n\r\n```ts\r\nimport Netapi32, { NERR_Success } from '@bun-win32/netapi32';\r\n\r\n// Optionally bind a subset up-front\r\nNetapi32.Preload(['NetWkstaGetInfo', 'NetApiBufferFree']);\r\n\r\n// Query workstation info\r\nconst buf = Buffer.alloc(8);\r\nconst status = Netapi32.NetWkstaGetInfo(null, 100, buf.ptr);\r\n\r\nif (status === NERR_Success) {\r\n  console.log('NetWkstaGetInfo succeeded.');\r\n}\r\n\r\nNetapi32.NetApiBufferFree(buf.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              # Workstation info + user enumeration\r\n```\r\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Netapi32.Preload()`.\r\n- Windows only. Bun runtime required.\r\n","readmeFilename":"README.md"}