Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

win32-def

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

win32-def - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0

8

CHANGELOG.md

@@ -5,3 +5,3 @@ # Change Log

# [2.6.0](https://github.com/waitingsong/node-win32-def/compare/v2.5.0...v2.6.0) (2019-02-24)
# [2.7.0](https://github.com/waitingsong/node-win32-def/compare/v2.6.0...v2.7.0) (2019-02-24)

@@ -11,5 +11,5 @@

* add HARDWAREINPUT, HARDWAREINPUT_Struct ([4c91581](https://github.com/waitingsong/node-win32-def/commit/4c91581))
* add KEYBDINPUT, KEYBDINPUT_Struct ([d9f6196](https://github.com/waitingsong/node-win32-def/commit/d9f6196))
* add MOUSEINPUT, MOUSEINPUT_Struct ([74e0372](https://github.com/waitingsong/node-win32-def/commit/74e0372))
* add RAWHID, RAWHID_Struct ([cb6d538](https://github.com/waitingsong/node-win32-def/commit/cb6d538))
* add RAWINPUTHEADER, RAWINPUTHEADER_Struct ([50eebc0](https://github.com/waitingsong/node-win32-def/commit/50eebc0))
* add RAWKEYBOARD, RAWKEYBOARD_Struct ([2a67c29](https://github.com/waitingsong/node-win32-def/commit/2a67c29))

@@ -16,0 +16,0 @@

@@ -5,3 +5,3 @@ /**

*
* @version 2.6.0
* @version 2.7.0
* @author waiting

@@ -779,2 +779,25 @@ * @license MIT

};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */
const RAWHID = {
dwSizeHid: W.DWORD,
dwCount: W.DWORD,
/** bRawData[1] */
bRawData: W.BYTE,
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */
const RAWINPUTHEADER = {
dwType: W.DWORD,
dwSize: W.DWORD,
hDevice: W.HANDLE,
wParam: W.WPARAM,
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */
const RAWKEYBOARD = {
MakeCode: W.USHORT,
Flags: W.USHORT,
Reserved: W.USHORT,
VKey: W.USHORT,
Message: W.UINT,
ExtraInformation: W.ULONG,
};
const WINDOWINFO$1 = {

@@ -824,2 +847,5 @@ cbSize: W.DWORD,

UNICODE_STRING: UNICODE_STRING$1,
RAWHID: RAWHID,
RAWINPUTHEADER: RAWINPUTHEADER,
RAWKEYBOARD: RAWKEYBOARD,
WINDOWINFO: WINDOWINFO$1,

@@ -826,0 +852,0 @@ WNDCLASSEX: WNDCLASSEX$1,

@@ -5,3 +5,3 @@ /**

*
* @version 2.6.0
* @version 2.7.0
* @author waiting

@@ -775,2 +775,25 @@ * @license MIT

};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */
const RAWHID = {
dwSizeHid: W.DWORD,
dwCount: W.DWORD,
/** bRawData[1] */
bRawData: W.BYTE,
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */
const RAWINPUTHEADER = {
dwType: W.DWORD,
dwSize: W.DWORD,
hDevice: W.HANDLE,
wParam: W.WPARAM,
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */
const RAWKEYBOARD = {
MakeCode: W.USHORT,
Flags: W.USHORT,
Reserved: W.USHORT,
VKey: W.USHORT,
Message: W.UINT,
ExtraInformation: W.ULONG,
};
const WINDOWINFO$1 = {

@@ -820,2 +843,5 @@ cbSize: W.DWORD,

UNICODE_STRING: UNICODE_STRING$1,
RAWHID: RAWHID,
RAWINPUTHEADER: RAWINPUTHEADER,
RAWKEYBOARD: RAWKEYBOARD,
WINDOWINFO: WINDOWINFO$1,

@@ -822,0 +848,0 @@ WNDCLASSEX: WNDCLASSEX$1,

@@ -5,3 +5,3 @@ /**

*
* @version 2.6.0
* @version 2.7.0
* @author waiting

@@ -12,3 +12,3 @@ * @license MIT

const t="_WIN64_HOLDER_",n="_UNICODE_HOLDER_",i=new Set(["macroMap"]),e="x64"===process.arch,r=!0,N={singleton:!0,_UNICODE:!0,_WIN64:e},O=new Set(["bool","bool*","byte","byte*","char","uchar","char*","float","float*","int","int8","int16","int32","int64","int*","int8*","int16*","int32*","int64*","uint","uint8","uint16","uint32","uint64","uint*","uint8*","uint16*","uint32*","uint64*","int**","uint**","uint32**","uint64**","long","longlong","long*","longlong*","pointer","ushort","void","void*"]);var o=Object.freeze({_WIN64_HOLDER:t,_UNICODE_HOLDER:n,windefSkipKeys:i,_WIN64:e,_UNICODE:!0,settingsDefault:N,windefSet:O});function D(t,n,i){const e=u(t),r=P(n,i),N=E(e,r);return A(N,O),N}function L(i,e){if("string"==typeof i)return i;if(!i)throw new Error("parse_param_placeholder(ps, settings) value of ps invalid");if(!Array.isArray(i)||3!==i.length)throw new Error("parse_param_placeholder(ps, settings) value of ps must Array and has THREE elements");const r=H(e);let N="";switch(i[0]){case t:N=T(i,r._WIN64);break;case n:N=R(i,r._UNICODE);break;default:throw new Error("the value of param placeholder invlaid:"+i[0])}return N}function T(t,n){if("string"==typeof t)return t;if(!t||3!==t.length)throw new Error("_WIN64 macro should be Array and has 3 items");return n?t[1]:t[2]}function R(t,n){if("string"==typeof t)return t;if(!t||3!==t.length)throw new Error("_UNICODE macro should be Array and has 3 items");return n?t[1]:t[2]}function P(t,n){const i=new Map;for(const[e,r]of t.entries())i.set(e,L(r,n));return i}function E(t,n){const i={},e=new Map;for(const i of Object.keys(t))if(!e.has(i)&&n.has(i)){const t=n.get(i);if(!t)throw new Error(`Value of macroSrc item "${i}" blank`);e.set(i,t)}for(const[i,r]of Object.entries(t))if(!e.has(i)){if("string"!=typeof r)throw new Error(`prepare_windef_ref() missing entry for k/v: ${i}/${r}`);if(O.has(r))e.set(i,r);else{const N=a(r,t,n);"string"==typeof N&&N?e.set(i,N):e.set(i,r)}}return e.forEach((t,n)=>{i[n]=t}),i}function u(t){const n={};for(const i of Object.keys(t)){if("string"!=typeof t[i])throw new Error(`typeof value of ${i} NOT string`);Object.defineProperty(n,i,{value:t[i],writable:!0,enumerable:!0,configurable:!0})}return n}function H(t){const n=Object.assign({},N);return"undefined"!=typeof t&&t&&Object.keys(t).length&&Object.assign(n,t),n}function a(t,n,i){let e=I(t,n,i);if(!e)return"";for(let t=0,r=3;t<r;t++){const t=I(e,n,i);if(!t)break;e=t}return e}function I(t,n,i){if(i.has(t))return i.get(t);if("string"==typeof n[t]){const e=n[t];return e&&i.has(e)?i.get(e):e}return""}function s(t,n){return!!n.has(t)}function A(t,n){for(const[i,e]of Object.entries(t)){if(!i||!e)throw new Error(`validateWinData() k or v empty: "${i}"/"${e}"`);if("string"!=typeof e)throw new Error(`validateWinData() v not typeof string: "${i}"/"${e}"`);if(!s(e,n))throw new Error(`validateWinData() value is invalid ffi param value: "${i}"/"${e}"`)}}const f="uint16",c="uint32",S=t,W="PVOID",C=t,p=t,l="void",_="uint16",U="int16",G="int",h="bool",d="byte",w="pointer",g="char",b="char",y="DWORD",m="uint64",M="ULONG_PTR",B="uint32",v="uint64",F="float",V="HANDLE",j=t,k="HANDLE",Y="HANDLE",x="HANDLE",K="HANDLE",z="HANDLE",$="HANDLE",X="HANDLE",Z="HANDLE",q="HANDLE",J="HANDLE",Q="HANDLE",tt="HANDLE",nt="HANDLE",it="HANDLE",et="HANDLE",rt="HANDLE",Nt="HANDLE",Ot="HANDLE",ot="HANDLE",Dt="HANDLE",Lt="HANDLE",Tt="HANDLE",Rt="HANDLE",Pt="HANDLE",Et="HANDLE",ut="HANDLE",Ht="HANDLE",at="HANDLE",It="long",st="HANDLE",At="HANDLE",ft="HANDLE",ct="HANDLE",St="HANDLE",Wt="HANDLE",Ct="int",pt=t,lt="int8",_t="int16",Ut="int32",Gt="int64",ht="WORD",dt="DWORD",wt="DWORD",gt="DWORD",bt="long",yt="longlong",mt="int32",Mt="int64",Bt="LONG_PTR",vt="BOOL",Ft="byte*",Vt="DWORD",jt="uint8*",kt="uint16*",Yt=n,xt="void*",Kt="LPVOID",zt="uint16*",$t=t,Xt="int*",Zt="int32*",qt="pointer",Jt="pointer",Qt="char*",tn="uint16*",nn=n,en="uint16*",rn="LONG_PTR",Nn="uint32",On="int*",on="bool*",Dn="byte*",Ln="char*",Tn="uint8*",Rn=t,Pn="uint16*",En="uint32*",un="uint64*",Hn="DWORD_PTR",an="uint32*",In="uint64*",sn="float*",An="pointer",fn=t,cn=t,Sn="int*",Wn="int**",Cn="int8*",pn="int16*",ln="int32*",_n="int64*",Un="uint32*",Gn="long*",hn="int64*",dn="LONG_PTR",wn="int32*",gn="int64*",bn=t,yn=t,mn="pointer",Mn="pointer",Bn="int16*",vn="ULONG_PTR",Fn="pointer",Vn="char*",jn=n,kn=n,Yn=n,xn="pointer",Kn="pointer",zn="uint*",$n="uint**",Xn="uint8*",Zn="uint16*",qn="uint32*",Jn="uint64*",Qn="uint*",ti="uint64*",ni="uint64**",ii="uint*",ei="uint64*",ri="uint16*",Ni="uint16*",Oi="uint16*",oi="uint16*",Di="uint64",Li="HANDLE",Ti="LPVOID",Ri="HANDLE",Pi="int16",Ei="ULONG_PTR",ui="LONG_PTR",Hi=n,ai=n,Ii="uchar",si=t,Ai="uint",fi="uint",ci="uint8",Si="uint16",Wi="uint32",Ci="uint64",pi="uint",li="uint64",_i="uint32",Ui="uint64",Gi="ushort",hi="pointer",di=yt,wi="pointer",gi="pointer",bi="pointer",yi="LONG_PTR",mi="pointer",Mi="pointer",Bi="pointer",vi="char*",Fi="pointer",Vi="pointer",ji="pointer",ki="pointer",Yi="pointer",xi="pointer";var Ki=Object.freeze({ATOM:f,DWORD:c,PVOID:S,HANDLE:W,LONG_PTR:C,ULONG_PTR:p,VOID:l,WCHAR:_,WORD:U,BOOL:G,BOOLEAN:"bool",BYTE:d,CALLBACK:w,CCHAR:g,CHAR:b,COLORREF:"DWORD",DWORDLONG:"uint64",DWORD_PTR:M,DWORD32:B,DWORD64:v,FLOAT:F,HACCEL:V,HALF_PTR:j,HBITMAP:k,HBRUSH:Y,HCOLORSPACE:"HANDLE",HCONV:K,HCONVLIST:"HANDLE",HCURSOR:$,HDC:X,HDDEDATA:"HANDLE",HDESK:q,HDROP:J,HDWP:Q,HENHMETAFILE:"HANDLE",HFILE:nt,HFONT:it,HGDIOBJ:et,HGLOBAL:rt,HHOOK:Nt,HICON:Ot,HINSTANCE:"HANDLE",HKEY:Dt,HKL:Lt,HLOCAL:Tt,HMENU:Rt,HMETAFILE:"HANDLE",HMODULE:Et,HMONITOR:"HANDLE",HPALETTE:"HANDLE",HPEN:at,HRESULT:"long",HRGN:st,HRSRC:At,HSZ:ft,HWINEVENTHOOK:"HANDLE",HWINSTA:St,HWND:Wt,INT:Ct,INT_PTR:pt,INT8:lt,INT16:_t,INT32:Ut,INT64:Gt,LANGID:"WORD",LCID:dt,LCTYPE:wt,LGRPID:gt,LONG:bt,LONGLONG:yt,LONG32:mt,LONG64:Mt,LPARAM:Bt,LPBOOL:"BOOL",LPBYTE:Ft,LPCOLORREF:"DWORD",LPCSTR:jt,LPCWSTR:kt,LPCTSTR:Yt,LPVOID:xt,LPCVOID:Kt,LPDWORD:zt,LPHANDLE:$t,LPINT:Xt,LPLONG:Zt,LPMSG:qt,LPPOINT:Jt,LPSTR:Qt,LPWSTR:tn,LPTSTR:nn,LPWORD:en,LRESULT:rn,NTSTATUS:"uint32",PBOOL:On,PBOOLEAN:"bool*",PBYTE:Dn,PCHAR:Ln,PCSTR:Tn,PCTSTR:Rn,PCWSTR:Pn,PDWORD:En,PDWORDLONG:"uint64*",PDWORD_PTR:Hn,PDWORD32:an,PDWORD64:In,PFLOAT:sn,PHALF_PTR:"pointer",PHANDLE:fn,PHKEY:cn,PINT:Sn,PINT_PTR:"int**",PINT8:Cn,PINT16:pn,PINT32:ln,PINT64:_n,PLCID:Un,PLONG:Gn,PLONGLONG:"int64*",PLONG_PTR:dn,PLONG32:wn,PLONG64:gn,POINTER_32:bn,POINTER_64:yn,POINTER_SIGNED:"pointer",POINTER_UNSIGNED:"pointer",PSHORT:Bn,PSIZE_T:vn,PSSIZE_T:Fn,PSTR:Vn,PTBYTE:jn,PTCHAR:kn,PTSTR:Yn,PUCHAR:xn,PUHALF_PTR:"pointer",PUINT:zn,PUINT_PTR:"uint**",PUINT8:Xn,PUINT16:Zn,PUINT32:qn,PUINT64:Jn,PULONG:Qn,PULONGLONG:"uint64*",PULONG_PTR:"uint64**",PULONG32:"uint*",PULONG64:ei,PUSHORT:ri,PWCHAR:Ni,PWORD:Oi,PWSTR:oi,QWORD:Di,SC_HANDLE:"HANDLE",SC_LOCK:Ti,SERVICE_STATUS_HANDLE:"HANDLE",SHORT:Pi,SIZE_T:Ei,SSIZE_T:ui,TBYTE:Hi,TCHAR:ai,UCHAR:Ii,UHALF_PTR:si,UINT:Ai,UINT_PTR:"uint",UINT8:ci,UINT16:Si,UINT32:Wi,UINT64:Ci,ULONG:pi,ULONGLONG:"uint64",ULONG32:_i,ULONG64:Ui,USHORT:Gi,UNICODE_STRING:"pointer",USN:di,WINEVENTPROC:"pointer",WNDENUMPROC:"pointer",WNDPROC:bi,WPARAM:yi,LPINITCOMMONCONTROLSEX:"pointer",LPWNDCLASSEX:"pointer",PWINDOWINFO:"pointer",va_list:"char*",INITCOMMONCONTROLSEX:"pointer",MSG:Vi,POINT:ji,WNDCLASSEX:"pointer",WINDOWINFO:"pointer",RECT:xi});const zi=new Map([["PVOID",[t,"uint64*","uint32*"]],["LONG_PTR",[t,"int64","int32"]],["ULONG_PTR",[t,"uint64","uint32"]],["HALF_PTR",[t,"int32","int16"]],["INT_PTR",[t,"int64","int32"]],["LPCTSTR",[n,kt,jt]],["LPHANDLE",[t,"uint64*","uint32*"]],["LPTSTR",[n,tn,"uint8*"]],["PCTSTR",[t,kt,jt]],["PHANDLE",[t,"uint64**","uint32**"]],["PHKEY",[t,"uint64*","uint32*"]],["POINTER_32",[t,"uint64*","uint32*"]],["POINTER_64",[t,"uint64*","uint32*"]],["PTBYTE",[n,"int16*","int8*"]],["PTCHAR",[n,"uint16*","uint8*"]],["PTSTR",[n,tn,Qt]],["TBYTE",[n,"int16","int8"]],["TCHAR",[n,_,"uint8"]],["UHALF_PTR",[t,"uint32","uint16"]]]),$i=D(Ki,zi),Xi={uMsg:$i.DWORD,wParamL:$i.WORD,wParamH:$i.WORD},Zi={dwSize:$i.DWORD,dwICC:$i.DWORD},qi={wVk:$i.WORD,wScan:$i.WORD,dwFlags:$i.DWORD,time:$i.DWORD,dwExtraInfo:$i.ULONG_PTR},Ji={dx:$i.LONG,dy:$i.LONG,mouseData:$i.DWORD,dwFlags:$i.DWORD,time:$i.DWORD,dwExtraInfo:$i.ULONG_PTR},Qi={hwnd:$i.HWND,message:$i.UINT,wParam:$i.WPARAM,lParam:$i.LPARAM,time:$i.DWORD,pt:$i.POINT},te={x:$i.LONG,y:$i.LONG},ne={Reserved1:$i.PVOID,PebBaseAddress:$i.PVOID,Reserved2:$i.PVOID,UniqueProcessId:$i.ULONG_PTR,InheritedFromUniqueProcessId:$i.PVOID},ie={Length:$i.USHORT,MaximumLength:$i.USHORT,Buffer:$i.PWSTR},ee={cbSize:$i.DWORD,rcWindow:$i.RECT,rcClient:$i.RECT,dwStyle:$i.DWORD,dwExStyle:$i.DWORD,dwWindowStatus:$i.DWORD,cxWindowBorders:$i.UINT,cyWindowBorders:$i.UINT,atomWindowType:$i.ATOM,wCreatorVersion:$i.WORD},re={cbSize:$i.UINT,style:$i.UINT,lpfnWndProc:$i.WNDPROC,cbClsExtra:$i.INT,cbWndExtra:$i.INT,hInstance:$i.HINSTANCE,hIcon:$i.HICON,hCursor:$i.HCURSOR,hbrBackground:$i.HBRUSH,lpszMenuName:$i.LPCTSTR,lpszClassName:$i.LPCTSTR,hIconSm:$i.HICON},Ne={left:$i.LONG,top:$i.LONG,right:$i.LONG,bottom:$i.LONG};var Oe=Object.freeze({HARDWAREINPUT:Xi,INITCOMMONCONTROLSEX:Zi,KEYBDINPUT:qi,MOUSEINPUT:Ji,MSG:Qi,POINT:te,PROCESS_BASIC_INFORMATION:ne,UNICODE_STRING:ie,WINDOWINFO:ee,WNDCLASSEX:re,RECT:Ne,_RECT:Ne}),oe=Object.freeze({}),De=Object.freeze({});const Le=D(Ki,zi);export{o as Config,oe as FModel,De as DModel,Oe as DStruct,Le as DTypes};
const t="_WIN64_HOLDER_",n="_UNICODE_HOLDER_",i=new Set(["macroMap"]),e="x64"===process.arch,r=!0,N={singleton:!0,_UNICODE:!0,_WIN64:e},O=new Set(["bool","bool*","byte","byte*","char","uchar","char*","float","float*","int","int8","int16","int32","int64","int*","int8*","int16*","int32*","int64*","uint","uint8","uint16","uint32","uint64","uint*","uint8*","uint16*","uint32*","uint64*","int**","uint**","uint32**","uint64**","long","longlong","long*","longlong*","pointer","ushort","void","void*"]);var D=Object.freeze({_WIN64_HOLDER:t,_UNICODE_HOLDER:n,windefSkipKeys:i,_WIN64:e,_UNICODE:!0,settingsDefault:N,windefSet:O});function o(t,n,i){const e=u(t),r=P(n,i),N=E(e,r);return s(N,O),N}function L(i,e){if("string"==typeof i)return i;if(!i)throw new Error("parse_param_placeholder(ps, settings) value of ps invalid");if(!Array.isArray(i)||3!==i.length)throw new Error("parse_param_placeholder(ps, settings) value of ps must Array and has THREE elements");const r=H(e);let N="";switch(i[0]){case t:N=T(i,r._WIN64);break;case n:N=R(i,r._UNICODE);break;default:throw new Error("the value of param placeholder invlaid:"+i[0])}return N}function T(t,n){if("string"==typeof t)return t;if(!t||3!==t.length)throw new Error("_WIN64 macro should be Array and has 3 items");return n?t[1]:t[2]}function R(t,n){if("string"==typeof t)return t;if(!t||3!==t.length)throw new Error("_UNICODE macro should be Array and has 3 items");return n?t[1]:t[2]}function P(t,n){const i=new Map;for(const[e,r]of t.entries())i.set(e,L(r,n));return i}function E(t,n){const i={},e=new Map;for(const i of Object.keys(t))if(!e.has(i)&&n.has(i)){const t=n.get(i);if(!t)throw new Error(`Value of macroSrc item "${i}" blank`);e.set(i,t)}for(const[i,r]of Object.entries(t))if(!e.has(i)){if("string"!=typeof r)throw new Error(`prepare_windef_ref() missing entry for k/v: ${i}/${r}`);if(O.has(r))e.set(i,r);else{const N=a(r,t,n);"string"==typeof N&&N?e.set(i,N):e.set(i,r)}}return e.forEach((t,n)=>{i[n]=t}),i}function u(t){const n={};for(const i of Object.keys(t)){if("string"!=typeof t[i])throw new Error(`typeof value of ${i} NOT string`);Object.defineProperty(n,i,{value:t[i],writable:!0,enumerable:!0,configurable:!0})}return n}function H(t){const n=Object.assign({},N);return"undefined"!=typeof t&&t&&Object.keys(t).length&&Object.assign(n,t),n}function a(t,n,i){let e=I(t,n,i);if(!e)return"";for(let t=0,r=3;t<r;t++){const t=I(e,n,i);if(!t)break;e=t}return e}function I(t,n,i){if(i.has(t))return i.get(t);if("string"==typeof n[t]){const e=n[t];return e&&i.has(e)?i.get(e):e}return""}function A(t,n){return!!n.has(t)}function s(t,n){for(const[i,e]of Object.entries(t)){if(!i||!e)throw new Error(`validateWinData() k or v empty: "${i}"/"${e}"`);if("string"!=typeof e)throw new Error(`validateWinData() v not typeof string: "${i}"/"${e}"`);if(!A(e,n))throw new Error(`validateWinData() value is invalid ffi param value: "${i}"/"${e}"`)}}const W="uint16",S="uint32",f=t,c="PVOID",C=t,p=t,l="void",U="uint16",_="int16",d="int",G="bool",w="byte",h="pointer",g="char",b="char",y="DWORD",M="uint64",m="ULONG_PTR",B="uint32",v="uint64",F="float",V="HANDLE",Y=t,j="HANDLE",k="HANDLE",K="HANDLE",x="HANDLE",z="HANDLE",$="HANDLE",X="HANDLE",Z="HANDLE",q="HANDLE",J="HANDLE",Q="HANDLE",tt="HANDLE",nt="HANDLE",it="HANDLE",et="HANDLE",rt="HANDLE",Nt="HANDLE",Ot="HANDLE",Dt="HANDLE",ot="HANDLE",Lt="HANDLE",Tt="HANDLE",Rt="HANDLE",Pt="HANDLE",Et="HANDLE",ut="HANDLE",Ht="HANDLE",at="HANDLE",It="long",At="HANDLE",st="HANDLE",Wt="HANDLE",St="HANDLE",ft="HANDLE",ct="HANDLE",Ct="int",pt=t,lt="int8",Ut="int16",_t="int32",dt="int64",Gt="WORD",wt="DWORD",ht="DWORD",gt="DWORD",bt="long",yt="longlong",Mt="int32",mt="int64",Bt="LONG_PTR",vt="BOOL",Ft="byte*",Vt="DWORD",Yt="uint8*",jt="uint16*",kt=n,Kt="void*",xt="LPVOID",zt="uint16*",$t=t,Xt="int*",Zt="int32*",qt="pointer",Jt="pointer",Qt="char*",tn="uint16*",nn=n,en="uint16*",rn="LONG_PTR",Nn="uint32",On="int*",Dn="bool*",on="byte*",Ln="char*",Tn="uint8*",Rn=t,Pn="uint16*",En="uint32*",un="uint64*",Hn="DWORD_PTR",an="uint32*",In="uint64*",An="float*",sn="pointer",Wn=t,Sn=t,fn="int*",cn="int**",Cn="int8*",pn="int16*",ln="int32*",Un="int64*",_n="uint32*",dn="long*",Gn="int64*",wn="LONG_PTR",hn="int32*",gn="int64*",bn=t,yn=t,Mn="pointer",mn="pointer",Bn="int16*",vn="ULONG_PTR",Fn="pointer",Vn="char*",Yn=n,jn=n,kn=n,Kn="pointer",xn="pointer",zn="uint*",$n="uint**",Xn="uint8*",Zn="uint16*",qn="uint32*",Jn="uint64*",Qn="uint*",ti="uint64*",ni="uint64**",ii="uint*",ei="uint64*",ri="uint16*",Ni="uint16*",Oi="uint16*",Di="uint16*",oi="uint64",Li="HANDLE",Ti="LPVOID",Ri="HANDLE",Pi="int16",Ei="ULONG_PTR",ui="LONG_PTR",Hi=n,ai=n,Ii="uchar",Ai=t,si="uint",Wi="uint",Si="uint8",fi="uint16",ci="uint32",Ci="uint64",pi="uint",li="uint64",Ui="uint32",_i="uint64",di="ushort",Gi="pointer",wi=yt,hi="pointer",gi="pointer",bi="pointer",yi="LONG_PTR",Mi="pointer",mi="pointer",Bi="pointer",vi="char*",Fi="pointer",Vi="pointer",Yi="pointer",ji="pointer",ki="pointer",Ki="pointer";var xi=Object.freeze({ATOM:W,DWORD:S,PVOID:f,HANDLE:c,LONG_PTR:C,ULONG_PTR:p,VOID:l,WCHAR:U,WORD:_,BOOL:d,BOOLEAN:"bool",BYTE:w,CALLBACK:h,CCHAR:g,CHAR:b,COLORREF:"DWORD",DWORDLONG:"uint64",DWORD_PTR:m,DWORD32:B,DWORD64:v,FLOAT:F,HACCEL:V,HALF_PTR:Y,HBITMAP:j,HBRUSH:k,HCOLORSPACE:"HANDLE",HCONV:x,HCONVLIST:"HANDLE",HCURSOR:$,HDC:X,HDDEDATA:"HANDLE",HDESK:q,HDROP:J,HDWP:Q,HENHMETAFILE:"HANDLE",HFILE:nt,HFONT:it,HGDIOBJ:et,HGLOBAL:rt,HHOOK:Nt,HICON:Ot,HINSTANCE:"HANDLE",HKEY:ot,HKL:Lt,HLOCAL:Tt,HMENU:Rt,HMETAFILE:"HANDLE",HMODULE:Et,HMONITOR:"HANDLE",HPALETTE:"HANDLE",HPEN:at,HRESULT:"long",HRGN:At,HRSRC:st,HSZ:Wt,HWINEVENTHOOK:"HANDLE",HWINSTA:ft,HWND:ct,INT:Ct,INT_PTR:pt,INT8:lt,INT16:Ut,INT32:_t,INT64:dt,LANGID:"WORD",LCID:wt,LCTYPE:ht,LGRPID:gt,LONG:bt,LONGLONG:yt,LONG32:Mt,LONG64:mt,LPARAM:Bt,LPBOOL:"BOOL",LPBYTE:Ft,LPCOLORREF:"DWORD",LPCSTR:Yt,LPCWSTR:jt,LPCTSTR:kt,LPVOID:Kt,LPCVOID:xt,LPDWORD:zt,LPHANDLE:$t,LPINT:Xt,LPLONG:Zt,LPMSG:qt,LPPOINT:Jt,LPSTR:Qt,LPWSTR:tn,LPTSTR:nn,LPWORD:en,LRESULT:rn,NTSTATUS:"uint32",PBOOL:On,PBOOLEAN:"bool*",PBYTE:on,PCHAR:Ln,PCSTR:Tn,PCTSTR:Rn,PCWSTR:Pn,PDWORD:En,PDWORDLONG:"uint64*",PDWORD_PTR:Hn,PDWORD32:an,PDWORD64:In,PFLOAT:An,PHALF_PTR:"pointer",PHANDLE:Wn,PHKEY:Sn,PINT:fn,PINT_PTR:"int**",PINT8:Cn,PINT16:pn,PINT32:ln,PINT64:Un,PLCID:_n,PLONG:dn,PLONGLONG:"int64*",PLONG_PTR:wn,PLONG32:hn,PLONG64:gn,POINTER_32:bn,POINTER_64:yn,POINTER_SIGNED:"pointer",POINTER_UNSIGNED:"pointer",PSHORT:Bn,PSIZE_T:vn,PSSIZE_T:Fn,PSTR:Vn,PTBYTE:Yn,PTCHAR:jn,PTSTR:kn,PUCHAR:Kn,PUHALF_PTR:"pointer",PUINT:zn,PUINT_PTR:"uint**",PUINT8:Xn,PUINT16:Zn,PUINT32:qn,PUINT64:Jn,PULONG:Qn,PULONGLONG:"uint64*",PULONG_PTR:"uint64**",PULONG32:"uint*",PULONG64:ei,PUSHORT:ri,PWCHAR:Ni,PWORD:Oi,PWSTR:Di,QWORD:oi,SC_HANDLE:"HANDLE",SC_LOCK:Ti,SERVICE_STATUS_HANDLE:"HANDLE",SHORT:Pi,SIZE_T:Ei,SSIZE_T:ui,TBYTE:Hi,TCHAR:ai,UCHAR:Ii,UHALF_PTR:Ai,UINT:si,UINT_PTR:"uint",UINT8:Si,UINT16:fi,UINT32:ci,UINT64:Ci,ULONG:pi,ULONGLONG:"uint64",ULONG32:Ui,ULONG64:_i,USHORT:di,UNICODE_STRING:"pointer",USN:wi,WINEVENTPROC:"pointer",WNDENUMPROC:"pointer",WNDPROC:bi,WPARAM:yi,LPINITCOMMONCONTROLSEX:"pointer",LPWNDCLASSEX:"pointer",PWINDOWINFO:"pointer",va_list:"char*",INITCOMMONCONTROLSEX:"pointer",MSG:Vi,POINT:Yi,WNDCLASSEX:"pointer",WINDOWINFO:"pointer",RECT:Ki});const zi=new Map([["PVOID",[t,"uint64*","uint32*"]],["LONG_PTR",[t,"int64","int32"]],["ULONG_PTR",[t,"uint64","uint32"]],["HALF_PTR",[t,"int32","int16"]],["INT_PTR",[t,"int64","int32"]],["LPCTSTR",[n,jt,Yt]],["LPHANDLE",[t,"uint64*","uint32*"]],["LPTSTR",[n,tn,"uint8*"]],["PCTSTR",[t,jt,Yt]],["PHANDLE",[t,"uint64**","uint32**"]],["PHKEY",[t,"uint64*","uint32*"]],["POINTER_32",[t,"uint64*","uint32*"]],["POINTER_64",[t,"uint64*","uint32*"]],["PTBYTE",[n,"int16*","int8*"]],["PTCHAR",[n,"uint16*","uint8*"]],["PTSTR",[n,tn,Qt]],["TBYTE",[n,"int16","int8"]],["TCHAR",[n,U,"uint8"]],["UHALF_PTR",[t,"uint32","uint16"]]]),$i=o(xi,zi),Xi={uMsg:$i.DWORD,wParamL:$i.WORD,wParamH:$i.WORD},Zi={dwSize:$i.DWORD,dwICC:$i.DWORD},qi={wVk:$i.WORD,wScan:$i.WORD,dwFlags:$i.DWORD,time:$i.DWORD,dwExtraInfo:$i.ULONG_PTR},Ji={dx:$i.LONG,dy:$i.LONG,mouseData:$i.DWORD,dwFlags:$i.DWORD,time:$i.DWORD,dwExtraInfo:$i.ULONG_PTR},Qi={hwnd:$i.HWND,message:$i.UINT,wParam:$i.WPARAM,lParam:$i.LPARAM,time:$i.DWORD,pt:$i.POINT},te={x:$i.LONG,y:$i.LONG},ne={Reserved1:$i.PVOID,PebBaseAddress:$i.PVOID,Reserved2:$i.PVOID,UniqueProcessId:$i.ULONG_PTR,InheritedFromUniqueProcessId:$i.PVOID},ie={Length:$i.USHORT,MaximumLength:$i.USHORT,Buffer:$i.PWSTR},ee={dwSizeHid:$i.DWORD,dwCount:$i.DWORD,bRawData:$i.BYTE},re={dwType:$i.DWORD,dwSize:$i.DWORD,hDevice:$i.HANDLE,wParam:$i.WPARAM},Ne={MakeCode:$i.USHORT,Flags:$i.USHORT,Reserved:$i.USHORT,VKey:$i.USHORT,Message:$i.UINT,ExtraInformation:$i.ULONG},Oe={cbSize:$i.DWORD,rcWindow:$i.RECT,rcClient:$i.RECT,dwStyle:$i.DWORD,dwExStyle:$i.DWORD,dwWindowStatus:$i.DWORD,cxWindowBorders:$i.UINT,cyWindowBorders:$i.UINT,atomWindowType:$i.ATOM,wCreatorVersion:$i.WORD},De={cbSize:$i.UINT,style:$i.UINT,lpfnWndProc:$i.WNDPROC,cbClsExtra:$i.INT,cbWndExtra:$i.INT,hInstance:$i.HINSTANCE,hIcon:$i.HICON,hCursor:$i.HCURSOR,hbrBackground:$i.HBRUSH,lpszMenuName:$i.LPCTSTR,lpszClassName:$i.LPCTSTR,hIconSm:$i.HICON},oe={left:$i.LONG,top:$i.LONG,right:$i.LONG,bottom:$i.LONG};var Le=Object.freeze({HARDWAREINPUT:Xi,INITCOMMONCONTROLSEX:Zi,KEYBDINPUT:qi,MOUSEINPUT:Ji,MSG:Qi,POINT:te,PROCESS_BASIC_INFORMATION:ne,UNICODE_STRING:ie,RAWHID:ee,RAWINPUTHEADER:re,RAWKEYBOARD:Ne,WINDOWINFO:Oe,WNDCLASSEX:De,RECT:oe,_RECT:oe}),Te=Object.freeze({}),Re=Object.freeze({});const Pe=o(xi,zi);export{D as Config,Te as FModel,Re as DModel,Le as DStruct,Pe as DTypes};
//# sourceMappingURL=index.esm.min.js.map

@@ -64,2 +64,25 @@ /**

};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */
export declare const RAWHID: {
dwSizeHid: string;
dwCount: string;
/** bRawData[1] */
bRawData: string;
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */
export declare const RAWINPUTHEADER: {
dwType: string;
dwSize: string;
hDevice: string;
wParam: string;
};
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */
export declare const RAWKEYBOARD: {
MakeCode: string;
Flags: string;
Reserved: string;
VKey: string;
Message: string;
ExtraInformation: string;
};
export declare const WINDOWINFO: {

@@ -66,0 +89,0 @@ cbSize: string;

@@ -71,2 +71,25 @@ // windows data types struct for ref-struct module https://github.com/TooTallNate/ref-struct

}
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */
export const RAWHID = {
dwSizeHid: W.DWORD,
dwCount: W.DWORD,
/** bRawData[1] */
bRawData: W.BYTE,
}
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */
export const RAWINPUTHEADER = {
dwType: W.DWORD,
dwSize: W.DWORD,
hDevice: W.HANDLE,
wParam: W.WPARAM,
}
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */
export const RAWKEYBOARD = {
MakeCode: W.USHORT,
Flags: W.USHORT,
Reserved: W.USHORT,
VKey: W.USHORT,
Message: W.UINT,
ExtraInformation: W.ULONG,
}
export const WINDOWINFO = {

@@ -73,0 +96,0 @@ cbSize: W.DWORD,

/// <reference types="node" />
import { ATOM, DWORD, HBRUSH, HCURSOR, HICON, HINSTANCE, HWND, INT, LONG, LPARAM, LPCTSTR, UINT, ULONG_PTR, VOID, WNDPROC, WORD, WPARAM } from './common';
import { ATOM, BYTE, DWORD, HANDLE, HBRUSH, HCURSOR, HICON, HINSTANCE, HWND, INT, LONG, LPARAM, LPCTSTR, UINT, ULONG, ULONG_PTR, USHORT, VOID, WNDPROC, WORD, WPARAM } from './common';
/**

@@ -66,2 +66,28 @@ * Struct usage:

export { POINT_Struct as PointStruct };
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */
export declare type RAWHID = Buffer;
export interface RAWHID_Struct extends StructInstanceBase {
dwSizeHid: DWORD;
dwCount: DWORD;
/** bRawData[1] */
bRawData: BYTE;
}
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */
export declare type RAWINPUTHEADER = Buffer;
export interface RAWINPUTHEADER_Struct extends StructInstanceBase {
dwType: DWORD;
dwSize: DWORD;
hDevice: HANDLE;
wParam: WPARAM;
}
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */
export declare type RAWKEYBOARD = Buffer;
export interface RAWKEYBOARD_Struct extends StructInstanceBase {
MakeCode: USHORT;
Flags: USHORT;
Reserved: USHORT;
VKey: USHORT;
Message: UINT;
ExtraInformation: ULONG;
}
export declare type WNDCLASSEX = Buffer;

@@ -68,0 +94,0 @@ export interface WNDClASSEX_Struct extends StructInstanceBase {

{
"name": "win32-def",
"author": "waiting",
"version": "2.6.0",
"version": "2.7.0",
"description": "win32 definitions for node-ffi",

@@ -6,0 +6,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc