Bizzare return code from DosWrite

Bizzare return code from DosWrite

Post by Damjan Peren » Thu, 17 Oct 2002 18:46:38



Hello!

Has anybody encountered a return code of 504 from DosRead?
I'm using it on named pipes for interprocess communication on the same
computer.
It usually fails just after doing a DosWrite which returns 0, but the
receiver on the other end of the pipe gets nothing.

This happens after about a week after several thousands such
transactions (DosWrite a structure of few hundred bytes, then DosRead
an unsigned long response). Restarting applications doesn't help, the
situation would occur sooner. I have to reboot to get another week of
operation.

(I cannot reproduce this with a traffic generator)

Thank you for any insight...

 
 
 

Bizzare return code from DosWrite

Post by Bob Plyle » Thu, 17 Oct 2002 19:43:38



> Hello!

> Has anybody encountered a return code of 504 from DosRead?

Is that 504 decimal or 504 hex?

[D:\]help 504

SYS0504: A keyboard API function was attempted from a
Presentation Manager session.

EXPLANATION: PM sessions cannot issue keyboard API functions.
Keyboard functions are valid only from full-screen and
text-windowed sessions.

ACTION: Refer to the OS/2 Toolkit for an explanation of how to
receive keyboard input for a PM program.

[D:\]help 1284

SYS1284: *** bytes used by system files

No help is available for the message ID number requested.

Bob Plyler

 
 
 

Bizzare return code from DosWrite

Post by Damjan Peren » Thu, 17 Oct 2002 21:42:17




>> Hello!

>> Has anybody encountered a return code of 504 from DosRead?

> Is that 504 decimal or 504 hex?

That 504 is decimal.

Quote:> [D:\]help 504

> SYS0504: A keyboard API function was attempted from a
> Presentation Manager session.

> EXPLANATION: PM sessions cannot issue keyboard API functions.
> Keyboard functions are valid only from full-screen and
> text-windowed sessions.

> ACTION: Refer to the OS/2 Toolkit for an explanation of how to
> receive keyboard input for a PM program.

Correct. It is not a valid DosWrite return code. This error message
in correlation with DosWrite does not make any sensible meaning to me.
 
 
 

Bizzare return code from DosWrite

Post by Ruediger Ih » Fri, 18 Oct 2002 01:27:59




Quote:> Correct. It is not a valid DosWrite return code. This error message
> in correlation with DosWrite does not make any sensible meaning to me.

I've seen something similar in a case, where due to a bug in the
program a file handle got overwritten with zero. Since the read/write
request then was directed to stdin, I got keyboard related error
messages, which really didn't make sense in the given context.

--
Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
http://www.s-t.de
Please remove all characters left of the "R" in my email address

 
 
 

Bizzare return code from DosWrite

Post by Ilya Zakharevic » Fri, 18 Oct 2002 06:12:55


[A complimentary Cc of this posting was sent to
Damjan Perenic

Quote:> Correct. It is not a valid DosWrite return code.

A side remark:

There is no such notion as "a valid return code".  The lists in CP
reference discuss *typical* situations only.  Especially in DosWrite()
case, which is immediately forwarded to the IFS (IIRC), which can
return whatever it judges fit.

Hope this helps,
Ilya

 
 
 

1. Named pipe DosWrite() returns rc=157 ERROR_DISCARDED

DosWrite() does show two more codes in the tookkit CP online docs
(dates Oct94) that are not shown in my printed docs:

112 ERROR_DISK_FULL
157 ERROR_DISCARDED

Sometimes the error description does fit all the reasons.  A search on
'discarded' proved useful, though.

--

    DOS Bullet 1.25   DOS Ruckus 1.21 |ftp.crl.com  /users/co/cornel
  Win3x Bullet 1.26   W95 Bullet 2.04 |ftp://ftp.crl.com/users/co/cornel
 DOSX32 Bullet 2.04  OS/2 Bullet 2.04 |BBS:(210)684-8065 after business hrs

2. Extensions manager and passwords

3. Converting win98 to win2000

4. GTAK Tar Return Codes

5. Delete packages sent from the parent site

6. DosDevIOCtl <> CD ROM - Strange return code

7. aunching the Platinum 2230 Reflex CtP at Ipex.

8. PrfWriteProfileData return code

9. Return Codes from os commands...

10. NMAKE error U1077 'D:\OS2\CMD.EXE' return code '4'

11. HELP !!! - DevOpenDC with undocumented return code

12. DosDevIOCtl returns bizarre error code