Solved

Reading from the registry...

Posted on 1998-12-16
7
122 Views
Last Modified: 2010-07-27
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
Comment
Question by:Olli083097
  • 3
  • 2
  • 2
7 Comments
 
LVL 4

Expert Comment

by:Chizl
ID: 1450712
'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
 
LVL 4

Expert Comment

by:Chizl
ID: 1450713
If you need more just ask
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 1450714
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Olli083097
ID: 1450715
caraf_g: Your code was just what I needed! If you want the points, the just answer the question...!
0
 
LVL 4

Expert Comment

by:Chizl
ID: 1450716
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
 

Author Comment

by:Olli083097
ID: 1450717
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
 
LVL 10

Accepted Solution

by:
caraf_g earned 50 total points
ID: 1450718
Olli, here's a token answer. Thanks. Sorry for the late reply I sadly had to go on holidays. O woe!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mysql vs Oracle 10 120
MsgBox 2 36
message box in access 4 33
VBA: Personal Macro Retain/Highlight/Remove values in a selected column 4 21
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now