Package winappdbg :: Module win32 :: 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.
 
close(self)
Closes the win32 handle.
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__

Class Methods [hide private]
 
from_param(cls, value)
Compatibility with ctypes.
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 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.

from_param(cls, value)
Class Method

 

Compatibility with ctypes. Allows receiving transparently a Handle object from an API call.

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. Use INFINITE or None for no timeout.

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) - Compatibility with ctypes.