OleAccGetRoleText Method
Retrieves the localized string that describes the object's role for the specified role value.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("OleAcc.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetRoleText (
role As UInteger,
<OutAttribute> roleText As StringBuilder,
roleTextMax As UInteger
) As UInteger
Dim role As UInteger
Dim roleText As StringBuilder
Dim roleTextMax As UInteger
Dim returnValue As UInteger
returnValue = OleAcc.GetRoleText(role,
roleText, roleTextMax)
public:
[DllImportAttribute(L"OleAcc.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetRoleText(
unsigned int role,
[OutAttribute] StringBuilder^ roleText,
unsigned int roleTextMax
)
[<DllImportAttribute("OleAcc.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetRoleText :
role : uint32 *
roleText : StringBuilder byref *
roleTextMax : uint32 -> uint32
No code example is currently available or this language may not be supported.
- 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.
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.