[comp.sys.mac.programmer] Finding the Graphic Device Slot Number?

jp57+@andrew.cmu.edu (Jefferson Provost) (03/27/91)

Hi,

I have a program which needs to install a VBL task on the currently
active video device.  It runs with no problem on most machines, but it
cannot find the correct slot number on one particular setup.  The
machine is a IIci running 6.0.5 with _two_ graphics boards, the apple
board that came with it, and a pixelview II board from Mirror
Technologies.  Only the pixelview board is being used.

The code is set up to check and see if the 'scrn' resource was used to
init the hardware, and if so, it gets the slot number from there.  If
the 'scrn' resource wasn't used, it uses GetVideoDefault() to find the
slot number.  In this case, the 'scrn' resource is incorrect and isn't
used to init the hardware, and apparently GetVideoDefault() doesn't give
the correct slot number either.

Somehow or other, obviously, the system knows where to find the
pixelview card, since it runs fine, but I can't find it.  (Well, *I*
know where the card is, but I'd like the software to be able to find it
on its own.)

What am I missing?  It would seem logical (to me, anyway) that I should
be able to find out the slot number of the current graphic device
through the GDevice record somehow, but that doesn't seem to be the
case.  (or the documentation had too many levels of indirection and I
missed something somewhere)

I've heard a few mystical references to Gestalt as the answer to my
problems, but I need IM 6 for documentation on it.

Any help will be appreciated,

Jeff


+-------------------------------------------+
|Jefferson Provost    | jp57+@andrew.cmu.edu|
| Psychology          |  (412) 268-3139     |
| Carnegie Mellon     |---------------------|
| Pittsburgh, PA 15213|-=-=-=-=-=-=-=-=-=-=-|
+-------------------------------------------+