OleAccGetRoleText Method

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

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("OleAcc.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint GetRoleText(
	uint role,
	StringBuilder roleText,
	uint roleTextMax
)

Parameters

role  UInt32
One of the object role constants.
roleText  StringBuilder
Address of a buffer that receives the role text string.

If this parameter is , the function returns the role string's length, not including the null character.

roleTextMax  UInt32
The size of the buffer that is pointed to by the roleText parameter.

For ANSI strings, this value is measured in bytes; for Unicode strings, it is measured in characters.

Return Value

UInt32
If successful, and if roleText is non-, 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 roleText is , the return value represents the string's length, not including the null character.

If the string resource does not exist, or if the roleText parameter is not a valid pointer, the return value is zero (0).

To get extended error information, call GetLastWin32Error.

Remarks

See Also