Comparing version
@@ -6,2 +6,16 @@ # Change Log | ||
# [7.1.0](https://github.com/waitingsong/node-win32-api/compare/v7.0.2...v7.1.0) (2020-01-10) | ||
### Bug Fixes | ||
* **win32-def:** struct MSG, MSG_Struct miss field lPrivate ([81bea5d](https://github.com/waitingsong/node-win32-api/commit/81bea5d4e22794df0b2f9f58d7612b5df1d9cb2b)) | ||
* **win32-def:** type of char ([3e47988](https://github.com/waitingsong/node-win32-api/commit/3e479883e6f49bcdcb1a41080cbaee53e070e7d4)) | ||
* **win32-def:** types of the following ([9df3f28](https://github.com/waitingsong/node-win32-api/commit/9df3f2816aae1b23427d317ec427e19198592512)) | ||
* **win32-def:** value of POINTER_32 is `uint32` under x64 ([73b43ab](https://github.com/waitingsong/node-win32-api/commit/73b43ab16e05e3ef8a5b6bb9acb97c2bc884cdd6)) | ||
# [7.0.0](https://github.com/waitingsong/node-win32-api/compare/v6.2.0...v7.0.0) (2019-12-23) | ||
@@ -8,0 +22,0 @@ |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 3.3.0 | ||
* @version 7.0.0 | ||
* @author waiting | ||
@@ -277,3 +277,3 @@ * @license MIT | ||
if (!isValidDataDef(v, srcSet)) { | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}"`); | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}", may extra space`); | ||
} | ||
@@ -303,4 +303,4 @@ } | ||
const CALLBACK = 'pointer'; // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx | ||
const CCHAR = 'char'; | ||
const CHAR = 'char'; | ||
const CCHAR = 'uint8'; | ||
const CHAR = 'uint8'; | ||
const COLORREF = 'DWORD'; | ||
@@ -350,2 +350,3 @@ // export const CONST; | ||
const HWND = 'HANDLE'; | ||
/** A 32-bit signed integer */ | ||
const INT = 'int'; | ||
@@ -411,3 +412,3 @@ const INT_PTR = _WIN64_HOLDER; | ||
const PLONGLONG = 'int64*'; | ||
const PLONG_PTR = 'LONG_PTR'; | ||
const PLONG_PTR = 'pointer'; | ||
const PLONG32 = 'int32*'; | ||
@@ -452,4 +453,4 @@ const PLONG64 = 'int64*'; | ||
const SHORT = 'int16'; | ||
const SIZE_T = 'ULONG_PTR'; // ? | ||
const SSIZE_T = 'LONG_PTR'; // ? | ||
const SIZE_T = 'ULONG_PTR'; | ||
const SSIZE_T = 'LONG_PTR'; | ||
const TBYTE = _UNICODE_HOLDER; | ||
@@ -460,3 +461,3 @@ const TCHAR = _UNICODE_HOLDER; | ||
const UINT = 'uint'; | ||
const UINT_PTR = 'uint'; | ||
const UINT_PTR = _WIN64_HOLDER; | ||
const UINT8 = 'uint8'; | ||
@@ -470,4 +471,4 @@ const UINT16 = 'uint16'; | ||
const ULONG64 = 'uint64'; | ||
const UNICODE_STRING = 'pointer'; | ||
const USHORT = 'ushort'; | ||
const UNICODE_STRING = 'pointer'; | ||
const USN = LONGLONG; | ||
@@ -479,9 +480,8 @@ // export const WINAPI; | ||
/** | ||
* Caution: original be typedef UINT_PTR WPARAM; | ||
* but the CALLBACK WNDCLASSEX.lpfnWndProc will pass negative number and cause process exit. | ||
* so change to LONG_PTR | ||
* Note: original be typedef UINT_PTR WPARAM; | ||
* CALLBACK WNDCLASSEX.lpfnWndProc may pass negative number and cause process exit. | ||
*/ | ||
// export const WPARAM = UINT_PTR; | ||
const WPARAM = 'LONG_PTR'; | ||
const LPINITCOMMONCONTROLSEX = 'pointer'; // A pointer to an INITCOMMONCONTROLSEX | ||
const WPARAM = 'UINT_PTR'; | ||
// A pointer to an INITCOMMONCONTROLSEX | ||
const LPINITCOMMONCONTROLSEX = 'pointer'; | ||
const LPWNDCLASSEX = 'pointer'; // A pointer to a WNDCLASSEX | ||
@@ -672,4 +672,4 @@ const PWINDOWINFO = 'pointer'; // A pointer to a WINDOWINFO structure | ||
ULONG64: ULONG64, | ||
UNICODE_STRING: UNICODE_STRING, | ||
USHORT: USHORT, | ||
UNICODE_STRING: UNICODE_STRING, | ||
USN: USN, | ||
@@ -696,6 +696,5 @@ WINEVENTPROC: WINEVENTPROC, | ||
['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']], | ||
['LONG_PTR', [_WIN64_HOLDER, 'int64', 'int32']], | ||
['LPCTSTR', [_UNICODE_HOLDER, LPCWSTR, LPCSTR]], | ||
@@ -707,3 +706,3 @@ ['LPHANDLE', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['PHKEY', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint32*', 'uint32*']], | ||
['POINTER_64', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
@@ -716,2 +715,4 @@ ['PTBYTE', [_UNICODE_HOLDER, 'int16*', 'int8*']], | ||
['UHALF_PTR', [_WIN64_HOLDER, 'uint32', 'uint16']], | ||
['UINT_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
['ULONG_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
]); | ||
@@ -760,2 +761,3 @@ | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ | ||
const MSG$1 = { | ||
@@ -768,2 +770,3 @@ hwnd: W.HWND, | ||
pt: W.POINT, | ||
lPrivate: W.DWORD, | ||
}; | ||
@@ -787,3 +790,3 @@ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162805(v=vs.85).aspx | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ | ||
const RAWHID = { | ||
@@ -795,3 +798,3 @@ dwSizeHid: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputheader */ | ||
const RAWINPUTHEADER = { | ||
@@ -803,3 +806,3 @@ dwType: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawkeyboard */ | ||
const RAWKEYBOARD = { | ||
@@ -825,3 +828,3 @@ MakeCode: W.USHORT, | ||
}; | ||
// https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx | ||
/** https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx */ | ||
const WNDCLASSEX$1 = { | ||
@@ -848,3 +851,3 @@ cbSize: W.UINT, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ | ||
const FILETIME = { | ||
@@ -851,0 +854,0 @@ dwLowDateTime: W.DWORD, |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 3.3.0 | ||
* @version 7.0.0 | ||
* @author waiting | ||
@@ -273,3 +273,3 @@ * @license MIT | ||
if (!isValidDataDef(v, srcSet)) { | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}"`); | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}", may extra space`); | ||
} | ||
@@ -299,4 +299,4 @@ } | ||
const CALLBACK = 'pointer'; // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx | ||
const CCHAR = 'char'; | ||
const CHAR = 'char'; | ||
const CCHAR = 'uint8'; | ||
const CHAR = 'uint8'; | ||
const COLORREF = 'DWORD'; | ||
@@ -346,2 +346,3 @@ // export const CONST; | ||
const HWND = 'HANDLE'; | ||
/** A 32-bit signed integer */ | ||
const INT = 'int'; | ||
@@ -407,3 +408,3 @@ const INT_PTR = _WIN64_HOLDER; | ||
const PLONGLONG = 'int64*'; | ||
const PLONG_PTR = 'LONG_PTR'; | ||
const PLONG_PTR = 'pointer'; | ||
const PLONG32 = 'int32*'; | ||
@@ -448,4 +449,4 @@ const PLONG64 = 'int64*'; | ||
const SHORT = 'int16'; | ||
const SIZE_T = 'ULONG_PTR'; // ? | ||
const SSIZE_T = 'LONG_PTR'; // ? | ||
const SIZE_T = 'ULONG_PTR'; | ||
const SSIZE_T = 'LONG_PTR'; | ||
const TBYTE = _UNICODE_HOLDER; | ||
@@ -456,3 +457,3 @@ const TCHAR = _UNICODE_HOLDER; | ||
const UINT = 'uint'; | ||
const UINT_PTR = 'uint'; | ||
const UINT_PTR = _WIN64_HOLDER; | ||
const UINT8 = 'uint8'; | ||
@@ -466,4 +467,4 @@ const UINT16 = 'uint16'; | ||
const ULONG64 = 'uint64'; | ||
const UNICODE_STRING = 'pointer'; | ||
const USHORT = 'ushort'; | ||
const UNICODE_STRING = 'pointer'; | ||
const USN = LONGLONG; | ||
@@ -475,9 +476,8 @@ // export const WINAPI; | ||
/** | ||
* Caution: original be typedef UINT_PTR WPARAM; | ||
* but the CALLBACK WNDCLASSEX.lpfnWndProc will pass negative number and cause process exit. | ||
* so change to LONG_PTR | ||
* Note: original be typedef UINT_PTR WPARAM; | ||
* CALLBACK WNDCLASSEX.lpfnWndProc may pass negative number and cause process exit. | ||
*/ | ||
// export const WPARAM = UINT_PTR; | ||
const WPARAM = 'LONG_PTR'; | ||
const LPINITCOMMONCONTROLSEX = 'pointer'; // A pointer to an INITCOMMONCONTROLSEX | ||
const WPARAM = 'UINT_PTR'; | ||
// A pointer to an INITCOMMONCONTROLSEX | ||
const LPINITCOMMONCONTROLSEX = 'pointer'; | ||
const LPWNDCLASSEX = 'pointer'; // A pointer to a WNDCLASSEX | ||
@@ -668,4 +668,4 @@ const PWINDOWINFO = 'pointer'; // A pointer to a WINDOWINFO structure | ||
ULONG64: ULONG64, | ||
UNICODE_STRING: UNICODE_STRING, | ||
USHORT: USHORT, | ||
UNICODE_STRING: UNICODE_STRING, | ||
USN: USN, | ||
@@ -692,6 +692,5 @@ WINEVENTPROC: WINEVENTPROC, | ||
['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']], | ||
['LONG_PTR', [_WIN64_HOLDER, 'int64', 'int32']], | ||
['LPCTSTR', [_UNICODE_HOLDER, LPCWSTR, LPCSTR]], | ||
@@ -703,3 +702,3 @@ ['LPHANDLE', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['PHKEY', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint32*', 'uint32*']], | ||
['POINTER_64', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
@@ -712,2 +711,4 @@ ['PTBYTE', [_UNICODE_HOLDER, 'int16*', 'int8*']], | ||
['UHALF_PTR', [_WIN64_HOLDER, 'uint32', 'uint16']], | ||
['UINT_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
['ULONG_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
]); | ||
@@ -756,2 +757,3 @@ | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ | ||
const MSG$1 = { | ||
@@ -764,2 +766,3 @@ hwnd: W.HWND, | ||
pt: W.POINT, | ||
lPrivate: W.DWORD, | ||
}; | ||
@@ -783,3 +786,3 @@ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162805(v=vs.85).aspx | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ | ||
const RAWHID = { | ||
@@ -791,3 +794,3 @@ dwSizeHid: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputheader */ | ||
const RAWINPUTHEADER = { | ||
@@ -799,3 +802,3 @@ dwType: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawkeyboard */ | ||
const RAWKEYBOARD = { | ||
@@ -821,3 +824,3 @@ MakeCode: W.USHORT, | ||
}; | ||
// https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx | ||
/** https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx */ | ||
const WNDCLASSEX$1 = { | ||
@@ -844,3 +847,3 @@ cbSize: W.UINT, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ | ||
const FILETIME = { | ||
@@ -847,0 +850,0 @@ dwLowDateTime: W.DWORD, |
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 3.3.0 | ||
* @version 7.0.0 | ||
* @author waiting | ||
@@ -16,3 +16,3 @@ * @license MIT | ||
* | ||
* @version 3.3.0 | ||
* @version 7.0.0 | ||
* @author waiting | ||
@@ -22,3 +22,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({__proto__:null,_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 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={...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+=1){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",_="uint32",S=t,f="PVOID",C=t,c=t,l="void",p="uint16",U="int16",d="int",w="bool",G="byte",h="pointer",g="char",b="char",M="DWORD",m="uint64",y="ULONG_PTR",B="uint32",v="uint64",F="float",V="HANDLE",Y=t,k="HANDLE",K="HANDLE",j="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",ot="HANDLE",Dt="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",_t="HANDLE",St="HANDLE",ft="HANDLE",Ct="int",ct=t,lt="int8",pt="int16",Ut="int32",dt="int64",wt="WORD",Gt="DWORD",ht="DWORD",gt="DWORD",bt="long",Mt="longlong",mt="int32",yt="int64",Bt="LONG_PTR",vt="BOOL",Ft="byte*",Vt="DWORD",Yt="uint8*",kt="uint16*",Kt=n,jt="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*",on="bool*",Dn="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,_n=t,Sn="int*",fn="int**",Cn="int8*",cn="int16*",ln="int32*",pn="int64*",Un="uint32*",dn="long*",wn="int64*",Gn="LONG_PTR",hn="int32*",gn="int64*",bn=t,Mn=t,mn="pointer",yn="pointer",Bn="int16*",vn="ULONG_PTR",Fn="pointer",Vn="char*",Yn=n,kn=n,Kn=n,jn="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*",oi="uint16*",Di="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",_i="uint8",Si="uint16",fi="uint32",Ci="uint64",ci="uint",li="uint64",pi="uint32",Ui="uint64",di="ushort",wi="pointer",Gi=Mt,hi="pointer",gi="pointer",bi="pointer",Mi="LONG_PTR",mi="pointer",yi="pointer",Bi="pointer",vi="pointer",Fi="pointer",Vi="char*",Yi="pointer",ki="pointer",Ki="pointer",ji="pointer",xi="pointer",zi="pointer";var $i=Object.freeze({__proto__:null,ATOM:W,DWORD:_,PVOID:S,HANDLE:f,LONG_PTR:C,ULONG_PTR:c,VOID:l,WCHAR:p,WORD:U,BOOL:d,BOOLEAN:"bool",BYTE:G,CALLBACK:h,CCHAR:g,CHAR:b,COLORREF:"DWORD",DWORDLONG:"uint64",DWORD_PTR:y,DWORD32:B,DWORD64:v,FLOAT:F,HACCEL:V,HALF_PTR:Y,HBITMAP:k,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:Dt,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:St,HWND:ft,INT:Ct,INT_PTR:ct,INT8:lt,INT16:pt,INT32:Ut,INT64:dt,LANGID:"WORD",LCID:Gt,LCTYPE:ht,LGRPID:gt,LONG:bt,LONGLONG:Mt,LONG32:mt,LONG64:yt,LPARAM:Bt,LPBOOL:"BOOL",LPBYTE:Ft,LPCOLORREF:"DWORD",LPCSTR:Yt,LPCWSTR:kt,LPCTSTR:Kt,LPVOID:jt,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:Dn,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:_n,PINT:Sn,PINT_PTR:"int**",PINT8:Cn,PINT16:cn,PINT32:ln,PINT64:pn,PLCID:Un,PLONG:dn,PLONGLONG:"int64*",PLONG_PTR:Gn,PLONG32:hn,PLONG64:gn,POINTER_32:bn,POINTER_64:Mn,POINTER_SIGNED:"pointer",POINTER_UNSIGNED:"pointer",PSHORT:Bn,PSIZE_T:vn,PSSIZE_T:Fn,PSTR:Vn,PTBYTE:Yn,PTCHAR:kn,PTSTR:Kn,PUCHAR:jn,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:Ai,UINT:si,UINT_PTR:"uint",UINT8:_i,UINT16:Si,UINT32:fi,UINT64:Ci,ULONG:ci,ULONGLONG:"uint64",ULONG32:pi,ULONG64:Ui,USHORT:di,UNICODE_STRING:"pointer",USN:Gi,WINEVENTPROC:"pointer",WNDENUMPROC:"pointer",WNDPROC:bi,WPARAM:Mi,LPINITCOMMONCONTROLSEX:"pointer",LPWNDCLASSEX:"pointer",PWINDOWINFO:"pointer",PFILETIME:"pointer",LPFILETIME:"pointer",va_list:"char*",INITCOMMONCONTROLSEX:"pointer",MSG:ki,POINT:Ki,WNDCLASSEX:"pointer",WINDOWINFO:"pointer",RECT:zi});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,kt,Yt]],["LPHANDLE",[t,"uint64*","uint32*"]],["LPTSTR",[n,tn,"uint8*"]],["PCTSTR",[t,kt,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,p,"uint8"]],["UHALF_PTR",[t,"uint32","uint16"]]]),Zi=D($i,Xi),qi={uMsg:Zi.DWORD,wParamL:Zi.WORD,wParamH:Zi.WORD},Ji={dwSize:Zi.DWORD,dwICC:Zi.DWORD},Qi={wVk:Zi.WORD,wScan:Zi.WORD,dwFlags:Zi.DWORD,time:Zi.DWORD,dwExtraInfo:Zi.ULONG_PTR},te={dx:Zi.LONG,dy:Zi.LONG,mouseData:Zi.DWORD,dwFlags:Zi.DWORD,time:Zi.DWORD,dwExtraInfo:Zi.ULONG_PTR},ne={hwnd:Zi.HWND,message:Zi.UINT,wParam:Zi.WPARAM,lParam:Zi.LPARAM,time:Zi.DWORD,pt:Zi.POINT},ie={x:Zi.LONG,y:Zi.LONG},ee={Reserved1:Zi.PVOID,PebBaseAddress:Zi.PVOID,Reserved2:Zi.PVOID,UniqueProcessId:Zi.ULONG_PTR,InheritedFromUniqueProcessId:Zi.PVOID},re={Length:Zi.USHORT,MaximumLength:Zi.USHORT,Buffer:Zi.PWSTR},Ne={dwSizeHid:Zi.DWORD,dwCount:Zi.DWORD,bRawData:Zi.BYTE},Oe={dwType:Zi.DWORD,dwSize:Zi.DWORD,hDevice:Zi.HANDLE,wParam:Zi.WPARAM},oe={MakeCode:Zi.USHORT,Flags:Zi.USHORT,Reserved:Zi.USHORT,VKey:Zi.USHORT,Message:Zi.UINT,ExtraInformation:Zi.ULONG},De={cbSize:Zi.DWORD,rcWindow:Zi.RECT,rcClient:Zi.RECT,dwStyle:Zi.DWORD,dwExStyle:Zi.DWORD,dwWindowStatus:Zi.DWORD,cxWindowBorders:Zi.UINT,cyWindowBorders:Zi.UINT,atomWindowType:Zi.ATOM,wCreatorVersion:Zi.WORD},Le={cbSize:Zi.UINT,style:Zi.UINT,lpfnWndProc:Zi.WNDPROC,cbClsExtra:Zi.INT,cbWndExtra:Zi.INT,hInstance:Zi.HINSTANCE,hIcon:Zi.HICON,hCursor:Zi.HCURSOR,hbrBackground:Zi.HBRUSH,lpszMenuName:Zi.LPCTSTR,lpszClassName:Zi.LPCTSTR,hIconSm:Zi.HICON},Te={left:Zi.LONG,top:Zi.LONG,right:Zi.LONG,bottom:Zi.LONG},Re={dwLowDateTime:Zi.DWORD,dwHighDateTime:Zi.DWORD};var Pe=Object.freeze({__proto__:null,HARDWAREINPUT:qi,INITCOMMONCONTROLSEX:Ji,KEYBDINPUT:Qi,MOUSEINPUT:te,MSG:ne,POINT:ie,PROCESS_BASIC_INFORMATION:ee,UNICODE_STRING:re,RAWHID:Ne,RAWINPUTHEADER:Oe,RAWKEYBOARD:oe,WINDOWINFO:De,WNDCLASSEX:Le,RECT:Te,_RECT:Te,FILETIME:Re}),Ee=Object.freeze({__proto__:null}),ue=Object.freeze({__proto__:null}); | ||
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({__proto__:null,_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 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={...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+=1){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}", may extra space`)}}const W="uint16",_="uint32",S=t,p="PVOID",f=t,l=t,C="void",c="uint16",U="int16",d="int",w="bool",G="byte",h="pointer",g="uint8",b="uint8",M="DWORD",m="uint64",y="ULONG_PTR",v="uint32",B="uint64",F="float",V="HANDLE",Y=t,k="HANDLE",x="HANDLE",K="HANDLE",j="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",At="HANDLE",st="HANDLE",Wt="HANDLE",_t="HANDLE",St="HANDLE",pt="HANDLE",ft="int",lt=t,Ct="int8",ct="int16",Ut="int32",dt="int64",wt="WORD",Gt="DWORD",ht="DWORD",gt="DWORD",bt="long",Mt="longlong",mt="int32",yt="int64",vt="LONG_PTR",Bt="BOOL",Ft="byte*",Vt="DWORD",Yt="uint8*",kt="uint16*",xt=n,Kt="void*",jt="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*",An="float*",sn="pointer",Wn=t,_n=t,Sn="int*",pn="int**",fn="int8*",ln="int16*",Cn="int32*",cn="int64*",Un="uint32*",dn="long*",wn="int64*",Gn="pointer",hn="int32*",gn="int64*",bn=t,Mn=t,mn="pointer",yn="pointer",vn="int16*",Bn="ULONG_PTR",Fn="pointer",Vn="char*",Yn=n,kn=n,xn=n,Kn="pointer",jn="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",Ai=t,si="uint",Wi=t,_i="uint8",Si="uint16",pi="uint32",fi="uint64",li="uint",Ci="uint64",ci="uint32",Ui="uint64",di="pointer",wi="ushort",Gi=Mt,hi="pointer",gi="pointer",bi="pointer",Mi="UINT_PTR",mi="pointer",yi="pointer",vi="pointer",Bi="pointer",Fi="pointer",Vi="char*",Yi="pointer",ki="pointer",xi="pointer",Ki="pointer",ji="pointer",zi="pointer";var $i=Object.freeze({__proto__:null,ATOM:W,DWORD:_,PVOID:S,HANDLE:p,LONG_PTR:f,ULONG_PTR:l,VOID:C,WCHAR:c,WORD:U,BOOL:d,BOOLEAN:"bool",BYTE:G,CALLBACK:h,CCHAR:g,CHAR:b,COLORREF:"DWORD",DWORDLONG:"uint64",DWORD_PTR:y,DWORD32:v,DWORD64:B,FLOAT:F,HACCEL:V,HALF_PTR:Y,HBITMAP:k,HBRUSH:x,HCOLORSPACE:"HANDLE",HCONV:j,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:At,HRSRC:st,HSZ:Wt,HWINEVENTHOOK:"HANDLE",HWINSTA:St,HWND:pt,INT:ft,INT_PTR:lt,INT8:Ct,INT16:ct,INT32:Ut,INT64:dt,LANGID:"WORD",LCID:Gt,LCTYPE:ht,LGRPID:gt,LONG:bt,LONGLONG:Mt,LONG32:mt,LONG64:yt,LPARAM:vt,LPBOOL:"BOOL",LPBYTE:Ft,LPCOLORREF:"DWORD",LPCSTR:Yt,LPCWSTR:kt,LPCTSTR:xt,LPVOID:Kt,LPCVOID:jt,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:An,PHALF_PTR:"pointer",PHANDLE:Wn,PHKEY:_n,PINT:Sn,PINT_PTR:"int**",PINT8:fn,PINT16:ln,PINT32:Cn,PINT64:cn,PLCID:Un,PLONG:dn,PLONGLONG:"int64*",PLONG_PTR:"pointer",PLONG32:hn,PLONG64:gn,POINTER_32:bn,POINTER_64:Mn,POINTER_SIGNED:"pointer",POINTER_UNSIGNED:"pointer",PSHORT:vn,PSIZE_T:Bn,PSSIZE_T:Fn,PSTR:Vn,PTBYTE:Yn,PTCHAR:kn,PTSTR:xn,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: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:Ai,UINT:si,UINT_PTR:Wi,UINT8:_i,UINT16:Si,UINT32:pi,UINT64:fi,ULONG:li,ULONGLONG:"uint64",ULONG32:ci,ULONG64:Ui,UNICODE_STRING:"pointer",USHORT:wi,USN:Gi,WINEVENTPROC:"pointer",WNDENUMPROC:"pointer",WNDPROC:bi,WPARAM:Mi,LPINITCOMMONCONTROLSEX:"pointer",LPWNDCLASSEX:"pointer",PWINDOWINFO:"pointer",PFILETIME:"pointer",LPFILETIME:"pointer",va_list:"char*",INITCOMMONCONTROLSEX:"pointer",MSG:ki,POINT:xi,WNDCLASSEX:"pointer",WINDOWINFO:"pointer",RECT:zi});const Xi=new Map([["PVOID",[t,"uint64*","uint32*"]],["HALF_PTR",[t,"int32","int16"]],["INT_PTR",[t,"int64","int32"]],["LONG_PTR",[t,"int64","int32"]],["LPCTSTR",[n,kt,Yt]],["LPHANDLE",[t,"uint64*","uint32*"]],["LPTSTR",[n,tn,"uint8*"]],["PCTSTR",[t,kt,Yt]],["PHANDLE",[t,"uint64**","uint32**"]],["PHKEY",[t,"uint64*","uint32*"]],["POINTER_32",[t,"uint32*","uint32*"]],["POINTER_64",[t,"uint64*","uint32*"]],["PTBYTE",[n,"int16*","int8*"]],["PTCHAR",[n,"uint16*","uint8*"]],["PTSTR",[n,tn,Qt]],["TBYTE",[n,"int16","int8"]],["TCHAR",[n,c,"uint8"]],["UHALF_PTR",[t,"uint32","uint16"]],["UINT_PTR",[t,"uint64","uint32"]],["ULONG_PTR",[t,"uint64","uint32"]]]),Zi=D($i,Xi),qi={uMsg:Zi.DWORD,wParamL:Zi.WORD,wParamH:Zi.WORD},Ji={dwSize:Zi.DWORD,dwICC:Zi.DWORD},Qi={wVk:Zi.WORD,wScan:Zi.WORD,dwFlags:Zi.DWORD,time:Zi.DWORD,dwExtraInfo:Zi.ULONG_PTR},te={dx:Zi.LONG,dy:Zi.LONG,mouseData:Zi.DWORD,dwFlags:Zi.DWORD,time:Zi.DWORD,dwExtraInfo:Zi.ULONG_PTR},ne={hwnd:Zi.HWND,message:Zi.UINT,wParam:Zi.WPARAM,lParam:Zi.LPARAM,time:Zi.DWORD,pt:Zi.POINT,lPrivate:Zi.DWORD},ie={x:Zi.LONG,y:Zi.LONG},ee={Reserved1:Zi.PVOID,PebBaseAddress:Zi.PVOID,Reserved2:Zi.PVOID,UniqueProcessId:Zi.ULONG_PTR,InheritedFromUniqueProcessId:Zi.PVOID},re={Length:Zi.USHORT,MaximumLength:Zi.USHORT,Buffer:Zi.PWSTR},Ne={dwSizeHid:Zi.DWORD,dwCount:Zi.DWORD,bRawData:Zi.BYTE},Oe={dwType:Zi.DWORD,dwSize:Zi.DWORD,hDevice:Zi.HANDLE,wParam:Zi.WPARAM},oe={MakeCode:Zi.USHORT,Flags:Zi.USHORT,Reserved:Zi.USHORT,VKey:Zi.USHORT,Message:Zi.UINT,ExtraInformation:Zi.ULONG},De={cbSize:Zi.DWORD,rcWindow:Zi.RECT,rcClient:Zi.RECT,dwStyle:Zi.DWORD,dwExStyle:Zi.DWORD,dwWindowStatus:Zi.DWORD,cxWindowBorders:Zi.UINT,cyWindowBorders:Zi.UINT,atomWindowType:Zi.ATOM,wCreatorVersion:Zi.WORD},Le={cbSize:Zi.UINT,style:Zi.UINT,lpfnWndProc:Zi.WNDPROC,cbClsExtra:Zi.INT,cbWndExtra:Zi.INT,hInstance:Zi.HINSTANCE,hIcon:Zi.HICON,hCursor:Zi.HCURSOR,hbrBackground:Zi.HBRUSH,lpszMenuName:Zi.LPCTSTR,lpszClassName:Zi.LPCTSTR,hIconSm:Zi.HICON},Te={left:Zi.LONG,top:Zi.LONG,right:Zi.LONG,bottom:Zi.LONG},Re={dwLowDateTime:Zi.DWORD,dwHighDateTime:Zi.DWORD};var Pe=Object.freeze({__proto__:null,HARDWAREINPUT:qi,INITCOMMONCONTROLSEX:Ji,KEYBDINPUT:Qi,MOUSEINPUT:te,MSG:ne,POINT:ie,PROCESS_BASIC_INFORMATION:ee,UNICODE_STRING:re,RAWHID:Ne,RAWINPUTHEADER:Oe,RAWKEYBOARD:oe,WINDOWINFO:De,WNDCLASSEX:Le,RECT:Te,_RECT:Te,FILETIME:Re}),Ee=Object.freeze({__proto__:null}),ue=Object.freeze({__proto__:null}); | ||
/** | ||
@@ -25,0 +25,0 @@ * node-win32-def |
@@ -40,2 +40,3 @@ /** | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ | ||
export declare const MSG: { | ||
@@ -48,2 +49,3 @@ hwnd: string; | ||
pt: string; | ||
lPrivate: string; | ||
}; | ||
@@ -66,3 +68,3 @@ export declare const POINT: { | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ | ||
export declare const RAWHID: { | ||
@@ -74,3 +76,3 @@ dwSizeHid: string; | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputheader */ | ||
export declare const RAWINPUTHEADER: { | ||
@@ -82,3 +84,3 @@ dwType: string; | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawkeyboard */ | ||
export declare const RAWKEYBOARD: { | ||
@@ -104,2 +106,3 @@ MakeCode: string; | ||
}; | ||
/** https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx */ | ||
export declare const WNDCLASSEX: { | ||
@@ -126,3 +129,3 @@ cbSize: string; | ||
export { RECT as _RECT }; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ | ||
export declare const FILETIME: { | ||
@@ -129,0 +132,0 @@ dwLowDateTime: string; |
@@ -46,2 +46,3 @@ /* eslint-disable id-length */ | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ | ||
export const MSG = { | ||
@@ -54,2 +55,3 @@ hwnd: W.HWND, | ||
pt: W.POINT, | ||
lPrivate: W.DWORD, | ||
}; | ||
@@ -73,3 +75,3 @@ // https://msdn.microsoft.com/en-us/library/windows/desktop/dd162805(v=vs.85).aspx | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawhid */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ | ||
export const RAWHID = { | ||
@@ -81,3 +83,3 @@ dwSizeHid: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawinputheader */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinputheader */ | ||
export const RAWINPUTHEADER = { | ||
@@ -89,3 +91,3 @@ dwType: W.DWORD, | ||
}; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/winuser/ns-winuser-tagrawkeyboard */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawkeyboard */ | ||
export const RAWKEYBOARD = { | ||
@@ -111,3 +113,3 @@ MakeCode: W.USHORT, | ||
}; | ||
// https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx | ||
/** https://msdn.microsoft.com/zh-cn/library/windows/desktop/ms633577(v=vs.85).aspx */ | ||
export const WNDCLASSEX = { | ||
@@ -135,3 +137,3 @@ cbSize: W.UINT, | ||
export { RECT as _RECT }; | ||
/** https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime */ | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ | ||
export const FILETIME = { | ||
@@ -138,0 +140,0 @@ dwLowDateTime: W.DWORD, |
@@ -194,5 +194,5 @@ import { settingsDefault, windefSet, _UNICODE_HOLDER, _WIN64_HOLDER, } from './config'; | ||
if (!isValidDataDef(v, srcSet)) { | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}"`); | ||
throw new Error(`validateWinData() value is invalid ffi param value: "${k}"/"${v}", may extra space`); | ||
} | ||
} | ||
} |
@@ -5,6 +5,5 @@ import { _UNICODE_HOLDER, _WIN64_HOLDER, } from './config'; | ||
['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']], | ||
['LONG_PTR', [_WIN64_HOLDER, 'int64', 'int32']], | ||
['LPCTSTR', [_UNICODE_HOLDER, LPCWSTR, LPCSTR]], | ||
@@ -16,3 +15,3 @@ ['LPHANDLE', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['PHKEY', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
['POINTER_32', [_WIN64_HOLDER, 'uint32*', 'uint32*']], | ||
['POINTER_64', [_WIN64_HOLDER, 'uint64*', 'uint32*']], | ||
@@ -25,2 +24,4 @@ ['PTBYTE', [_UNICODE_HOLDER, 'int16*', 'int8*']], | ||
['UHALF_PTR', [_WIN64_HOLDER, 'uint32', 'uint16']], | ||
['UINT_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
['ULONG_PTR', [_WIN64_HOLDER, 'uint64', 'uint32']], | ||
]); |
/// <reference types="node" /> | ||
export declare type HWND = Buffer; | ||
export declare type _POINTER = Buffer; | ||
export declare type ATOM = number; | ||
@@ -10,52 +10,54 @@ export declare type DWORD = number; | ||
export declare type VOID = number & Buffer & void; | ||
export declare type WCHAR = string; | ||
export declare type WORD = string; | ||
export declare type WCHAR = UINT16; | ||
export declare type WORD = INT16; | ||
export declare type BOOL = number; | ||
export declare type BOOLEAN = boolean; | ||
export declare type BYTE = number; | ||
export declare type CALLBACK = Buffer; | ||
export declare type CCHAR = string; | ||
export declare type CHAR = string; | ||
export declare type CALLBACK = _POINTER; | ||
export declare type CCHAR = UINT8; | ||
export declare type CHAR = UINT8; | ||
export declare type COLORREF = number; | ||
export declare type DWORDLONG = number; | ||
export declare type DWORD_PTR = number; | ||
export declare type DWORD_PTR = ULONG_PTR; | ||
export declare type DWORD32 = number; | ||
export declare type DWORD64 = number; | ||
export declare type FLOAT = number; | ||
export declare type HACCEL = Buffer; | ||
export declare type HACCEL = HANDLE; | ||
export declare type HALF_PTR = number; | ||
export declare type HBITMAP = Buffer; | ||
export declare type HBRUSH = Buffer; | ||
export declare type HCOLORSPACE = Buffer; | ||
export declare type HCONV = Buffer; | ||
export declare type HCONVLIST = Buffer; | ||
export declare type HCURSOR = Buffer; | ||
export declare type HDC = Buffer; | ||
export declare type HDDEDATA = Buffer; | ||
export declare type HDESK = Buffer; | ||
export declare type HDROP = Buffer; | ||
export declare type HDWP = Buffer; | ||
export declare type HENHMETAFILE = Buffer; | ||
export declare type HFILE = Buffer; | ||
export declare type HFONT = Buffer; | ||
export declare type HGDIOBJ = Buffer; | ||
export declare type HGLOBAL = Buffer; | ||
export declare type HHOOK = Buffer; | ||
export declare type HICON = Buffer; | ||
export declare type HINSTANCE = Buffer; | ||
export declare type HKEY = Buffer; | ||
export declare type HKL = Buffer; | ||
export declare type HLOCAL = Buffer; | ||
export declare type HMENU = Buffer; | ||
export declare type HMETAFILE = Buffer; | ||
export declare type HMODULE = Buffer; | ||
export declare type HMONITOR = Buffer; | ||
export declare type HPALETTE = Buffer; | ||
export declare type HPEN = Buffer; | ||
export declare type HRESULT = number; | ||
export declare type HRGN = Buffer; | ||
export declare type HRSRC = Buffer; | ||
export declare type HSZ = Buffer; | ||
export declare type HWINEVENTHOOK = Buffer; | ||
export declare type HWINSTA = Buffer; | ||
export declare type HBITMAP = HANDLE; | ||
export declare type HBRUSH = HANDLE; | ||
export declare type HCOLORSPACE = HANDLE; | ||
export declare type HCONV = HANDLE; | ||
export declare type HCONVLIST = HANDLE; | ||
export declare type HCURSOR = HANDLE; | ||
export declare type HDC = HANDLE; | ||
export declare type HDDEDATA = HANDLE; | ||
export declare type HDESK = HANDLE; | ||
export declare type HDROP = HANDLE; | ||
export declare type HDWP = HANDLE; | ||
export declare type HENHMETAFILE = HANDLE; | ||
export declare type HFILE = HANDLE; | ||
export declare type HFONT = HANDLE; | ||
export declare type HGDIOBJ = HANDLE; | ||
export declare type HGLOBAL = HANDLE; | ||
export declare type HHOOK = HANDLE; | ||
export declare type HICON = HANDLE; | ||
export declare type HINSTANCE = HANDLE; | ||
export declare type HKEY = HANDLE; | ||
export declare type HKL = HANDLE; | ||
export declare type HLOCAL = HANDLE; | ||
export declare type HMENU = HANDLE; | ||
export declare type HMETAFILE = HANDLE; | ||
export declare type HMODULE = HINSTANCE; | ||
export declare type HMONITOR = HANDLE; | ||
export declare type HPALETTE = HANDLE; | ||
export declare type HPEN = HANDLE; | ||
export declare type HRESULT = LONG; | ||
export declare type HRGN = HANDLE; | ||
export declare type HRSRC = HANDLE; | ||
export declare type HSZ = HANDLE; | ||
export declare type HWINEVENTHOOK = HANDLE; | ||
export declare type HWINSTA = HANDLE; | ||
export declare type HWND = HANDLE; | ||
/** A 32-bit signed integer */ | ||
export declare type INT = number; | ||
@@ -67,6 +69,6 @@ export declare type INT_PTR = number; | ||
export declare type INT64 = number; | ||
export declare type LANGID = number; | ||
export declare type LCID = number; | ||
export declare type LCTYPE = number; | ||
export declare type LGRPID = number; | ||
export declare type LANGID = WORD; | ||
export declare type LCID = DWORD; | ||
export declare type LCTYPE = DWORD; | ||
export declare type LGRPID = DWORD; | ||
export declare type LONG = number; | ||
@@ -76,86 +78,86 @@ export declare type LONGLONG = number; | ||
export declare type LONG64 = number; | ||
export declare type LPARAM = number | Buffer; | ||
export declare type LPBOOL = Buffer; | ||
export declare type LPBYTE = Buffer; | ||
export declare type LPCOLORREF = Buffer; | ||
export declare type LPCSTR = Buffer; | ||
export declare type LPCWSTR = Buffer; | ||
export declare type LPCTSTR = Buffer; | ||
export declare type LPVOID = Buffer; | ||
export declare type LPCVOID = Buffer; | ||
export declare type LPDWORD = Buffer; | ||
export declare type LPHANDLE = Buffer; | ||
export declare type LPINT = Buffer; | ||
export declare type LPLONG = Buffer; | ||
export declare type LPMSG = Buffer; | ||
export declare type LPPOINT = Buffer; | ||
export declare type LPSTR = Buffer; | ||
export declare type LPWSTR = Buffer; | ||
export declare type LPTSTR = Buffer; | ||
export declare type LPWORD = Buffer; | ||
export declare type LPARAM = LONG_PTR; | ||
export declare type LPBOOL = _POINTER; | ||
export declare type LPBYTE = _POINTER; | ||
export declare type LPCOLORREF = _POINTER; | ||
export declare type LPCSTR = _POINTER; | ||
export declare type LPCWSTR = PUINT8; | ||
export declare type LPCTSTR = PUINT16; | ||
export declare type LPVOID = _POINTER; | ||
export declare type LPCVOID = LPVOID; | ||
export declare type LPDWORD = PUINT16; | ||
export declare type LPHANDLE = _POINTER; | ||
export declare type LPINT = PINT; | ||
export declare type LPLONG = PINT32; | ||
export declare type LPMSG = _POINTER; | ||
export declare type LPPOINT = _POINTER; | ||
export declare type LPSTR = _POINTER; | ||
export declare type LPWSTR = PUINT16; | ||
export declare type LPTSTR = _POINTER; | ||
export declare type LPWORD = PUINT16; | ||
export declare type LRESULT = number; | ||
export declare type NTSTATUS = number; | ||
export declare type PBOOL = Buffer; | ||
export declare type PBOOLEAN = Buffer; | ||
export declare type PBYTE = Buffer; | ||
export declare type PCHAR = Buffer; | ||
export declare type PCSTR = Buffer; | ||
export declare type PCTSTR = Buffer; | ||
export declare type PCWSTR = Buffer; | ||
export declare type PDWORD = Buffer; | ||
export declare type PDWORDLONG = Buffer; | ||
export declare type PDWORD_PTR = Buffer; | ||
export declare type PDWORD32 = Buffer; | ||
export declare type PDWORD64 = Buffer; | ||
export declare type PFLOAT = Buffer; | ||
export declare type PHALF_PTR = Buffer; | ||
export declare type PHANDLE = Buffer; | ||
export declare type PHKEY = Buffer; | ||
export declare type PINT = Buffer; | ||
export declare type PINT_PTR = Buffer; | ||
export declare type PINT8 = Buffer; | ||
export declare type PINT16 = Buffer; | ||
export declare type PINT32 = Buffer; | ||
export declare type PINT64 = Buffer; | ||
export declare type PLCID = Buffer; | ||
export declare type PLONG = Buffer; | ||
export declare type PLONGLONG = Buffer; | ||
export declare type PLONG_PTR = Buffer; | ||
export declare type PLONG32 = Buffer; | ||
export declare type PLONG64 = Buffer; | ||
export declare type POINTER_32 = Buffer; | ||
export declare type POINTER_64 = Buffer; | ||
export declare type POINTER_SIGNED = Buffer; | ||
export declare type POINTER_UNSIGNED = Buffer; | ||
export declare type PSHORT = Buffer; | ||
export declare type PSIZE_T = Buffer; | ||
export declare type PSSIZE_T = Buffer; | ||
export declare type PSTR = Buffer; | ||
export declare type PTBYTE = Buffer; | ||
export declare type PTCHAR = Buffer; | ||
export declare type PTSTR = Buffer; | ||
export declare type PUCHAR = Buffer; | ||
export declare type PUHALF_PTR = Buffer; | ||
export declare type PUINT = Buffer; | ||
export declare type PUINT_PTR = Buffer; | ||
export declare type PUINT8 = Buffer; | ||
export declare type PUINT16 = Buffer; | ||
export declare type PUINT32 = Buffer; | ||
export declare type PUINT64 = Buffer; | ||
export declare type PULONG = Buffer; | ||
export declare type PULONGLONG = Buffer; | ||
export declare type PULONG_PTR = Buffer; | ||
export declare type PULONG32 = Buffer; | ||
export declare type PULONG64 = Buffer; | ||
export declare type PUSHORT = Buffer; | ||
export declare type PWCHAR = Buffer; | ||
export declare type PWORD = Buffer; | ||
export declare type PWSTR = Buffer; | ||
export declare type QWORD = Buffer; | ||
export declare type SC_HANDLE = Buffer; | ||
export declare type NTSTATUS = UINT32; | ||
export declare type PBOOL = _POINTER; | ||
export declare type PBOOLEAN = _POINTER; | ||
export declare type PBYTE = _POINTER; | ||
export declare type PCHAR = _POINTER; | ||
export declare type PCSTR = PUINT8; | ||
export declare type PCTSTR = _POINTER; | ||
export declare type PCWSTR = PUINT16; | ||
export declare type PDWORD = PUINT32; | ||
export declare type PDWORDLONG = PUINT64; | ||
export declare type PDWORD_PTR = DWORD_PTR; | ||
export declare type PDWORD32 = _POINTER; | ||
export declare type PDWORD64 = _POINTER; | ||
export declare type PFLOAT = _POINTER; | ||
export declare type PHALF_PTR = _POINTER; | ||
export declare type PHANDLE = _POINTER; | ||
export declare type PHKEY = _POINTER; | ||
export declare type PINT = _POINTER; | ||
export declare type PINT_PTR = _POINTER; | ||
export declare type PINT8 = _POINTER; | ||
export declare type PINT16 = _POINTER; | ||
export declare type PINT32 = _POINTER; | ||
export declare type PINT64 = _POINTER; | ||
export declare type PLCID = _POINTER; | ||
export declare type PLONG = _POINTER; | ||
export declare type PLONGLONG = _POINTER; | ||
export declare type PLONG_PTR = _POINTER; | ||
export declare type PLONG32 = _POINTER; | ||
export declare type PLONG64 = _POINTER; | ||
export declare type POINTER_32 = _POINTER; | ||
export declare type POINTER_64 = _POINTER; | ||
export declare type POINTER_SIGNED = _POINTER; | ||
export declare type POINTER_UNSIGNED = _POINTER; | ||
export declare type PSHORT = _POINTER; | ||
export declare type PSIZE_T = _POINTER; | ||
export declare type PSSIZE_T = _POINTER; | ||
export declare type PSTR = _POINTER; | ||
export declare type PTBYTE = _POINTER; | ||
export declare type PTCHAR = _POINTER; | ||
export declare type PTSTR = _POINTER; | ||
export declare type PUCHAR = _POINTER; | ||
export declare type PUHALF_PTR = _POINTER; | ||
export declare type PUINT = _POINTER; | ||
export declare type PUINT_PTR = _POINTER; | ||
export declare type PUINT8 = _POINTER; | ||
export declare type PUINT16 = _POINTER; | ||
export declare type PUINT32 = _POINTER; | ||
export declare type PUINT64 = _POINTER; | ||
export declare type PULONG = _POINTER; | ||
export declare type PULONGLONG = _POINTER; | ||
export declare type PULONG_PTR = _POINTER; | ||
export declare type PULONG32 = _POINTER; | ||
export declare type PULONG64 = _POINTER; | ||
export declare type PUSHORT = _POINTER; | ||
export declare type PWCHAR = _POINTER; | ||
export declare type PWORD = _POINTER; | ||
export declare type PWSTR = _POINTER; | ||
export declare type QWORD = _POINTER; | ||
export declare type SC_HANDLE = HANDLE; | ||
export declare type SC_LOCK = LPVOID; | ||
export declare type SERVICE_STATUS_HANDLE = Buffer; | ||
export declare type SERVICE_STATUS_HANDLE = HANDLE; | ||
export declare type SHORT = number; | ||
export declare type SIZE_T = Buffer; | ||
export declare type SSIZE_T = Buffer; | ||
export declare type SIZE_T = number; | ||
export declare type SSIZE_T = number; | ||
export declare type TBYTE = number; | ||
@@ -175,14 +177,14 @@ export declare type TCHAR = string; | ||
export declare type ULONG64 = number; | ||
export declare type UNICODE_STRING = Buffer; | ||
export declare type UNICODE_STRING = _POINTER; | ||
export declare type USHORT = number; | ||
export declare type USN = number; | ||
export declare type USN = LONGLONG; | ||
export declare type WINEVENTPROC = Buffer; | ||
export declare type WPARAM = number | Buffer; | ||
export declare type WNDENUMPROC = Buffer; | ||
export declare type WNDPROC = Buffer; | ||
export declare type LPINITCOMMONCONTROLSEX = Buffer; | ||
export declare type LPWNDCLASSEX = Buffer; | ||
export declare type PWINDOWINFO = Buffer; | ||
export declare type PFILETIME = Buffer; | ||
export declare type LPFILETIME = Buffer; | ||
export declare type va_list = Buffer; | ||
export declare type WPARAM = UINT_PTR; | ||
export declare type LPINITCOMMONCONTROLSEX = _POINTER; | ||
export declare type LPWNDCLASSEX = _POINTER; | ||
export declare type PWINDOWINFO = _POINTER; | ||
export declare type PFILETIME = _POINTER; | ||
export declare type LPFILETIME = _POINTER; | ||
export declare type va_list = _POINTER; |
/* ---------- data types for TypeScript ----------- */ | ||
/* ------------------ struct ---------------------- */ | ||
// see src/lib/win-model/struct.ts |
@@ -53,2 +53,3 @@ /// <reference types="node" /> | ||
} | ||
/** https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ | ||
export declare type MSG = Buffer; | ||
@@ -62,2 +63,3 @@ export interface MSG_Struct extends StructInstanceBase { | ||
pt: POINT; | ||
lPrivate: DWORD; | ||
} | ||
@@ -64,0 +66,0 @@ /** |
@@ -20,4 +20,4 @@ /** | ||
export declare const CALLBACK = "pointer"; | ||
export declare const CCHAR = "char"; | ||
export declare const CHAR = "char"; | ||
export declare const CCHAR = "uint8"; | ||
export declare const CHAR = "uint8"; | ||
export declare const COLORREF = "DWORD"; | ||
@@ -66,2 +66,3 @@ export declare const DWORDLONG = "uint64"; | ||
export declare const HWND = "HANDLE"; | ||
/** A 32-bit signed integer */ | ||
export declare const INT = "int"; | ||
@@ -127,3 +128,3 @@ export declare const INT_PTR = "_WIN64_HOLDER_"; | ||
export declare const PLONGLONG = "int64*"; | ||
export declare const PLONG_PTR = "LONG_PTR"; | ||
export declare const PLONG_PTR = "pointer"; | ||
export declare const PLONG32 = "int32*"; | ||
@@ -171,3 +172,3 @@ export declare const PLONG64 = "int64*"; | ||
export declare const UINT = "uint"; | ||
export declare const UINT_PTR = "uint"; | ||
export declare const UINT_PTR = "_WIN64_HOLDER_"; | ||
export declare const UINT8 = "uint8"; | ||
@@ -181,4 +182,4 @@ export declare const UINT16 = "uint16"; | ||
export declare const ULONG64 = "uint64"; | ||
export declare const UNICODE_STRING = "pointer"; | ||
export declare const USHORT = "ushort"; | ||
export declare const UNICODE_STRING = "pointer"; | ||
export declare const USN = "longlong"; | ||
@@ -189,7 +190,6 @@ export declare const WINEVENTPROC = "pointer"; | ||
/** | ||
* Caution: original be typedef UINT_PTR WPARAM; | ||
* but the CALLBACK WNDCLASSEX.lpfnWndProc will pass negative number and cause process exit. | ||
* so change to LONG_PTR | ||
* Note: original be typedef UINT_PTR WPARAM; | ||
* CALLBACK WNDCLASSEX.lpfnWndProc may pass negative number and cause process exit. | ||
*/ | ||
export declare const WPARAM = "LONG_PTR"; | ||
export declare const WPARAM = "UINT_PTR"; | ||
export declare const LPINITCOMMONCONTROLSEX = "pointer"; | ||
@@ -196,0 +196,0 @@ export declare const LPWNDCLASSEX = "pointer"; |
@@ -23,4 +23,4 @@ // windows data types for ref module https://github.com/TooTallNate/ref | ||
export const CALLBACK = 'pointer'; // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx | ||
export const CCHAR = 'char'; | ||
export const CHAR = 'char'; | ||
export const CCHAR = 'uint8'; | ||
export const CHAR = 'uint8'; | ||
export const COLORREF = 'DWORD'; | ||
@@ -70,2 +70,3 @@ // export const CONST; | ||
export const HWND = 'HANDLE'; | ||
/** A 32-bit signed integer */ | ||
export const INT = 'int'; | ||
@@ -131,3 +132,3 @@ export const INT_PTR = _WIN64_HOLDER; | ||
export const PLONGLONG = 'int64*'; | ||
export const PLONG_PTR = 'LONG_PTR'; | ||
export const PLONG_PTR = 'pointer'; | ||
export const PLONG32 = 'int32*'; | ||
@@ -172,4 +173,4 @@ export const PLONG64 = 'int64*'; | ||
export const SHORT = 'int16'; | ||
export const SIZE_T = 'ULONG_PTR'; // ? | ||
export const SSIZE_T = 'LONG_PTR'; // ? | ||
export const SIZE_T = 'ULONG_PTR'; | ||
export const SSIZE_T = 'LONG_PTR'; | ||
export const TBYTE = _UNICODE_HOLDER; | ||
@@ -180,3 +181,3 @@ export const TCHAR = _UNICODE_HOLDER; | ||
export const UINT = 'uint'; | ||
export const UINT_PTR = 'uint'; | ||
export const UINT_PTR = _WIN64_HOLDER; | ||
export const UINT8 = 'uint8'; | ||
@@ -190,4 +191,4 @@ export const UINT16 = 'uint16'; | ||
export const ULONG64 = 'uint64'; | ||
export const UNICODE_STRING = 'pointer'; | ||
export const USHORT = 'ushort'; | ||
export const UNICODE_STRING = 'pointer'; | ||
export const USN = LONGLONG; | ||
@@ -199,9 +200,8 @@ // export const WINAPI; | ||
/** | ||
* Caution: original be typedef UINT_PTR WPARAM; | ||
* but the CALLBACK WNDCLASSEX.lpfnWndProc will pass negative number and cause process exit. | ||
* so change to LONG_PTR | ||
* Note: original be typedef UINT_PTR WPARAM; | ||
* CALLBACK WNDCLASSEX.lpfnWndProc may pass negative number and cause process exit. | ||
*/ | ||
// export const WPARAM = UINT_PTR; | ||
export const WPARAM = 'LONG_PTR'; | ||
export const LPINITCOMMONCONTROLSEX = 'pointer'; // A pointer to an INITCOMMONCONTROLSEX | ||
export const WPARAM = 'UINT_PTR'; | ||
// A pointer to an INITCOMMONCONTROLSEX | ||
export const LPINITCOMMONCONTROLSEX = 'pointer'; | ||
export const LPWNDCLASSEX = 'pointer'; // A pointer to a WNDCLASSEX | ||
@@ -208,0 +208,0 @@ export const PWINDOWINFO = 'pointer'; // A pointer to a WINDOWINFO structure |
{ | ||
"name": "win32-def", | ||
"author": "waiting", | ||
"version": "7.0.0", | ||
"version": "7.1.0", | ||
"description": "win32 definitions for node-ffi", | ||
@@ -82,3 +82,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "5d7a583b4fc5cc9fe0dc145acd3610710df11bab" | ||
"gitHead": "60017371f0299ddf09df66c96ec868ffd9dbee6d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
234289
1.02%3294
0.55%