Subj : DosRead - access denied? To : Eddy Thilleman From : Vitus Jensen Date : Wed Jun 14 2000 05:57 pm Moin Eddy, 13.06.00 12:07, Eddy Thilleman wrote a message to Vitus Jensen: ET> I hope you get my reply, because I don't seem to receive any ET> replies to my messages in any of the international OS/2 areas ET> lately. :-( Mhmm, OS2PROG is the only internation fidonet echo i read regulary. And i think i got all msgs. ET> Monday 12 June 2000 20:05, Vitus Jensen wrote to all: VJ>> Could someone name any reason why a DosRead() from a serial port VJ>> will return error code 5 (access denied)? It's listed as VJ>> possible error code but i would connect it with DosOpen(). ET> Has the driver or another process exclusively opened the serial ET> port at the time your code tries to get access to the serial ET> port, or does your code exclusively (try to) open the serial port? My testprogram opens with OPEN_SHARE_DENYREADWRITE so there should be no possibility that other processes interfer. But as i noticed today (got strange behavour on one of our terminals) it is possible to open the port from several processes concurrently. exclusive (well, at least they tried). A quick look to the device driver header revealed the attribute work 0x8880 which has bit 12 reset (don't apply filesystem sharing rules) and bit 11 set (open/close supported). This means that OS/2 is requested to ignore OPEN_SHARE_DENYREADWRITE and calls the driver's open routine for each DosOpen. And the driver happily returns OK (i guess). VJ>> I just have no clue why DosRead could fail with the error (except VJ>> when the driver is buggy (which it is anyway :-)), ET> Is the developer of the serial driver capable to realise the ET> possibility he made a mistake in his code? He is quite responsive. And I reported the above findings to him. Lets see whether the next release will have bit 12 set (preferred) or return error on all opens after the first (this is OK to me). Bye, Vitus --- Sqed/rexx 33: * Origin: The road to success is always under construction. (2:2474/424) .