Contents

GetComponentInfo

Returns to your application the registration information for a component.

Declaration

OSErr GetComponentInfo(Component aComponent, ComponentDescription *cd, Handle componentName, Handle componentInfo, Handle componentIcon);

Parameters

  • aComponent:

    The component about which you wish to obtain information. Your application obtains a component identifier from the 1516552 Findnextcomponent function. If your application registers a component, it can also obtain a component identifier from the 1516537 Registercomponent or 1516594 Registercomponentresource function.

    You may supply a component instance rather than a component identifier to this function, but you must coerce the data type appropriately. Your application can obtain a component instance from the 1516607 Opencomponent or 1516523 Opendefaultcomponent functions.

  • cd:

    A pointer to a Componentdescription structure. The function returns information about the specified component in this structure.

  • componentName:

    On return, a handle to the component’s name. If the component does not have a name, an empty handle. Set this field to NULL if you do not want to receive the component’s name.

  • componentInfo:

    On return, a handle to the component’s information string. If the component does not have an information string, an empty handle. Set this field to NULL if you do not want to receive the component’s information string.

  • componentIcon:

    On return, a handle to the component’s icon. If the component does not have an icon, an empty handle. Set this field to NULL if you do not want to receive the component’s icon. To get a handle to the component’s icon suite, if it provides one, use the GetComponentIconSuite function.

Return Value

A result code. See Result Codes.

Discussion

For information on registering components, see “Registering Components”.

See Also

Getting Information About Components