B
Birdling
Guys:
I am developing an .net application on Pocket PC 2003. Need to read the
registry keys, however, code did not work. Use Owner as an example:
Public Declare Function RegOpenKeyEx Lib "Coredll" Alias
"RegOpenKeyExW" (ByVal hKey As Integer, ByVal lpSubKey As _
String, ByVal ulOptions As Integer, ByVal samDesired As
Integer, ByVal phkResult As Integer) As Integer
Private Const ERROR_SUCCESS As Integer = &O0
Private Const HKEY_CLASSES_ROOT As Integer = &H80000000
Private Const HKEY_CURRENT_USER As Integer = &H80000001
Private Const HKEY_LOCAL_MACHINE As Integer = &H80000002
Private Const KEY_READ As Integer = &H20019
lngResult = RegOpenKeyEx(HKEY_CURRENT_USER, "\ControlPanel\Owner", 0,
KEY_READ, hlngSubKey)
It always return a 87, owner not set. Swear to god it was set. And
hlngSubKey is always 0. For the lpSubKey, I also tried Char() instead
of String, same result.
Similar code worked fine on Pocket PC 2002 (using eVB). Please help.
Feel free to email me.
Thanks a lot
I am developing an .net application on Pocket PC 2003. Need to read the
registry keys, however, code did not work. Use Owner as an example:
Public Declare Function RegOpenKeyEx Lib "Coredll" Alias
"RegOpenKeyExW" (ByVal hKey As Integer, ByVal lpSubKey As _
String, ByVal ulOptions As Integer, ByVal samDesired As
Integer, ByVal phkResult As Integer) As Integer
Private Const ERROR_SUCCESS As Integer = &O0
Private Const HKEY_CLASSES_ROOT As Integer = &H80000000
Private Const HKEY_CURRENT_USER As Integer = &H80000001
Private Const HKEY_LOCAL_MACHINE As Integer = &H80000002
Private Const KEY_READ As Integer = &H20019
lngResult = RegOpenKeyEx(HKEY_CURRENT_USER, "\ControlPanel\Owner", 0,
KEY_READ, hlngSubKey)
It always return a 87, owner not set. Swear to god it was set. And
hlngSubKey is always 0. For the lpSubKey, I also tried Char() instead
of String, same result.
Similar code worked fine on Pocket PC 2002 (using eVB). Please help.
Feel free to email me.
Thanks a lot