Microsoft DirectX 8.0

IComponent Interface

The IComponent interface is the base class interface for all Component objects and it describes the general characteristics of a component, which is typically an elementary stream within the program stream. The derived interfaces such as IMPEG2Component inherit from IComponent and describe the properties of a component that are specific to a given network type. Component objects are created and attached to the Tune Request by the Transport Information Filter (TIF) after reception has begun. All Component objects also support IPersistPropertyBag.

MethodNameDescription
get_TypeRetrieves an IComponentType object describing the general characteristics of the Component.
put_TypeSets an IComponentType object describing the general characteristics of the Component.
get_DescLangIDRetrieves the language for presentation of the description.
put_DescLangIDSets the language for presentation of the description.
get_StatusRetrieves the requested or actual status of the component.
put_StatusSets the requested or actual status of the component.
get_DescriptionRetrieves the description of the component.
put_DescriptionSets the description of the component.
CloneCreates a new copy of the component.

IComponent::Clone

IComponent Interface

Creates a new copy of the component.

Syntax

HRESULT Clone(
    IComponent** NewComponent
    );

Parameters

NewComponent
[out, retval] Address of an IComponent interface pointer that will be set to the new Component.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

IComponent::get_Type

IComponent Interface

Retrieves an IComponentType object describing the general characteristics of the Component.

Syntax

HRESULT get_Type(
    IComponentType** CT
    );

Parameters

CT
[out, retval] Address of an IComponentType interface pointer that will be set to the retrieved Component.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

IComponent::put_Type

IComponent Interface

Sets an IComponentType object describing the general characteristics of the Component.

Syntax

HRESULT put_Type(
    IComponentType* CT
    );

Parameters

CT
[in] Pointer to an IComponentType object that specifies the new values for the Component.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

Using the IComponent base class interface, it is possible to set the Type to be NULL. If you try to do this with the derived IMPEG2Component class interface, this method will return E_POINTER. The IMPEG2Component object cannot have the base IComponentType class interface as the set type - this will return Type Mismatch (0x80020005).

IComponent::get_DescLangID

IComponent Interface

Retrieves the language for presentation of the description.

Syntax

HRESULT get_DescLangID(
    short* LangID
    );

Parameters

*LangID
[out, retval] Pointer to a variable of type short that will receive the language ID.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

This is the language of the descriptive info in the component object. It is not the same as the language ID in language component type which defines the language of the stream content.

IComponent::put_DescLangID

IComponent Interface

Sets the language for presentation of the description.

Syntax

HRESULT put_DescLangID(
    short LangID
    );

Parameters

LangID
[in] Variable of type short that specifies the language ID.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

This is the language of the descriptive info in the component object. It is not the same as the language ID in language component type which defines the language of the stream content. An application can modify this value in order to activate a different language substream.

IComponent::get_Status

IComponent Interface

Retrieves the requested or actual status of the component.

Syntax

HRESULT get_Status(
    ComponentStatus* Status
    );

Parameters

*Status
[out, retval] Pointer to a ComponentStatus enum that receives the status value.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

typedef enum ComponentStatus
	{
		[helpstring("Component is selected")] StatusActive,
		[helpstring("Component is not selected")] StatusInactive,
		[helpstring("Component is unavailable")] StatusUnavailable,
	} ComponentStatus;
  

When a tuner adds a component to the Components collection, it can indicate whether the component is active or not. An application can attempt to set this status, and resubmit a tune request. The tuner will update the status. From the enumeration Active, Inactive, Unavailable. The Unavailable status is only set by a tuner in response to a request to activate, when the component is not really available.

IComponent::put_Status

IComponent Interface

Sets the requested or actual status of the component.

Syntax

HRESULT put_Status(
    ComponentStatus Status
    );

Parameters

Status
[in] A variable of type ComponentStatus that specifies the status value.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

Use this method to activate or inactivate a stream component (substream).

See Also

get_Status

IComponent::get_Description

IComponent Interface

Retrieves the description of the component.

Syntax

HRESULT get_Description(
    BSTR* Description
    );

Parameters

*Description
[out, retval] Pointer to a variable of type BSTR that will receive the description.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

IComponent::put_Description

IComponent Interface

Sets the description of the component.

Syntax

HRESULT put_Description(
    BSTR Description
    );

Parameters

Description
[in] Variable of type BSTR that contains the new description.

Return Value

Returns S_OK if successful. If the method fails, error information can be retrieved using the standard COM IErrorInfo interface.

Remarks

This method is called by the Guide Store, not by the application.