Package winappdbg :: Module system :: Class Handle
[hide private]
[frames] | no frames]

Class Handle


Encapsulates win32 handles to avoid leaking them.


See Also: ProcessHandle, ThreadHandle, FileHandle

Instance Methods [hide private]
 
__init__(self, aHandle=None, bOwnership=True)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__del__(self)
Closes the win32 handle when the python object is destroyed.
Handle
__copy__(self)
Duplicates the win32 handle when copying the python object.
Handle
__deepcopy__(self)
Duplicates the win32 handle when copying the python object.
Handle
dup(self)
Returns: A new handle to the same win32 object.
 
wait(self, dwMilliseconds=None)
Wait for the win32 object to be signaled.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]
  _as_parameter_
Compatibility with ctypes.

Inherited from object: __class__

Method Details [hide private]

__init__(self, aHandle=None, bOwnership=True)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • aHandle (int) - Win32 handle object.
  • bOwnership (bool) - True if we own the handle and we need to close it. False if someone else will be calling win32.CloseHandle.
Overrides: object.__init__

__copy__(self)

 

Duplicates the win32 handle when copying the python object.

Returns: Handle
A new handle to the same win32 object.

__deepcopy__(self)

 

Duplicates the win32 handle when copying the python object.

Returns: Handle
A new handle to the same win32 object.

dup(self)

 
Returns: Handle
A new handle to the same win32 object.

wait(self, dwMilliseconds=None)

 

Wait for the win32 object to be signaled.

Parameters:
  • dwMilliseconds (int) - (Optional) Timeout value in milliseconds.

Property Details [hide private]

_as_parameter_

Compatibility with ctypes. Required by the win32 module.

Get Method:
unreachable._as_parameter_(self) - Compatibility with ctypes.