RatingCheckUserAccess function

Note  The Internet Ratings API is deprecated, and will be removed in a future release. Use Windows 8 Family Safety feature instead.
 

Determines whether the user is allowed to view the given content based on the associated rating label.

Syntax


HRESULT RatingCheckUserAccess(
   LPCTSTR pszUsername,
   LPCTSTR pszURL,
   LPCTSTR pszRatingInfo,
   LPBYTE  pData,
   DWORD   cbData,
   VOID    **ppRatingDetails
);

Parameters

pszUsername

The address of a string that contains the name of the user whose access to the content should be validated. NULL indicates the currently logged on user. For Internet Explorer 3.0, NULL is the only valid value for this parameter.

pszURL

The address of the string that contains the URL to which the rating label applies. The function uses this parameter to validate the corresponding field in the rating label and to verify that the rating label belongs to the URL for which the label was obtained. This parameter can be NULL, if a URL is not applicable.

pszRatingInfo

The address of the PICS label to parse and verify.

pData

The address of the content being rated.

cbData

The length, in bytes, of the content data stream.

ppRatingDetails

A pointer to an opaque data structure that describes in more detail why access to the content is denied. This parameter has meaning only to the RatingAccessDeniedDialog function. If this parameter is NULL, the dialog box created by RatingAccessDeniedDialog cannot report detailed information to the user. If this parameter is not NULL, the application must call the RatingFreeDetails function to free the data, regardless of the value returned by the RatingCheckUserAccess function or the value that is stored in ppRatingDetails.

Return value

Returns one of the following values. 

Return codeDescription
S_RATING_ALLOW

Access is allowed.

S_RATING_ALLOW

Access is denied.

E_RATING_NOT_FOUND

Content should be considered unrated.

 

Remarks

An application calls this function when it finds a rating label. The function allows ratings of any content type, including CD-ROMs, news groups, and Web sites, provided the client application can find the rating information. The RatingObtainQuery function makes an internal call to the RatingCheckUserAccess function before calling the application's callback function.

The pData and cbData parameters may be necessary, if the rating contains a hash of the data for security reasons. If pData is NULL, the cbData parameter is ignored, and the hash cannot be validated.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Product

Internet Explorer 4.0

Header

Ratings.h

Library

Msrating.lib

DLL

Msrating.dll

Unicode and ANSI names

RatingCheckUserAccessW (Unicode) and RatingCheckUserAccess (ANSI)

See also

Reference
RatingAccessDeniedDialog
RatingFreeDetails
RatingObtainQuery

 

 

Show: