本文整理汇总了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)