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 = l.createServerPipe()
hPipe_C = l.createClientPipe()
log(hPipe)
#l.read(hPipe_C)
l.write(hPipe)
k32.CloseHandle(hPipe)
k32.CloseHandle(hPipe_C)
while True:
time.sleep(0.2)
processo_1()
|