Function Reference


_WinAPI_StringLenW

Calculates the size of wide string

#include <WinAPIMisc.au3>
_WinAPI_StringLenW ( Const ByRef $tString )

Parameters

$tString String structure to process

Return Value

Success: String length in characters
Failure: 0

Remarks

Returned length does not include terminating null character.

Related

_WinAPI_StringLenA

See Also

Search lstrlenW in MSDN Library.

Example

#include <MsgBoxConstants.au3>
#include <WinAPIMisc.au3>

_Example()

Func _Example()
        ; Make the string buffer. It's "wchar" type structure. Choosing the size of 64 characters.
        Local $tStringBuffer = DllStructCreate("wchar Data[64]")
        ; Fill it with some data
        DllStructSetData($tStringBuffer, "Data", "Gongoozle")

        MsgBox($MB_SYSTEMMODAL, "_WinAPI_StringLenW", "Length of a string inside the buffer is " & _WinAPI_StringLenW($tStringBuffer) & " characters.")
EndFunc   ;==>_Example