Export (0) Print
Expand All

GetRoleText function

Retrieves the localized string that describes the object's role for the specified role value.

Syntax


UINT GetRoleText(
  _In_   DWORD dwRole,
  _Out_  LPTSTR lpszRole,
  _In_   UINT cchRoleMax
);

Parameters

dwRole [in]

Type: DWORD

One of the object role constants.

lpszRole [out]

Type: LPTSTR

Address of a buffer that receives the role text string. If this parameter is NULL, the function returns the role string's length, not including the null character.

cchRoleMax [in]

Type: UINT

The size of the buffer that is pointed to by the lpszRole parameter. For ANSI strings, this value is measured in bytes; for Unicode strings, it is measured in characters.

Return value

Type: UINT

If successful, and if lpszRole is non-NULL, the return value is the number of bytes (ANSI strings) or characters (Unicode strings) copied into the buffer, not including the terminating null character. If lpszRole is NULL, the return value represents the string's length, not including the null character.

If the string resource does not exist, or if the lpszRole parameter is not a valid pointer, the return value is zero (0). To get extended error information, call GetLastError.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Redistributable

Active Accessibility 1.3 RDK on Windows NT 4.0 with SP6 and later and Windows 95

Header

Oleacc.h

Library

Oleacc.lib

DLL

Oleacc.dll

Unicode and ANSI names

GetRoleTextW (Unicode) and GetRoleTextA (ANSI)

 

 

Community Additions

ADD
Show:
© 2014 Microsoft