Re: Comm.Question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Windows file handles, as far as I know, are not compatible with Euphoria's
file numbers. You need to use the Windows API to read and write using
Windows file handles.

Also, check out serial.e. I haven't tried using it under exw, but it might
work.

Jeff Fielding
----- Original Message -----
From: "Kondor Attila" <konel at DPG.HU>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Wednesday, March 01, 2000 9:44 AM
Subject: Comm.Question


> --I 'd like to use COM ports in euphoria (W32). If I do:
>         hCom=open("COM1","wb")
>         hCom=-1
> --when I did:
> xCreateFile= linkFunc(kernel32,"CreateFileA",{C_POINTER, C_LONG, C_LONG,
>                             C_POINTER, C_LONG, C_LONG, C_LONG },C_INT)
>
> hCom=c_func(xCreateFile,{comst,GENERIC_WRITE,0,NULL,CREATE_NEW,0,
>                                                               NULL})
> printf(1,"\nhCom=%d",hCom)
> --hCom=12
> -- GetCommState, BuildCommDCB, SetCommState works with hCom
> --and
> puts(hCom,"something")
> -- then the message  "file number 12 is not open"
>
> Please help me!
> Thanks,     Attila Kondor
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu