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
- 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 version 3.0, NULL is the only valid value for this parameter.
- pszURL
- Address of the string that contains the URL to which the rating label is to apply. The function uses this parameter to validate the corresponding field in the rating label and to verify that the rating label actually belongs to the URL for which the label was obtained. This parameter can be NULL if a URL is not applicable.
- pszRatingInfo
- Address of the PICS label to parse and verify.
- pData
- Address of the content being rated.
- cbData
- Length, in bytes, of the content data stream.
- ppRatingDetails
- Address of 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. This parameter can be NULL, in which case 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, no matter what value the RatingCheckUserAccess function returns or what value is stored in ppRatingDetails.
Return Value
Returns one of the following values:
S_OK Access is allowed. S_FALSE Access is denied. Error codes 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 itself contains a hash of the data for security reasons. If pData is NULL, the cbData parameter is ignored, and the hash cannot be validated.
Function Information
Windows NT Use version 4.0 Windows Use Windows 95 and later Header Ratings.h Import Library Msrating.lib Minimum availability Internet Explorer 4.0
See Also
RatingAccessDeniedDialog, RatingFreeDetails, RatingObtainQuery