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.
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 GetStateText(
uint stateBit,
StringBuilder stateText,
uint stateTextMax
)
<DllImportAttribute("OleAcc.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function GetStateText (
stateBit As UInteger,
<OutAttribute> stateText As StringBuilder,
stateTextMax As UInteger
) As UInteger
Dim stateBit As UInteger
Dim stateText As StringBuilder
Dim stateTextMax As UInteger
Dim returnValue As UInteger
returnValue = OleAcc.GetStateText(stateBit,
stateText, stateTextMax)
public:
[DllImportAttribute(L"OleAcc.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned int GetStateText(
unsigned int stateBit,
[OutAttribute] StringBuilder^ stateText,
unsigned int stateTextMax
)
[<DllImportAttribute("OleAcc.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member GetStateText :
stateBit : uint32 *
stateText : StringBuilder byref *
stateTextMax : uint32 -> uint32
No code example is currently available or this language may not be supported.
- 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
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.