本文整理汇总了Python中_winapi.PIPE_UNLIMITED_INSTANCES属性的典型用法代码示例。如果您正苦于以下问题:Python _winapi.PIPE_UNLIMITED_INSTANCES属性的具体用法?Python _winapi.PIPE_UNLIMITED_INSTANCES怎么用?Python _winapi.PIPE_UNLIMITED_INSTANCES使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类_winapi
的用法示例。
在下文中一共展示了_winapi.PIPE_UNLIMITED_INSTANCES属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _server_pipe_handle
# 需要导入模块: import _winapi [as 别名]
# 或者: from _winapi import PIPE_UNLIMITED_INSTANCES [as 别名]
def _server_pipe_handle(self, first):
# Return a wrapper for a new pipe handle.
if self.closed():
return None
flags = _winapi.PIPE_ACCESS_DUPLEX | _winapi.FILE_FLAG_OVERLAPPED
if first:
flags |= _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE
h = _winapi.CreateNamedPipe(
self._address, flags,
_winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE |
_winapi.PIPE_WAIT,
_winapi.PIPE_UNLIMITED_INSTANCES,
windows_utils.BUFSIZE, windows_utils.BUFSIZE,
_winapi.NMPWAIT_WAIT_FOREVER, _winapi.NULL)
pipe = windows_utils.PipeHandle(h)
self._free_instances.add(pipe)
return pipe
示例2: _new_handle
# 需要导入模块: import _winapi [as 别名]
# 或者: from _winapi import PIPE_UNLIMITED_INSTANCES [as 别名]
def _new_handle(self, first=False):
flags = _winapi.PIPE_ACCESS_DUPLEX | _winapi.FILE_FLAG_OVERLAPPED
if first:
flags |= _winapi.FILE_FLAG_FIRST_PIPE_INSTANCE
return _winapi.CreateNamedPipe(
self._address, flags,
_winapi.PIPE_TYPE_MESSAGE | _winapi.PIPE_READMODE_MESSAGE |
_winapi.PIPE_WAIT,
_winapi.PIPE_UNLIMITED_INSTANCES, BUFSIZE, BUFSIZE,
_winapi.NMPWAIT_WAIT_FOREVER, _winapi.NULL
)