Important: The information in this document is obsolete and should not be used for new development.
HardDiskQInstall
You can use theHardDiskQInstall
function to notify your software when power to the internal hard disk is about to be turned off.
OSErr HardDiskQInstall(HDQueueElement *theElement);
theElement
- A pointer to an element for the hard disk power down queue.
DESCRIPTION
TheHardDiskQInstall
function installs an element into the hard disk power down queue to provide notification to your software when the internal hard disk is about to be powered off. For example, this feature might be used by the driver for an external battery-powered hard disk. When power to the internal hard disk is turned off, the external hard disk could be turned off as well.When power to the internal hard disk is about to be turned off, the software calls the routine pointed to by the
hdProc
field so that it can do any special processing. The routine is passed a pointer to its queue element so that, for example, the routine can reference its variables.Before calling
HardDiskQInstall
, the calling program must set thehdQType
field toHDPwrQType
or the queue element won't be added to the queue andHardDiskQInstall
will return an error.ASSEMBLY-LANGUAGE INFORMATION
The trap is_PowerMgrDispatch
($A09E). The selector value forHardDiskQInstall
is 10 ($0A) in the low word of register D0. The pointer to theHDQueue
element is passed in register A0. The result code is returned in the low word of register D0.RESULT CODES
noErr 0 No error SEE ALSO
TheHDQueueElement
structure is defined in "Hard Disk Queue Structure," on page 6-27.The application-defined hard disk spindown function is described in "Hard Disk Spindown Function," on page 6-66.