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.4.2 to 2.4.3

CHANGELOG.md

2

dist/index.cjs.js

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

*
* @version 2.4.2
* @version 2.4.3
* @author waiting

@@ -8,0 +8,0 @@ * @license MIT

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

*
* @version 2.4.2
* @version 2.4.3
* @author waiting

@@ -8,0 +8,0 @@ * @license MIT

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

*
* @version 2.4.2
* @version 2.4.3
* @author waiting

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

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

@@ -1,9 +0,1 @@

import { throwError } from 'rxjs'
/* istanbul ignore next */
export function assertNever(x) {
throw new Error('Assert Never Unexpected object: ' + x)
}
/* istanbul ignore next */
export function assertNeverObb(x) {
return throwError(new Error('Assert Never Unexpected object: ' + x))
}
'use strict'
{
"name": "win32-def",
"author": "waiting",
"version": "2.4.2",
"version": "2.4.3",
"description": "win32 definitions for node-ffi",

@@ -50,3 +50,4 @@ "keywords": [

"dependencies": {
"rxjs": ">=6.2.0"
"@waiting/shared-core": "^1.3.0",
"rxjs": "^6.4.0"
},

@@ -61,3 +62,2 @@ "devDependencies": {

"coveralls": "^3.0.0",
"eslint": "^5.4.0",
"intelli-espower-loader": "^1.0.1",

@@ -67,3 +67,2 @@ "istanbul": "^0.4.5",

"mocha-lcov-reporter": "^1.3.0",
"nyc": "^13.0.1",
"power-assert": ">=1.5",

@@ -73,9 +72,9 @@ "rewire": "^4.0.0",

"rollup-plugin-commonjs": "^9.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-terser": "^3.0.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-terser": "^4.0.2",
"rxrunscript": "^5.2.0",
"source-map-support": "^0.5.6",
"ts-node": ">=7",
"tslint": "^5.11.0",
"ts-node": "^8.0.1",
"tslint": "^5.12.1",
"tslint-eslint-rules": "^5.4.0",
"typescript": ">=3",
"yargs": "^12.0.1"

@@ -87,2 +86,3 @@ },

"build": "npm run clean && npm run lint && npm run lint:t && npm run tsc && npm run jslint && npm run rp",
"devbuild": "npm run clean && npm run tsc:dev && npm run rp",
"clean": "rm -rf dist/*",

@@ -92,6 +92,9 @@ "cov": "nyc mocha",

"jslint": "eslint --fix dist/**/*.js",
"link_global": "npm link typescript",
"lint": "tslint --fix -p tsconfig.json -t stylish",
"lint:t": "tslint --fix -p test/tsconfig.json -t stylish",
"prepublishOnly": "npm run build",
"repo:init": "git config --local push.followTags true && git config --local core.hooksPath ./.githooks && git config --local remote.origin.prune true && git config --local remote.origin.tagopt \"--tags\" && git config --local remote.pushdefault origin && echo It may going for a long time. Plese wait... && npm i && ts-node -P .githooks/tsconfig.json .githooks/init.ts",
"release": "standard-version -r",
"release:first": "standard-version --first-release",
"repo:init": "sh .githooks/init-repo.sh",
"rp": "rollup -c rollup.config.js",

@@ -103,4 +106,5 @@ "rp:w": "npm run tsc:w | rollup -wc rollup.config.js",

"tsc": "tsc -p tsconfig.json",
"tsc:dev": "tsc -p tsconfig.dev.json",
"tsc:w": "tsc -p tsconfig.json -w"
}
}

@@ -9,2 +9,3 @@ # win32-def

[![Coverage Status](https://coveralls.io/repos/github/waitingsong/node-win32-def/badge.svg)](https://coveralls.io/github/waitingsong/node-win32-def)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

@@ -18,3 +19,3 @@

```powershell
npm install --save win32-def
npm install win32-def
```

@@ -21,0 +22,0 @@

@@ -9,2 +9,3 @@ # win32-def

[![Coverage Status](https://coveralls.io/repos/github/waitingsong/node-win32-def/badge.svg)](https://coveralls.io/github/waitingsong/node-win32-def)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

@@ -18,3 +19,3 @@

```powershell
npm install --save win32-def
npm install win32-def
```

@@ -21,0 +22,0 @@

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