CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2008
    Posts
    74

    read and write values in registry pocket pc using vb.net

    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

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: read and write values in registry pocket pc using vb.net


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured