Condividi tramite


IEvalRat::MostRestrictiveRating method (tvratings.h)

[The feature associated with this page, Microsoft TV Technologies, is a legacy feature. Microsoft strongly recommends that new code does not use this feature.]

The MostRestrictiveRating method compares two ratings and returns the more restrictive of the two.

Syntax

HRESULT MostRestrictiveRating(
  [in]  EnTvRat_System       enSystem1,
  [in]  EnTvRat_GenericLevel enEnLevel1,
  [in]  LONG                 lbfEnAttr1,
  [in]  EnTvRat_System       enSystem2,
  [in]  EnTvRat_GenericLevel enEnLevel2,
  [in]  LONG                 lbfEnAttr2,
  [out] EnTvRat_System       *penSystem,
  [out] EnTvRat_GenericLevel *penEnLevel,
  [out] LONG                 *plbfEnAttr
);

Parameters

[in] enSystem1

The rating system of the first rating to compare, specified as a member of the EnTvRat_System enumeration.

[in] enEnLevel1

The rating level of the first rating, specified as a member of the EnTvRat_GenericLevel enumeration.

[in] lbfEnAttr1

Specifies the content attributes of the first rating, as a bitwise combination of flags from the BfEnTvRat_GenericAttributes enumeration.

[in] enSystem2

The rating system of the second rating to compare, specified as a member of the EnTvRat_System enumeration.

[in] enEnLevel2

The rating level of the second rating, specified as a member of the EnTvRat_GenericLevel enumeration.

[in] lbfEnAttr2

Specifies the content attributes of the second rating, as a bitwise combination of flags from the BfEnTvRat_GenericAttributes enumeration.

[out] penSystem

Receives the rating system of the more restrictive rating.

[out] penEnLevel

Receives the rating level of the more restrictive rating.

[out] plbfEnAttr

Receives a bitwise combination of flags from the BfEnTvRat_GenericAttributes enumeration.

Return value

The method returns an HRESULT. Possible values include those in the following table.

Return code Description
E_POINTER
NULL pointer argument.
S_FALSE
The ratings are from two different rating systems.
S_OK
The method succeeded.

Remarks

This method enables the client to determine which of two ratings is more restrictive. For example, in the MPAA system, PG is more restrictive than R. The more restrictive rating is returned in the penSystem, penEnLevel, and plbfEnAttr parameters.

When the method compares ratings from two different ratings systems, it returns a rating expressed in the first system, unless the first system is unknown (TvRat_SystemDontKnow). In that case, it returns a rating using the second system.

The method returns S_FALSE if the ratings systems are not the same. There may not be an exact mapping between the two systems.

Requirements

Requirement Value
Minimum supported client Windows�XP with SP1 [desktop apps only]
Minimum supported server None supported
Target Platform Windows
Header tvratings.h

See also

IEvalRat Interface