Package winappdbg :: Package win32 :: Module kernel32 :: Class UserModeHandle
[hide private]
[frames] | no frames]

Class UserModeHandle

source code


Base class for non-kernel handles. Generally this means they are closed by special Win32 API functions instead of CloseHandle() and some standard operations (synchronizing, duplicating, inheritance) are not supported.

Nested Classes [hide private]
C type _TYPE
C type to translate this handle to.
Instance Methods [hide private]
 
_close(self)
Low-level close method.
source code
Handle
dup(self)
Returns: A new handle to the same Win32 object.
source code
 
wait(self, dwMilliseconds=None)
Wait for the Win32 object to be signaled.
source code
Handle
__copy__(self)
Duplicates the Win32 handle when copying the Python object. (Inherited from winappdbg.win32.kernel32.Handle)
source code
Handle
__deepcopy__(self)
Duplicates the Win32 handle when copying the Python object. (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
__del__(self)
Closes the Win32 handle when the Python object is destroyed. (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
__enter__(self)
Compatibility with the "with" Python statement. (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
__exit__(self, type, value, traceback)
Compatibility with the "with" Python statement. (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
__init__(self, aHandle=None, bOwnership=True)
x.__init__(...) initializes x; see help(type(x)) for signature (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
__repr__(self)
repr(x) (Inherited from winappdbg.win32.kernel32.Handle)
source code
 
close(self)
Closes the Win32 handle. (Inherited from winappdbg.win32.kernel32.Handle)
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
from_param(value)
Compatibility with ctypes.
 
_normalize(value)
Normalize handle values. (Inherited from winappdbg.win32.kernel32.Handle)
Properties [hide private]
  _as_parameter_
Compatibility with ctypes.
bool inherit
True if the handle is to be inherited by child processes, False otherwise.
bool protectFromClose
Set to True to prevent the handle from being closed.
  value (Inherited from winappdbg.win32.kernel32.Handle)

Inherited from object: __class__

Method Details [hide private]

_close(self)

source code 

Low-level close method. This is a private method, do not call it.

Overrides: Handle._close
(inherited documentation)

from_param(value)
Static Method

 

Compatibility with ctypes. Allows passing transparently a Handle object to an API call.

Parameters:
  • value - Numeric handle value.
Overrides: Handle.from_param
(inherited documentation)

dup(self)

source code 
Returns: Handle
A new handle to the same Win32 object.
Overrides: Handle.dup
(inherited documentation)

wait(self, dwMilliseconds=None)

source code 

Wait for the Win32 object to be signaled.

Parameters:
  • dwMilliseconds - (Optional) Timeout value in milliseconds. Use INFINITE or None for no timeout.
Overrides: Handle.wait
(inherited documentation)

Property Details [hide private]

_as_parameter_

Compatibility with ctypes. Allows passing transparently a Handle object to an API call.

Get Method:
unreachable._as_parameter_(self)

inherit

True if the handle is to be inherited by child processes, False otherwise.
Get Method:
unreachable.inherit(self)

protectFromClose

Set to True to prevent the handle from being closed. Must be set to False before you're done using the handle, or it will be left open until the debugger exits. Use with care!
Get Method:
unreachable.protectFromClose(self)