CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Posts
    440

    Read from Registry

    Hi,

    I need to export from registry to text file a whole section programmatically. Can anyone help ?

    Valery Iskarov Nikolov
    Software Dynamics

  2. #2
    Join Date
    Sep 2001
    Location
    IL, USA
    Posts
    1,090

    Re: Read from Registry

    Start by declaringrivate Declare Function RegCloseKey Lib "advapi32.dll" (byval hKey as Long) as Long
    private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (byval hKey as Long, byval lpSubKey as string, phkResult as Long) as Long
    private Declare Function RegEnumKeyEx Lib "advapi32.dll" Alias "RegEnumKeyExA" (byval hKey as Long, byval dwIndex as Long, byval lpName as string, lpcbName as Long, byval lpReserved as Long, byval lpClass as string, lpcbClass as Long, lpftLastWriteTime as Any) as Long
    private Declare Function RegEnumValue Lib "advapi32.dll" Alias "RegEnumValueA" (byval hKey as Long, byval dwIndex as Long, byval lpValueName as string, lpcbValueName as Long, byval lpReserved as Long, lpType as Long, lpData as Byte, lpcbData as Long) as Long

    Then iterate by using a combination of RegEnumKeyEx and RegEnumValue.


  3. #3
    Join Date
    Feb 2000
    Posts
    440

    Re: Read from Registry


    Thanks I think this would do it.

    Valery Iskarov Nikolov
    Software Dynamics

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