fisrt commit

This commit is contained in:
jianxin committed 2023-09-05 22:48:20 +08:00
commit 984ff6cfce
15 files changed
+577

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
import win32pipe
import win32file
# 连接到命名管道
pipe_name = r'\\.\pipe\botext'
pipe = win32file.CreateFile(
pipe_name,
win32file.GENERIC_READ | win32file.GENERIC_WRITE,
0,
None,
win32file.OPEN_EXISTING,
0,
None
)
win32file.WriteFile(pipe, b'close1')
# 关闭管道
win32file.CloseHandle(pipe)