Widziałem tylko takie typu "RegOpenKeyA", ale ja chciałbym sprawdzić czy istnieje (w moim przypadku) HexadecimalKeyCurrentUser/Software/Microsoft/Windows/CurrentVersion/Run/AutoUSB (wartość REG_SZ)
Jak można to zrobić?
#########################
Wystarczą dwie funkcje:
bool CheckRegKeyExists(){
HKEY hk = HKEY_CURRENT_USER;
RegOpenKeyA(hk, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", &hk);
long res = RegQueryValueEx(hk,TEXT("AutoUSB"),NULL,NULL,NULL,NULL);
if(res == ERROR_FILE_NOT_FOUND)return false;
else return true;
}