Remove 'Return m' if you want the msgbox to appear, and the TextBox be assigned.
Return leaves the sub immediately.
1)But can u just Dim m like that? dont u have to do it in the Globals area and define how many elements the array has in it?
also
2) you've Dim-ed Buff as (0) bytes long - THATS NO LENGTH? wont u need it long enough to store the name?? {Or does Dim buff(0) mean it can be any length?}
1) Dim m is equivalent to m = "".
It is absolutely legal to use it. The result will be a local variable.
If it were declared under Sub Globals then it would have been a global variable.
See this topic for more information:
http://www.b4x.com/help/variables.html
2) You can declare an empty array.
Later you will need to redimension it with another dim or (in this case) call a function that returns an array.
buff() =Reg.GetValue("ControlPanel\Owner\","Owner")
Reg.GetValue returns an array of bytes.
Using ArrayLen you can find the size of the array returned.