Private Declare Function SHDeleteKey Lib "Shlwapi" Alias "SHDeleteKeyA" ( _
ByVal hKey As Long, ByVal lpSubKey As String) As Long
hCurKey = HKEY_LOCAL_MACHINE 'this is the hex value: &H80000002
strLastKey ="SOFTWARE\myCompany\MyProgram\MRU\file1"
if SHDeleteKey(hCurKey, strLastKey) <> 0 then
msgbox "Delete of Registry Key Failed!"
endif
'=====================
SHDeleteKey returns a 2. I can manually delete the key using regedit. Any ideas.
RegDeleteKey also does the same thing.....
Troy Williams B.Eng.
fenris@hotmail.com
ByVal hKey As Long, ByVal lpSubKey As String) As Long
hCurKey = HKEY_LOCAL_MACHINE 'this is the hex value: &H80000002
strLastKey ="SOFTWARE\myCompany\MyProgram\MRU\file1"
if SHDeleteKey(hCurKey, strLastKey) <> 0 then
msgbox "Delete of Registry Key Failed!"
endif
'=====================
SHDeleteKey returns a 2. I can manually delete the key using regedit. Any ideas.
RegDeleteKey also does the same thing.....
Troy Williams B.Eng.
fenris@hotmail.com