Important: The information in this document is obsolete and should not be used for new development.
GetComponentInfo
TheGetComponentInfofunction returns all of the registration information for a component. Your application specifies the component with a component identifier returned by theFindNextComponentfunction. TheGetComponentInfofunction returns information about the component in a component description record. TheGetComponentInfofunction 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 theGetComponentIconSuitefunction.)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
FindNextComponentfunction. If your application registers a component, it can also obtain a component identifier from theRegisterComponentorRegisterComponentResourcefunction.- 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
OpenComponentfunction or theOpenDefaultComponentfunction.cd- A component description record. The
GetComponentInfofunction 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
GetComponentInfofunction returns an empty handle. Set this field toNILif 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
GetComponentInfofunction returns an empty handle. Set this field toNILif 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
GetComponentInfofunction returns an empty handle. Set this field toNILif you do not want to receive the component's icon.DESCRIPTION
TheGetComponentInfofunction returns information about the specified component in thecd,componentName,componentInfo, andcomponentIconparameters.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 theFindNextComponentfunction, 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
GetComponentInfofunction, see Listing 6-3 on page 6-10.