soros kommunikacio

theblond theblond at freemail.hu
Sat May 1 21:01:20 CEST 2004


Hello Beregnyei,

BB> Remekul mukodik a kliens, DE csak sima soros porton, USB-soros atalakiton
BB> kereszul nem (ami csinal egy COM16-ot, es Hyperterminalbol mukodik is
BB> COM16-kent, de tovabbra is bugos a copy-paste).

Mi benne a bug? Ugyan en nem hasznaltam, de azert erdekelne.

BB> A sajat programom ilyet csinal:

BB> HANDLE mhandle;
BB> mhandle = CreateFile("COM16", GENERIC_READ | GENERIC_WRITE, 0, NULL,
BB>                 OPEN_EXISTING, 0, NULL);

BB> Ezutan jonne egy GetCommState() es SetCommstate(), amivel beallitom 9600
BB> baudra a dolgot, de sajnos mar a CreateFile sem fut le, 0 a visszateresi
BB> ertek.

Jol csinalod, de ez a kodreszlet csak a belso 4 soros portra mukodik.
Nos, pontosan valami ilyesmit kell a irni a
"COM16" helyere: "\\\\.\\Com16". Elvileg ezzel mukodni fog.
Hasonlo kerdesekben hasznos segitotars tud lenni a win32sdk.hlp.

BB> A Hyperterminal hogy csinalja, hogy neki megis mukodik? Lehet ezt mas API
BB> hivasokkal??

Nos a fenti trukkel csinalja :)

BB> Koszi elore is,

Remelem segitettem.


-- 
 theblond                            mailto:theblond at freemail.hu




More information about the Elektro mailing list