Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!texbell!attctc!chasm From: chasm@attctc.Dallas.TX.US (Charles Marslett) Newsgroups: comp.sys.ibm.pc Subject: Re: Determine current video adapter/monitor Summary: Don't bet on your graphics library! Message-ID: <10067@attctc.Dallas.TX.US> Date: 7 Nov 89 15:02:45 GMT References: <2844@hub.UUCP> Distribution: usa Organization: The Unix(R) Connection, Dallas, Texas Lines: 28 In article <2844@hub.UUCP>, crmeyer@voodoo.ucsb.edu writes: > In article <5060063@hpccc.HP.COM>, tomj@hpccc.HP.COM (Tom Johnson) writes... > > > >What is the best way to determine in a program what video adapter/monitor > >is currently installed?? > > In most C compilers their are comands to query what graphics adapter is in use. > My manual on Mix C has the command 'getvconfig' that reurns a pointer to a > construct containing all sorts of info...(x&y resolution, aspect ratio, > number of colors, etc). From this you should be able to figure out what > adapter is being used. I don't know about Mix C, but both Turbo and Microsoft C have similar functions that seem disgustingly unreliable, considering how simple the task is. IBM has a one page description in their BIOS technical reference manual that covers an extremely easy, reliable decision tree to identify the card type, it's extensible, and it's easy to debug. Getting a table from a "magic" subroutine and trying to make it work leads to your code running in the least common resolution usually. If there is any interest, I'll post a description. Charles =============================================================================== "Those who would sacrifice ** Charles Marslett liberty for security, ** STB Systems, Inc. <-- apply all std. disclaimers deserve neither." ** Wordmark Systems <-- that's just me -- Benjamin Franklin ** chasm\@attctc.dallas.tx.us -------------------------------------------------------------------------------