-
I'm trying to teach myself VB but are stuck on this one thing which I can't get right. I would like to change the values of keys in the registry, which not necessarily has anything to do with the application I'm writing. From what I have read one needs to make use of advapi32.dll but I'm not sure how to do it.
I declare the function in "Option Explicit" as follows:
Declare Function RegReplaceKey Lib "C:\WINDOWS\System32\advapi32.dll" Alias "RegReplaceKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal lpNewFile As String, ByVal lpOldFile As String) As Long
When I use the function in the code, it does not work. :rolleyes:
Can anybody point me in the right direction please.
I refuse to tip toe through life only to arrive safely at death
-
Experienced User
This M$ site should point you there:
http://msdn.microsoft.com/en-us/vbasic/default.aspx
Else: registry-specific conversation here: http://www.computerhope.com/forum/index.php?topic=1691.0
Mankind hates what it fears, and fears what it cannot understand.
Therefore, hatred is a by-product of ignorance!
-
Polkadot you're the man. Thanks a lot, computerhope.com has a wealth of information and did the trick for me. :)
-
Experienced User
Sometimes Computerhope is way out of date (I think they still concider XP a new OS). But it is often a good place to do a search. I just did a search on "Visual Basic" and it came up with (among other things) that thread on registry values. Glad it worked for you.
Similar Threads
-
By allwin.m007 in forum General Forum
Replies: 7
Last Post: 12-03-2011, 08:54 PM
-
By Murphy in forum Freebies!
Replies: 1
Last Post: 07-20-2010, 04:05 PM
-
By edwinonia in forum Network
Replies: 3
Last Post: 03-22-2010, 05:06 AM
-
By azharsairon in forum General Forum
Replies: 2
Last Post: 09-13-2009, 05:38 AM
All times are GMT +8. The time now is 05:09 AM.