RatingCheckUserAccessRatingCheckUserAccess*
*



Contents  *



Index  *Topic Contents
*Previous Topic: RatingAccessDeniedDialog2
*Next Topic: RatingEnable

RatingCheckUserAccess

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

Determines whether the user is allowed to view the given content based on the associated rating label. An application calls this function when it finds a rating label.

pszUsername
Address of a string that contains the name of the user whose access to the content should be validated. A NULL value 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 URL to which the rating label is to apply. The function uses this parameter to validate the corresponding field in the rating label, 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 (for example, the text between the "content" single quotation marks in the example in Example of HTML Tagged Ratings). This parameter can be NULL if the application cannot find a rating in the content itself; in this case, the function returns a value that indicates whether the user is allowed to see unrated content.
pData and cbData
Address of the content being rated and the length, in bytes, of the content data stream. These 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.
ppRatingDetails
Address of a variable that contains 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.

This function allows ratings of any content type, including CD-ROMs, news groups, Web sites, and so on, 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.

See also RatingAccessDeniedDialog, RatingFreeDetails, RatingObtainQuery


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.