Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Code for restoring the registry key using RegRestorekey

Status
Not open for further replies.

samkraju

Newbie level 5
Newbie level 5
Joined
Jul 20, 2004
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
58
registry functions1

Please give me the code to restore the registry key using "RegRestorekey" API function.
 

Re: registry functions1

here's the function declaration that you need :

Code:
Public Declare Function RegRestoreKey Lib "advapi32.dll" Alias "RegRestoreKeyA" (ByVal hKey As Long, ByVal lpFile As String, ByVal dwFlags As Long) As Long

Note:
  • To deal with win32API in visual basic, just fire up VB6 API viewer. If it's not available yet, you can activate it from Add-Ins|Add-In manager menu by selecting the VB 6 API Viewer and then checking the "Load Behaviour" section as needed. Then you need to load the API declarations from within the API Viewer by using the File|Load Text File and selecting the win32API text file. The rest is pretty much intuitive.
  • After declaring the function above in the beginning of the module, you can call the corresponding function anywhre inside the module.
  • Always keep in your mind that the VB6 API viewer is your companion when dealing with win32API directly in VB.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top