🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Current call format for DosDevConfig

#3699
From: BJ Hargrave
Date: Thu, 28 Jan 1993 13:09
26 lines
1401 bytes
In <1993Jan27.202219.9532@msc.cornell.edu> Mike Thompson writes:
>The following code fragment uses DosDevConfig to get computer model
>information.  This is basically from the toolkit example
>
>   BYTE model,submodel;
>
>   DosDevConfig(&model, DEVINFO_MODEL);
>   DosDevConfig(&submodel, DEVINFO_SUBMODEL);
>
>Under the 2.1b beta, it works fine.  However, under 2.0 w/ SP, it
>crashes with a memory fault.  Changing the BYTE declarations to
>ULONG solves the problem.
>
>What is the correct length for DEVINFO_MODEL and DEVINFO_SUBMODEL
>calls?  Is the 2.1b BYTE length correct, or should I be coding for
>ULONG in both cases.
>
>Anyone know?  What about other DEVINFO parameters?

It believe it was a bug in the thunk for the API which
is fixed in 2.1. It would always be safe to use a ULONG and
only examine the low byte.

-----------------------------------------------------------------------
BJ Hargrave                     Internet: fattire@vnet.ibm.com
Boca Raton, FL                  IBMIPNet: bjhar@bjhar.bocaraton.ibm.com
Technical Details
Message-ID: <19930128.051158.218@almaden.ibm.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com
References: <1993Jan27.202219.9532@msc.cornell.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!vnet.ibm.com
From: fattire@vnet.ibm.com (BJ Hargrave)
Message-ID: <19930128.051158.218@almaden.ibm.com>
Date: Thu, 28 Jan 93 08:09:00 EST
Newsgroups: comp.os.os2.programmer
Subject: Re: Current call format for DosDevConfig
News-Software: UReply 3.0
References: <1993Jan27.202219.9532@msc.cornell.edu>
Lines: 26