Example #1
0
 def Detach(self):
     h = int(self)
     if h != -1:
         c_handle = self.c_handle
         self.c_handle = _INVALID_HANDLE_VALUE
         _ffi.gc(c_handle, None)
     return h
Example #2
0
 def Detach(self):
     h = int(self)
     if h != -1:
         c_handle = self.c_handle
         self.c_handle = _INVALID_HANDLE_VALUE
         _ffi.gc(c_handle, None)
     return h
Example #3
0
 def Close(self):
     if int(self) != -1:
         c_handle = self.c_handle
         self.c_handle = _INVALID_HANDLE_VALUE
         _ffi.gc(c_handle, None)
         _kernel32.CloseHandle(c_handle)
Example #4
0
 def __init__(self, c_handle):
     # 'c_handle' is a cffi cdata of type HANDLE, which is basically 'void *'
     self.c_handle = c_handle
     if int(self) != -1:
         self.c_handle = _ffi.gc(self.c_handle, _kernel32.CloseHandle)
Example #5
0
 def Close(self):
     if int(self) != -1:
         c_handle = self.c_handle
         self.c_handle = _INVALID_HANDLE_VALUE
         _ffi.gc(c_handle, None)
         _kernel32.CloseHandle(c_handle)
Example #6
0
 def __init__(self, c_handle):
     # 'c_handle' is a cffi cdata of type HANDLE, which is basically 'void *'
     self.c_handle = c_handle
     if int(self) != -1:
         self.c_handle = _ffi.gc(self.c_handle, _kernel32.CloseHandle)