TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mike Byrne
from: Arne de Bruijn
date: 1995-09-27 16:06:00
subject: SYSxxxx errors in program

Mike Byrne wrote in a message to Mike Bilow:

 MB> Call DosGetMessage().

 MB> I can't seem to do that in my programs.
 MB> Keep in mind I'm compiling with VP.

Yes, I found that problem too. It seems the function DosGetMessage does not
exists in the OS2 libraries, but a function called DosTrueGetMessage does.
The difference between it and DosGetMessage is an extra parameter, using 0
for it seems to work fine.
I made the following changes to os2base.pas to proper support DosGetMessage
(I've reported this to the author of VP):

Changed the DosGetMessage declaration in the interface part of os2base.pas to:

{$cdecl-}
function DosGetMessage(var Table; cTable: ULong; Buf: PChar; cbBuf: ULong;
  MsgNumber: ULong; FileName: PChar; var cbMsg: ULong): ApiRet;
{$cdecl+}

Added this to the implementation section of os2base.pas:

function DosTrueGetMessage(X:longint; var Table; cTable: ULong; Buf: PChar;
cbBuf: ULong;
  MsgNumber: ULong; FileName: PChar; var cbMsg: ULong): ApiRet; external;

Removed the reference to DosGetMessage under implementation, and added the
following to the end of the unit:

{$cdecl-}
function DosGetMessage(var Table; cTable: ULong; Buf: PChar; cbBuf: ULong;
  MsgNumber: ULong; FileName:PChar; var cbMsg: ULong): ApiRet; assembler;
asm
 push [cbMsg]
 push [FileName]
 push [MsgNumber]
 push [cbBuf]
 push [Buf]
 push [cTable]
 push [Table]
 push 0
 call DosTrueGetMessage
 add esp,1Ch
end;


Greetings,
 Arne
--- FMail/386 0.98
* Origin: (2:281/705.8)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 281/705 283/512 280/801 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.