Important: The information in this document is obsolete and should not be used for new development.
GetComponentInfo
TheGetComponentInfo
function returns all of the registration information for a component. Your application specifies the component with a component identifier returned by theFindNextComponent
function. TheGetComponentInfo
function returns information about the component in a component description record. TheGetComponentInfo
function also returns the component's name, information string, and icon. (To get a handle to the component's icon suite, if it provides one, use theGetComponentIconSuite
function.)A component provides this registration information when it is registered with the Component Manager.
FUNCTION GetComponentInfo (aComponent: Component; VAR cd: ComponentDescription; componentName: Handle; componentInfo: Handle; componentIcon: Handle): OSErr;
aComponent
- A component identifier that specifies the component for the operation. Your application obtains a component identifier from the
FindNextComponent
function. If your application registers a component, it can also obtain a component identifier from theRegisterComponent
orRegisterComponentResource
function.- You may supply a component instance rather than a component identifier to this function. (If you do so, you must coerce the data type appropriately.) Your application can obtain a component instance from the
OpenComponent
function or theOpenDefaultComponent
function.cd
- A component description record. The
GetComponentInfo
function returns information about the specified component in a component description record.componentName
- An existing handle that is to receive the component's name. If the component does not have a name, the
GetComponentInfo
function returns an empty handle. Set this field toNIL
if you do not want to receive the component's name.componentInfo
- An existing handle that is to receive the component's information string. If the component does not have an information string, the
GetComponentInfo
function returns an empty handle. Set this field toNIL
if you do not want to receive the component's information string.componentIcon
- An existing handle that is to receive the component's icon. If the component does not have an icon, the
GetComponentInfo
function returns an empty handle. Set this field toNIL
if you do not want to receive the component's icon.DESCRIPTION
TheGetComponentInfo
function returns information about the specified component in thecd
,componentName
,componentInfo
, andcomponentIcon
parameters.RESULT CODES
noErr 0 No error invalidComponentID -3000 No component with this component identifier SEE ALSO
For information on the component description record, see page 6-36. For information on theFindNextComponent
function, see page 6-40. For information on registering components, see "Registering Components" beginning on page 6-55.For an example of the use of the
GetComponentInfo
function, see Listing 6-3 on page 6-10.