WIN API serial - fekezes nelkul
Istvan Retaller
istvan.retaller at evoran.hu
Tue Jun 15 10:58:21 CEST 2004
Szia!
>1. Ha siman megnyitod a portot, nem csinalsz semmit, lezarod, majd ismet
>megnyitod akkor jo?
Igen, jo.
>2. Csinalsz valami trukkoset, es utana mar nem jo? Igen -> Kiakasztottad a
>soros portot. Szinten windows error, mert igazan visszaallithatna a normalis
>allapotot, ha lezarod.
>
Ez van nalam.
>Hogyan? (azaz hogyan nyitsz meg, zarsz le portot?)
Kernel32 hivasokkal:
DECLARE "Kernel32",CreateFileA
(name:string,access:int,share:int,security:int,create:int,flags:int,handle:int),int
DECLARE "Kernel32",GetCommState(handle:int,lpdcb:DCB),int
DECLARE "Kernel32",SetCommState(handle:int,lpdcb:DCB),int
DECLARE "Kernel32",CloseHandle(handle:int),int
DECLARE "Kernel32",WriteFile
(handle:int,buffer:pointer,count:int,written:pointer,overlapped:int),int
DECLARE "Kernel32",ReadFile
(handle:int,buffer:pointer,count:int,bytesread:pointer,overlapped:int),int
More information about the Elektro
mailing list