Exemple #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
Exemple #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
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)