Hello all,
This little routine will retrieve the Owner name registered in the Pocket PC in
Settings/Owner Information. Requires the Registry library.
This little routine will retrieve the Owner name registered in the Pocket PC in
Settings/Owner Information. Requires the Registry library.
B4X:
Sub Globals
Dim buff(0) As Byte
End Sub
Sub App_Start
Reg.New1 'Registry object is named 'reg'
End Sub
Sub GetOwnerName
If cPPC = false Then Return 'this is not for the desktop
Dim m
Reg.RootKey(Reg.rtCurrentUser)
buff()=Reg.GetValue("ControlPanel\Owner\","Owner")
For i = 0 To ArrayLen(buff()) -1 Step 2
If buff(i)=0 Then Exit 'Chr(0) separates the name from other owner entries
m = m & Chr(buff(i))
Next
Return m
End Sub