PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

Using DriverGestalt and DriverConfigure

Status code csCode 43 (0x2B) is defined as DriverGestalt. It takes two parameters, at csParam and csParam +4, that contain a gestalt-like selector and long word output. Similarly, control csCode 43 is defined as DriverConfigure. It also takes two parameters, an OSType selector that specifies the requested operation and a long word. The parameter blocks have these structures:

struct DriverGestaltParam {
    QElemPtr                qLink;
    short                   qType;
    short                   ioTrap;
    Ptr                     ioCmdAddr;
    ProcPtr                 ioCompletion;
    OSErr                   ioResult;
    StringPtr               ioNamePtr;
    short                   ioVRefNum;
    short                   ioCRefNum;      /* refNum for I/O operation*/
    short                   csCode;         /* == kDriverGestaltCode */
    OSType                  driverGestaltSelector;

    UInt32                  driverGestaltResponse;      /* Could be a */
                                            /* pointer, bit field or */
                                            /* other format */


    UInt32                  driverGestaltResponse1;     /* Could be a */
                                            /* pointer, bit field or */
                                            /* other format */


    UInt32                  driverGestaltResponse2;     /* Could be a */
                                            /* pointer, bit field or */
                                            /* other format */


    UInt32                  driverGestaltResponse3;     /* Could be a */
                                            /* pointer, bit field or */
                                            /* other format */


    UInt16                  driverGestaltfiller; /* To pad out to the */
                                                /* size of a controlPB */
};


struct DriverConfigParam {
    QElemPtr                    qLink;
    short                       qType;
    short                       ioTrap;
    Ptr                         ioCmdAddr;
    IOCompletionUPP             ioCompletion;
    OSErr                       ioResult;
    StringPtr                   ioNamePtr;
    short                       ioVRefNum;
    short                       ioCRefNum;  /* refNum for I/O operation*/
    short                       csCode;     /* == driverConfigureCode*/
    OSType                      driverConfigureSelector;
    UInt32                      driverConfigureParameter;
};

The OSType selectors for DriverGestalt and DriverConfigure are defined according to the rules of gestalt selector definition set forth in Inside Macintosh: Operating System Utilities. In particular, Apple reserves all four-character sequences consisting entirely of lowercase letters and nonalphabetic characters.

DriverGestalt Selectors

Using the 'boot' Selector


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)