Ok...I am trying to make an app to add a few keys to the registry...(as well as change some of the strings...but I'll ask that later)
I was looking at the registry code on VBWorld...
ok...there it is...now I get a type mismatchCode:Public Sub CreateKey(hKey As Long, strPath As String) Dim hCurKey As Long Dim lRegResult As Long lRegResult = RegCreateKey(hKey, strPath, hCurKey) If lRegResult <> ERROR_SUCCESS Then 'there is a problem End If lRegResult = RegCloseKey(hCurKey) End Sub
how do I call this?
I tried this....
CreateKey "WARNING", "HKEY_LOCAL_MACHINE/SOFTWARE/APPNAME/"
Nope...Type mismatch! How do I get this to work?
Help! Thanks





Reply With Quote