At initialization time, an OS/2 device driver lacks the privilege level for making a FAR call to the ASPI interface. To circumvent this restriction, the SCSI manager provides a special IOCtl which can be used by a driver to pass an ASPI request. To use the IOCtl, the driver must first use a DosOpen call to get a file handle for the SCSI manager. Having completed this successfully, the driver can call ASPI at initialization time as follows:

        PUSH            @DATA_BUFFER                   ;Not Applicable
        PUSH            @REQUEST_BLOCK                 ;Parameter List = SRB
        PUSH            40H                            ;Function Code
        PUSH            80H                            ;Function Category
        PUSH            ASPI_Handle                    ;File handle from DosOpen
        CALL            DOSDEVIOCTL

When the driver has returned from initialization, this access method is no longer valid.


[Back: Calling ASPI]
[Next: ASPI and OS/2 2.x]