Skip to content

Commit

Permalink
fix(def): revert HANDLE def to uint32 | uint64
Browse files Browse the repository at this point in the history
  • Loading branch information
waitingsong committed Jul 2, 2024
1 parent ceb07aa commit 22c8002
Showing 1 changed file with 38 additions and 38 deletions.
76 changes: 38 additions & 38 deletions packages/win32-def/src/lib/common.def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const PVOID: Def.voidPtr = Def.voidPtr
* Use `HANDLE` (number) for params definition of the api,
* @see https://stackoverflow.com/questions/18266626/what-is-the-range-of-a-windows-handle-on-a-64-bits-application/29526711#29526711
*/
export const HANDLE: Def.voidPtr = Def.voidPtr
export const HANDLE: Def.uint32 | Def.uint64 = _WIN64 ? Def.uint64 : Def.uint32
/**
* `HANDLE_PVOID` (Buffer) can be used for definition of Struct,
*/
Expand All @@ -44,43 +44,43 @@ export const DWORD_PTR: Def.int32 | Def.int64 = ULONG_PTR
export const DWORD32: Def.uint32 = Def.uint32
export const DWORD64: Def.uint64 = Def.uint64
export const FLOAT: Def.float = Def.float
export const HACCEL: Def.voidPtr = HANDLE
export const HACCEL: Def.uint32 | Def.uint64 = HANDLE
export const HALF_PTR: Def.int16 | Def.int32 = _WIN64 ? Def.int32 : Def.int16
export const HBITMAP: Def.voidPtr = HANDLE
export const HBRUSH: Def.voidPtr = HANDLE
export const HCOLORSPACE: Def.voidPtr = HANDLE
export const HCONV: Def.voidPtr = HANDLE
export const HCONVLIST: Def.voidPtr = HANDLE
export const HCURSOR: Def.voidPtr = HANDLE
export const HDC: Def.voidPtr = HANDLE
export const HDDEDATA: Def.voidPtr = HANDLE
export const HDESK: Def.voidPtr = HANDLE
export const HDROP: Def.voidPtr = HANDLE
export const HDWP: Def.voidPtr = HANDLE
export const HENHMETAFILE: Def.voidPtr = HANDLE
export const HFILE: Def.voidPtr = HANDLE
export const HFONT: Def.voidPtr = HANDLE
export const HGDIOBJ: Def.voidPtr = HANDLE
export const HGLOBAL: Def.voidPtr = HANDLE
export const HHOOK: Def.voidPtr = HANDLE
export const HICON: Def.voidPtr = HANDLE
export const HINSTANCE: Def.voidPtr = HANDLE
export const HKEY: Def.voidPtr = HANDLE
export const HKL: Def.voidPtr = HANDLE
export const HLOCAL: Def.voidPtr = HANDLE
export const HMENU: Def.voidPtr = HANDLE
export const HMETAFILE: Def.voidPtr = HANDLE
export const HMODULE: Def.voidPtr = HINSTANCE
export const HMONITOR: Def.voidPtr = HANDLE
export const HPALETTE: Def.voidPtr = HANDLE
export const HPEN: Def.voidPtr = HANDLE
export const HBITMAP: Def.uint32 | Def.uint64 = HANDLE
export const HBRUSH: Def.uint32 | Def.uint64 = HANDLE
export const HCOLORSPACE: Def.uint32 | Def.uint64 = HANDLE
export const HCONV: Def.uint32 | Def.uint64 = HANDLE
export const HCONVLIST: Def.uint32 | Def.uint64 = HANDLE
export const HCURSOR: Def.uint32 | Def.uint64 = HANDLE
export const HDC: Def.uint32 | Def.uint64 = HANDLE
export const HDDEDATA: Def.uint32 | Def.uint64 = HANDLE
export const HDESK: Def.uint32 | Def.uint64 = HANDLE
export const HDROP: Def.uint32 | Def.uint64 = HANDLE
export const HDWP: Def.uint32 | Def.uint64 = HANDLE
export const HENHMETAFILE: Def.uint32 | Def.uint64 = HANDLE
export const HFILE: Def.uint32 | Def.uint64 = HANDLE
export const HFONT: Def.uint32 | Def.uint64 = HANDLE
export const HGDIOBJ: Def.uint32 | Def.uint64 = HANDLE
export const HGLOBAL: Def.uint32 | Def.uint64 = HANDLE
export const HHOOK: Def.uint32 | Def.uint64 = HANDLE
export const HICON: Def.uint32 | Def.uint64 = HANDLE
export const HINSTANCE: Def.uint32 | Def.uint64 = HANDLE
export const HKEY: Def.uint32 | Def.uint64 = HANDLE
export const HKL: Def.uint32 | Def.uint64 = HANDLE
export const HLOCAL: Def.uint32 | Def.uint64 = HANDLE
export const HMENU: Def.uint32 | Def.uint64 = HANDLE
export const HMETAFILE: Def.uint32 | Def.uint64 = HANDLE
export const HMODULE: Def.uint32 | Def.uint64 = HINSTANCE
export const HMONITOR: Def.uint32 | Def.uint64 = HANDLE
export const HPALETTE: Def.uint32 | Def.uint64 = HANDLE
export const HPEN: Def.uint32 | Def.uint64 = HANDLE
export const HRESULT: Def.long = Def.long
export const HRGN: Def.voidPtr = HANDLE
export const HRSRC: Def.voidPtr = HANDLE
export const HSZ: Def.voidPtr = HANDLE
export const HWINEVENTHOOK: Def.voidPtr = HANDLE
export const HWINSTA: Def.voidPtr = HANDLE
export const HWND: Def.voidPtr = HANDLE
export const HRGN: Def.uint32 | Def.uint64 = HANDLE
export const HRSRC: Def.uint32 | Def.uint64 = HANDLE
export const HSZ: Def.uint32 | Def.uint64 = HANDLE
export const HWINEVENTHOOK: Def.uint32 | Def.uint64 = HANDLE
export const HWINSTA: Def.uint32 | Def.uint64 = HANDLE
export const HWND: Def.uint32 | Def.uint64 = HANDLE
/** A 32-bit signed integer */
export const INT: Def.int = Def.int
export const INT_PTR: Def.int32Ptr | Def.int64Ptr = _WIN64 ? Def.int64Ptr : Def.int32Ptr
Expand Down Expand Up @@ -176,9 +176,9 @@ export const PWCHAR: Def.uint16Ptr = Def.uint16Ptr
export const PWORD: Def.uint16Ptr = Def.uint16Ptr
export const PWSTR: Def.uint16Ptr = Def.uint16Ptr
export const QWORD: Def.uint64 = Def.uint64
export const SC_HANDLE: Def.voidPtr = HANDLE
export const SC_HANDLE: Def.uint32 | Def.uint64 = HANDLE
export const SC_LOCK: Def.voidPtr = LPVOID
export const SERVICE_STATUS_HANDLE: Def.voidPtr = HANDLE
export const SERVICE_STATUS_HANDLE: Def.uint32 | Def.uint64 = HANDLE
export const SHORT: Def.int16 = Def.int16
export const SIZE_T: Def.int32 | Def.int64 = ULONG_PTR
export const SSIZE_T: Def.int32 | Def.int64 = LONG_PTR
Expand Down

0 comments on commit 22c8002

Please sign in to comment.