Table of Contents

Method TrySetValue

Namespace
MaaFramework.Binding.Buffers
Assembly
MaaFramework.Binding.Native.dll

TrySetValue(string, bool)

Sets the string to a MaaStringBuffer.

public bool TrySetValue(string str, bool useEx = true)

Parameters

str string

The string.

useEx bool

Uses MaaSetStringEx() if true; otherwise, Uses MaaSetString().

Returns

bool

true if the System.String was set successfully; otherwise, false.

TrySetValue(nint, string, bool)

Sets the string to a MaaStringBuffer.

public static bool TrySetValue(nint handle, string str, bool useEx = true)

Parameters

handle nint

The MaaStringBufferHandle.

str string

The string.

useEx bool

Uses MaaSetStringEx() if true; otherwise, Uses MaaSetString().

Returns

bool

true if the System.String was set successfully; otherwise, false.

TrySetValue(string, bool, Func<nint, bool>)

Sets the string to a function using MaaRectBuffer.

public static bool TrySetValue(string str, bool useEx, Func<nint, bool> readBuffer)

Parameters

str string

The string.

useEx bool

Uses MaaSetStringEx() if true; otherwise, Uses MaaSetString().

readBuffer Func<nint, bool>

The function used to read the string from the buffer.

Returns

bool

The System.String.