read and write values in registry pocket pc

srdva59

Active member
Joined
Feb 21, 2009
Messages
28
Programming Experience
Beginner
hi,
i looking for a way to read and write values in registry pocket pc using vb.net
so far i have this:


Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const REG_SZ = 1
Public Const DELETE = &H10000
Public Const READ_CONTROL = &H20000
Public Const SYNCHRONIZE = &H100000
Public Const STANDARD_RIGHTS_REQUIRED = &HF0000
Public Const STANDARD_RIGHTS_READ = READ_CONTROL
Public Const ERROR_SUCCESS = 0&
Public Const KEY_ENUMERATE_SUB_KEYS = &H8
Public Const KEY_NOTIFY = &H10
Public Const KEY_QUERY_VALUE = &H1
Public Const KEY_READ = ((STANDARD_RIGHTS_READ Or KEY_QUERY_VALUE Or KEY_ENUMERATE_SUB_KEYS Or KEY_NOTIFY) And (Not SYNCHRONIZE))
Public Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" _
(ByVal hKey As Long, _
ByVal lpSubKey As String, _
ByVal ulOptions As Long, _
ByVal samDesired As Long, _
ByVal phkResult As Long) As Long


Dim lValue As Long ' Variable for value
Dim sKey As String ' Key to open
Dim hKey As Long ' Handle to registry key

hKey = 0&
sKey = "SOFTWARE\Microsoft\Shell\AutoHide"

lValue = RegOpenKeyEx(HKEY_LOCAL_MACHINE, sKey, 0&, KEY_READ, hKey)
MsgBox(lValue)

but i receive a error in: advapi32.dll
this dll is not for pocket pc :(

there is other alternative that work in pocket pc?
thanks a lot for your help :)
 
Top Bottom