OleAccGetStateText Method

Retrieves a localized string that describes an object's state for a single predefined state bit flag.

Because state values are a combination of one or more bit flags, clients call this function more than once to retrieve all the state strings.

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 GetStateText(
	uint stateBit,
	StringBuilder stateText,
	uint stateTextMax
)

Parameters

stateBit  UInt32
One of the object state constants.
stateText  StringBuilder
Address of a buffer that receives the state text string.

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

stateTextMax  UInt32
The size of the buffer pointed to by the stateText parameter.

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

Return Value

UInt32
If successful, and stateText is non-, the return value is the number of bytes (ANSI version) or characters (Unicode version) copied into the buffer, not including the null-terminated character.

If stateText is , then the return value represents the string's length, not including the null character.

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

To get extended error information, call GetLastWin32Error.

Remarks

See Also