diff --git a/ext/fiddle/lib/fiddle/types.rb b/ext/fiddle/lib/fiddle/types.rb index 298a5e1797..3ea79368da 100644 --- a/ext/fiddle/lib/fiddle/types.rb +++ b/ext/fiddle/lib/fiddle/types.rb @@ -27,25 +27,26 @@ module Fiddle # * WORD module Win32Types def included(m) # :nodoc: + # https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types m.module_eval{ typealias "DWORD", "unsigned long" - typealias "PDWORD", "unsigned long *" - typealias "DWORD32", "unsigned long" - typealias "DWORD64", "unsigned long long" + typealias "PDWORD", "DWORD *" + typealias "DWORD32", "uint32_t" + typealias "DWORD64", "uint64_t" typealias "WORD", "unsigned short" - typealias "PWORD", "unsigned short *" + typealias "PWORD", "WORD *" typealias "BOOL", "int" - typealias "ATOM", "int" + typealias "ATOM", "WORD" typealias "BYTE", "unsigned char" - typealias "PBYTE", "unsigned char *" + typealias "PBYTE", "BYTE *" typealias "UINT", "unsigned int" typealias "ULONG", "unsigned long" typealias "UCHAR", "unsigned char" - typealias "HANDLE", "uintptr_t" - typealias "PHANDLE", "void*" - typealias "PVOID", "void*" - typealias "LPCSTR", "const char*" - typealias "LPSTR", "char*" + typealias "HANDLE", "PVOID" + typealias "PHANDLE", "HANDLE *" + typealias "PVOID", "void *" + typealias "LPCSTR", "const char *" + typealias "LPSTR", "char *" typealias "HINSTANCE", "HANDLE" typealias "HDC", "HANDLE" typealias "HWND", "HANDLE"