本文整理匯總了Python中_ctypes.FreeLibrary方法的典型用法代碼示例。如果您正苦於以下問題:Python _ctypes.FreeLibrary方法的具體用法?Python _ctypes.FreeLibrary怎麽用?Python _ctypes.FreeLibrary使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類_ctypes
的用法示例。
在下文中一共展示了_ctypes.FreeLibrary方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_1703286_A
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def test_1703286_A(self):
from _ctypes import LoadLibrary, FreeLibrary
# On winXP 64-bit, advapi32 loads at an address that does
# NOT fit into a 32-bit integer. FreeLibrary must be able
# to accept this address.
# These are tests for http://www.python.org/sf/1703286
handle = LoadLibrary("advapi32")
FreeLibrary(handle)
示例2: close
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def close(self):
if self.system == 'windows':
_ctypes.FreeLibrary(self.kunpeng._handle)
else:
handle = self.kunpeng._handle
del self.kunpeng
_ctypes.dlclose(handle)
示例3: test_1703286_A
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def test_1703286_A(self):
from _ctypes import LoadLibrary, FreeLibrary
# On winXP 64-bit, advapi32 loads at an address that does
# NOT fit into a 32-bit integer. FreeLibrary must be able
# to accept this address.
# These are tests for http://www.python.org/sf/1703286
handle = LoadLibrary("advapi32")
FreeLibrary(handle)
示例4: deleteCB
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def deleteCB(self, offset):
"""Free the state associated to @offset and delete it
@offset: gcc state offset
"""
flib = None
if is_win:
flib = _ctypes.FreeLibrary
else:
flib = _ctypes.dlclose
flib(self.states[offset]._handle)
del self.states[offset]
示例5: free
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def free(self):
''' Call FMU destructor before being destructed. Just cleaning up. '''
if hasattr(self, '_library'):
self.freeModelInstance()
_ctypes.FreeLibrary(self._libraryHandle)
shutil.rmtree(self._tempDir)
示例6: freeLibrary
# 需要導入模塊: import _ctypes [as 別名]
# 或者: from _ctypes import FreeLibrary [as 別名]
def freeLibrary(self):
''' Call FMU destructor before being destructed. Just cleaning up. '''
if hasattr(self, '_library'):
self.freeModelInstance()
_ctypes.FreeLibrary(self._libraryHandle)