Loading
RegDBKeyExist not working
I have a registry entry as below

 

RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);

 

szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\S-1-5-18\\Products\\00004109610090400000000000F01FEC";

 

nResult = RegDBKeyExist(szKey);

 

In my registry, the above key exists. But the value returned is -1. If I search for key exists till 'products', it returns 1 properly. The product key is spelled right, because I copied from registry. What could be the problem?

 

Please leave your inputs

  • I found the problem.

     

    Actually I was searching for a 64 bit key in 32 bit path. That's why the search results shows wrong result.

Loading
RegDBKeyExist not working