import time
import ctypes as C
k32 = C.windll.kernel32
def log(*args):
msg = "PYTHON:"
for i in args:
msg += " " + str(i)
print msg
def processo_1():
dll_name = "pipe.dll"
l = C.cdll.LoadLibrary(dll_name)
hPipe_C = l.createClientPipe()
while True:
l.read(hPipe_C)
time.sleep(0.2)
k32.CloseHandle(hPipe_C)
processo_1()
|