Share via


RatingEnable function

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

 

Enables or disables ratings.

Syntax

HRESULT RatingEnable(
   HWND   hwndParent,
   LPCSTR pszUsername,
   BOOL   fEnable
);

Parameters

  • hwndParent
    A handle to a parent window used for any dialog boxes that might be presented.

  • pszUsername
    The address of a string that contains the name of the user requesting ratings to be enabled or disabled.

  • fEnable
    A BOOLvalue that specifies whether ratings should be enabled or disabled. TRUE indicates that ratings should be enabled, and FALSE indicates they should be disabled.

Return value

Returns one of the following values. 

Return code Description
S_OK

If fEnable was TRUE, ratings are enabled. Otherwise, ratings were disabled.

S_FALSE

Ratings are not successfully enabled or disabled.

E_ACCESSDENIED

Ratings are enabled, and the user specified a bad password.

HRESULT_FROM_WIN32(ERROR_BAD_USERNAME)

The specified user name was invalid.

 

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

RatingEnableW (Unicode) and RatingEnable (ANSI)