summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/lib/dl/types.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/dl/lib/dl/types.rb b/ext/dl/lib/dl/types.rb
index c79f74f..3dfa408 100644
--- a/ext/dl/lib/dl/types.rb
+++ b/ext/dl/lib/dl/types.rb
@@ -7,6 +7,8 @@ module DL
# * BOOL
# * BYTE
# * DWORD
+ # * DWORD32
+ # * DWORD64
# * HANDLE
# * HDC
# * HINSTANCE
@@ -27,6 +29,8 @@ module DL
m.module_eval{
typealias "DWORD", "unsigned long"
typealias "PDWORD", "unsigned long *"
+ typealias "DWORD32", "unsigned long"
+ typealias "DWORD64", "unsigned long long"
typealias "WORD", "unsigned short"
typealias "PWORD", "unsigned short *"
typealias "BOOL", "int"
@@ -36,7 +40,11 @@ module DL
typealias "UINT", "unsigned int"
typealias "ULONG", "unsigned long"
typealias "UCHAR", "unsigned char"
- typealias "HANDLE", "unsigned long"
+ if [nil].pack('p').bytesize == 8
+ typealias "HANDLE", "unsigned long long"
+ else
+ typealias "HANDLE", "unsigned long"
+ end
typealias "PHANDLE", "void*"
typealias "PVOID", "void*"
typealias "LPCSTR", "char*"