home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / os2 / programm / 8084 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.3 KB

  1. Path: sparky!uunet!vnet.ibm.com
  2. From: fattire@vnet.ibm.com (BJ Hargrave)
  3. Message-ID: <19930128.051158.218@almaden.ibm.com>
  4. Date: Thu, 28 Jan 93 08:09:00 EST
  5. Newsgroups: comp.os.os2.programmer
  6. Subject: Re: Current call format for DosDevConfig
  7. News-Software: UReply 3.0
  8. References: <1993Jan27.202219.9532@msc.cornell.edu>
  9. Lines: 26
  10.  
  11. In <1993Jan27.202219.9532@msc.cornell.edu> Mike Thompson writes:
  12. >The following code fragment uses DosDevConfig to get computer model
  13. >information.  This is basically from the toolkit example
  14. >
  15. >   BYTE model,submodel;
  16. >
  17. >   DosDevConfig(&model, DEVINFO_MODEL);
  18. >   DosDevConfig(&submodel, DEVINFO_SUBMODEL);
  19. >
  20. >Under the 2.1b beta, it works fine.  However, under 2.0 w/ SP, it
  21. >crashes with a memory fault.  Changing the BYTE declarations to
  22. >ULONG solves the problem.
  23. >
  24. >What is the correct length for DEVINFO_MODEL and DEVINFO_SUBMODEL
  25. >calls?  Is the 2.1b BYTE length correct, or should I be coding for
  26. >ULONG in both cases.
  27. >
  28. >Anyone know?  What about other DEVINFO parameters?
  29.  
  30. It believe it was a bug in the thunk for the API which
  31. is fixed in 2.1. It would always be safe to use a ULONG and
  32. only examine the low byte.
  33.  
  34. -----------------------------------------------------------------------
  35. BJ Hargrave                     Internet: fattire@vnet.ibm.com
  36. Boca Raton, FL                  IBMIPNet: bjhar@bjhar.bocaraton.ibm.com
  37.