Thread View: comp.os.os2.programmer
2 messages
2 total messages
Started by Mike Thompson
Wed, 27 Jan 1993 20:22
Current call format for DosDevConfig
Author: Mike Thompson
Date: Wed, 27 Jan 1993 20:22
Date: Wed, 27 Jan 1993 20:22
30 lines
1401 bytes
1401 bytes
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? Thanks. --------------------- Michael O. Thompson tommy@msc.cornell.edu Cornell University (607) 255-4714 OS/2: For the few, the proud, the devoted! -- Michael O. Thompson tommy@msc.cornell.edu Cornell University (607) 255-4714 OS/2: For the few, the proud, the devoted!
Re: Current call format for DosDevConfig
Author: BJ Hargrave
Date: Thu, 28 Jan 1993 13:09
Date: Thu, 28 Jan 1993 13:09
26 lines
1401 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads