Suppose we setup a structure for a physical monitor thus with the well known:
Code: Select all
OffsetDWORD := 4
byteSize := A_IsUnicode ? 2 : 1
Physical_Monitor_size_single:= OffsetDWORD + byteSize * 128
VarSetCapacity(Physical_Monitor, Physical_Monitor_size_single, 0)
But now we wish to grab the actual Physical_Monitor_size_single string which equates to something like
Code: Select all
buf := NumGet(Physical_Monitor, OffsetDWORD, "Str") ; we wish
;The longer version of above is
Physical_Monitor := ""
Loop
{
buf := NumGet(Physical_Monitor, OffsetDWORD + byteSize * A_Index, "Char")
Physical_Monitor .= buf
} Until buf = "\0"
Thanks.