Previous Book Contents Book Index Next

Inside Macintosh: Apple Game Sprockets Guide /
Chapter 3 - InputSprocket / InputSprocket Reference
InputSprocket Functions / Configuring the Application


ISpDevices_ExtractByClass

You can use the ISpDevices_ExtractByClass function to extract and count devices of a certain class listed on the systemwide list of devices. This may be useful if you want to find and deactivate input devices--usually the keyboard and mouse--prior to autoconfiguration.

OSStatus ISpDevices_ExtractByClass (
	ISpDeviceClass theClass,
	UInt32 inBufferCount,
	UInt32 *outCount,
	ISpDeviceReference *buffer);
theClass
The category of device to count and extract. See "Built-in Device Categories" (page 3-18) for built-in values for this parameter.
inBufferCount
The number of device references in the array pointed to by the buffer parameter.
outCount
The number of devices of the specified category on the systemwide list.
buffer
A pointer to an array of device references.
function result
A result code.
DESCRIPTION
The ISpDevices_ExtractByClass function takes, in the buffer parameter, a pointer to an array of device references and, in the inBufferCount parameter, the number of device references in the array. The ISpDevices_ExtractByClass function copies into that array, device references of the class specified by the theClass parameter found on the systemwide list of devices. If there are more devices of that class in the list than there is space in your array, it copies only as many device references as fit. The function returns, in the outCount parameter, the total number of devices of the specified category in the systemwide list of devices.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996