Module: Windows::Handle
- Defined in:
- lib/windows/handle.rb
Constant Summary collapse
- INVALID_HANDLE_VALUE =
-1
- HANDLE_FLAG_INHERIT =
0x00000001
- HANDLE_FLAG_PROTECT_FROM_CLOSE =
0x00000002
- CloseHandle =
Win32API.new('kernel32', 'CloseHandle', 'L', 'I')
- DuplicateHandle =
Win32API.new('kernel32', 'DuplicateHandle', 'LLLLLIL', 'I')
- GetHandleInformation =
Win32API.new('kernel32', 'GetHandleInformation', 'LL', 'I')
- SetHandleInformation =
Win32API.new('kernel32', 'SetHandleInformation', 'LLL', 'I')
Instance Method Summary collapse
- #CloseHandle(handle) ⇒ Object
- #DuplicateHandle(sphandle, shandle, thandle, access, ihandle, opts) ⇒ Object
- #GetHandleInformation(handle, flags) ⇒ Object
- #SetHandleInformation(handle, mask, flags) ⇒ Object
Instance Method Details
#CloseHandle(handle) ⇒ Object
31 32 33 |
# File 'lib/windows/handle.rb', line 31 def CloseHandle(handle) CloseHandle.call(handle) != 0 end |
#DuplicateHandle(sphandle, shandle, thandle, access, ihandle, opts) ⇒ Object
35 36 37 |
# File 'lib/windows/handle.rb', line 35 def DuplicateHandle(sphandle, shandle, thandle, access, ihandle, opts) DuplicateHandle.call(sphandle, shandle, thandle, access, ihandle, opts) != 0 end |
#GetHandleInformation(handle, flags) ⇒ Object
39 40 41 |
# File 'lib/windows/handle.rb', line 39 def GetHandleInformation(handle, flags) GetHandleInformation.call(handle, flags) != 0 end |
#SetHandleInformation(handle, mask, flags) ⇒ Object
43 44 45 |
# File 'lib/windows/handle.rb', line 43 def SetHandleInformation(handle, mask, flags) SetHandleInformation.call(handle, mask, flags) != 0 end |