RatingObtainQueryRatingObtainQuery*
*



Contents  *



Index  *Topic Contents
*Previous Topic: RatingObtainCancel
*Next Topic: RatingSetupUI

RatingObtainQuery

HRESULT RatingObtainQuery(
    LPCTSTR pszTargetUrl,
    DWORD dwUserData,
    void (*fCallback)(
        DWORD dwUserData,
        HRESULT hres,
        LPCTSTR pszRating,
        LPVOID lpvRatingDetails
    ),
    HANDLE *phRatingObtainQuery
);

Encapsulates the process of checking ratings that appear on a local list, third-party PICS server, or future third-party add-on rating services.

pszTargetUrl
URL whose ratings are to be queried.
dwUserData
Data to be passed to the callback function specified by fCallback.
fCallback
Application-defined function that is called upon completion. This function is called in the context of a different thread than the one that called RatingObtainQuery.

The callback function has the following parameters:
dwUserDataData supplied in the initial call to RatingObtainQuery.
hresResult of the query. Can be one of the following values:
S_OKRating found and access allowed.
S_FALSERating found and access denied.
Any error valuesRating or service unavailable; look for ratings from other sources if possible.
pszRatingRating information for the document if it is available. (Note that the application can choose to ignore this parameter because RatingCheckUserAccess has already been called to generate the hres parameter).
lpvRatingDetailsToken that can be used in the RatingAccessDeniedDialog dialog box. This must be freed with a call to RatingFreeDetails.

phRatingObtainQuery
Address of a handle that can be used to cancel this operation. This parameter can be NULL if the handle is not needed.

A browser obtains the URL from the user and calls this function. Asynchronously, this function searches for a rating for the specified document. When the search ends, the function calls the application's callback function, on a different thread than the one that called RatingObtainQuery. While waiting for the callback to be called, browsers may choose to download the content but prevent the user from accessing it until the query is resolved.

If RatingObtainQuery returns an error, the application should assume the site is unrated by local and third-party ratings, and look for the HTML/HTTP-level ratings itself.


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