Skip to content

Commit a1c5dbf

Browse files
committed
fix(def): def.enum.ts
- Def.byte - Def.intPtr
1 parent 50d9db9 commit a1c5dbf

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/win32-def/src/lib/common.def.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export const LONG32: Def.int32 = Def.int32
9898
export const LONG64: Def.int64 = Def.int64
9999
export const LPARAM: Def.int32 | Def.int64 = LONG_PTR
100100
export const LPBOOL: Def.int32 = BOOL
101-
export const LPBYTE: Def.byte = Def.bytePtr
101+
export const LPBYTE: Def.bytePtr = Def.bytePtr
102102
export const LPCOLORREF: Def.uint32 = DWORD
103103
export const LPCSTR: Def.int8Ptr = Def.int8Ptr
104104
export const LPCWSTR: Def.int16Ptr = Def.int16Ptr
@@ -117,7 +117,7 @@ export const LRESULT: Def.int32 | Def.int64 = LONG_PTR
117117
export const NTSTATUS: Def.uint32 = Def.uint32
118118
export const PBOOL: Def.uint32Ptr | Def.uint64Ptr = ptr
119119
export const PBOOLEAN: Def.boolPtr = Def.boolPtr
120-
export const PBYTE: Def.byte = Def.bytePtr
120+
export const PBYTE: Def.bytePtr = Def.bytePtr
121121
export const PCHAR: Def.charPtr = Def.charPtr
122122
export const PCSTR: Def.uint8Ptr = Def.uint8Ptr
123123
export const PCTSTR: Def.int8Ptr | Def.int16Ptr = _WIN64 ? Def.int16Ptr : Def.int8Ptr

packages/win32-def/src/lib/def.enum.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
export enum Def {
88
bool = 'bool',
9-
byte = 'int*',
9+
byte = 'uint8_t',
1010
int = 'int',
1111
int8 = 'int8_t',
1212
int16 = 'int16_t',
@@ -28,9 +28,9 @@ export enum Def {
2828
void = 'void',
2929

3030
boolPtr = 'bool*',
31-
bytePtr = 'int*',
31+
bytePtr = 'uint8_t*',
3232
charPtr = 'char*',
33-
intPtr = 'int',
33+
intPtr = 'int*',
3434
int8Ptr = 'int8_t*',
3535
int16Ptr = 'int16_t*',
3636
int32Ptr = 'int32_t*',

packages/win32-def/test/lib/struct/winuser/110.RAWHID.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { assertStructUnion } from '#@/helper.js'
99
const name = 'RAWHID'
1010
const pointer = LPRAWHID
1111
const factory = RAWHID_Factory
12-
const size = 16 // ? 12
12+
const size = 12
1313
const fn = `${name}_Factory`
1414

1515
describe(fileShortPath(import.meta.url), () => {

0 commit comments

Comments
 (0)