can anyone point what is wrong with my RegQuerryEx() function? Altough it return 0 :|
char buff[3] = {0};
DWORD size = sizeof(buff);
DWORD type;
if(RegOpenKeyEx(HKEY_CURRENT_USER , "Software\\vBx" , 0 , KEY_QUERY_VALUE , &hkey) == ERROR_SUCCESS)
{
if(RegQueryValueEx(hkey , "log" , NULL , &type , (LPBYTE)buff , &size) == ERROR_SUCCESS)
{
if(strncmp(buff , "vBx" , 3))
{
cout << "i was here";
}
}else
cout << GetLastError() << endl;
}
it never reaches the if() part