Microsoft DirectX 8.0 |
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.
MethodName Description get_Type Retrieves an IComponentType object describing the general characteristics of the Component. put_Type Sets an IComponentType object describing the general characteristics of the Component. get_DescLangID Retrieves the language for presentation of the description. put_DescLangID Sets the language for presentation of the description. get_Status Retrieves the requested or actual status of the component. put_Status Sets the requested or actual status of the component. get_Description Retrieves the description of the component. put_Description Sets the description of the component. Clone Creates a new copy of the component.
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.
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.
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).
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.
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.
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.
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
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
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.