Dear All:
I want to delete following registry key in Windows XP:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\Vid_0733&Pid_0430
I use “SHDeleteKey” function to delete registry key, and it return
“ERROR_ACCESS_DENIED”.
I have tried to use “SetPrivilege” in MSDN library to set
SE_TAKE_OWNERSHIP_NAME
and use
RegOpenKeyEx(HKEY_LOCAL_MACHINE,
“SYSTEM\CurrentControlSet\Enum\USB\Vid_0733&Pid_0430”,
0, WRITE_OWNER,&hKey);
to get handle. However, it still failed.
How can I delete this registry key? Is there any sample code to do it?
Thanks for any replying!
Gordon