• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

Reading from the registry...

I need to get all the sub-entries from an entry in the registry.
Example:
In my "HKEY_CLASSES_ROOT\Word.RTF.8\shell", the sub-entries is:
-New
-open
-print
-printto
-VirusScan

But I need to get(find/extract) them using code. How do I do that?
0
Olli083097
Asked:
Olli083097
  • 3
  • 2
  • 2
1 Solution
 
ChizlCommented:
'to get registry keys use:
Declare Function RegEnumKeyEx Lib "advapi32.dll" _
    Alias "RegEnumKeyExA" (ByVal hKey As Long, _
    ByVal dwIndex As Long, ByVal lpName As String, _
    ByVal cbName As Long) As Long

'to get values use:
Declare Function RegEnumValue Lib "advapi32.dll" _
    Alias "RegEnumValueA" (ByVal hKey As Long, _
    ByVal dwIndex As Long, ByVal lpValueName As String, _
    lpcbValueName As Long, lpReserved As Long, _
    lpType As Long, lpData As Byte, lpcbData As Long) _
    As Long
0
 
ChizlCommented:
If you need more just ask
0
 
caraf_gCommented:
Olli, I asked a very similar question myself recently and had good answers from both Mirkwood and Waty: - here's the URL

http://www.experts-exchange.com/topics/comp/lang/visualbasic/Q.10108254

You'll find it most helpful.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Olli083097Author Commented:
caraf_g: Your code was just what I needed! If you want the points, the just answer the question...!
0
 
ChizlCommented:
So you wanted the application written for you not told what you can use..  Ok what ever floats your boat.  What he showed you is using the API I told ya to use.
0
 
Olli083097Author Commented:
Chizl: If it were possible to split the pionts on two persons I would have done it... But he gave me exactly what I needed + a lot more usefull code! Sorry...!
0
 
caraf_gCommented:
Olli, here's a token answer. Thanks. Sorry for the late reply I sadly had to go on holidays. O woe!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now