🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #2375

Re: Problem with OS/2 monitor program

#2375
From: Alan Ballard
Date: Wed, 23 Jan 1991 00:10
36 lines
1845 bytes
In article <1544@digi.lonestar.org> cfoughty@digi.lonestar.org (Cy Foughty) writes:
>
>The function "DosMonReg()" returns an "8" (ERROR_NOT_ENOUGHT_MEMORY)
>in the following following program. 

I haven't seen a reply to this, so I'll try a couple of suggestions. Looks
like the error code is unreasonable, but there is a bug or two...

>MONIN moninOutput ;

This should really be MONOUT monoutput though it doesn't really matter.



>   usIndex = 0 ;
>   usRtnCode = DosMonReg( hmonDevice,
>                         (PBYTE)&moninInput,
>                         (PBYTE)&moninOutput,
>                          MONITOR_BEGIN,
>                          usIndex) ;

moninInput and moninOutput need to be initialized as in
   moninInput.cb = sizeof(MONIN);
   moninOutput.cb = sizeof(MONOUT);
before registering.  I suspect this is what is causing the problem.
Also, what device were you trying to monitor?  usIndex = 0 may be invalid. 
For the keyboard, it needs to be the screen group. 





Alan Ballard                   | Internet: ballard@ucs.ubc.ca
University Computing Services  |   Bitnet: USERAB1@UBCMTSG
University of British Columbia |    Phone: 604-228-3074
Vancouver B.C. Canada V6R 1W5  |      Fax: 604-228-5116
Technical Details
Message-ID: <1991Jan23.001055.28646@unixg.ubc.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!cheddar.ucs.ubc.ca!ballard
References: <1544@digi.lonestar.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!unixg.ubc.ca!cheddar.ucs.ubc.ca!ballard
From: ballard@cheddar.ucs.ubc.ca (Alan Ballard)
Newsgroups: comp.os.os2.programmer
Subject: Re: Problem with OS/2 monitor program
Message-ID: <1991Jan23.001055.28646@unixg.ubc.ca>
Date: 23 Jan 91 00:10:55 GMT
References: <1544@digi.lonestar.org>
Sender: news@unixg.ubc.ca (Usenet News Maintenance)
Organization: Computing Services, University of British Columbia
Lines: 36