RegCreateKeyEx()不能在HKEY_LOCLA_MACHINE中添加项?
HKEY hKey;
TCHAR *Class=_T("");
DWORD dwDisposition ;
LONG ret;
ret=RegCreateKeyEx(HKEY_LOCAL_MACHINE,_T("SOFTWARE\\APPLE"),0,Class, REG_OPTION_NON_VOLATILE ,KEY_WRITE|KEY_READ,NULL,&hKey,&dwDisposition );
RegSetValue(hKey,NULL,REG_SZ,_T("123"),strlen(_T("123")));
RegCloseKey(hKey);
if(ret!=ERROR_SUCCESS)
{
MessageBox("ERROR!");
}