CRegKey Create() not working
Hi. I'm having issues with the following code. It's used to fix weird colors with certain games on Vista / 7. It seems to work for almost everyone. But, I found an exception today.
Code:
x = rk.Create( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\DirectDraw\\Compatibility\\Duke Nukem 3D");
I have verified that UAC is disabled. The program and user have full privileges to those keys. Create() returns ERROR_SUCCESS. But, the key never gets created. Interestingly, there is another spot that the key has to be created in on 64-bit systems:
Code:
x = rk.Create( HKEY_LOCAL_MACHINE, "Software\\Wow6432Node\\Microsoft\\DirectDraw\\Compatibility\\Duke Nukem 3D");
This works fine. Why would the second one work, but not the first?
Also, if I do these from a reg file, they both work...
Re: CRegKey Create() not working
Ok. I do see one difference in the keys. The Wow6432Node and down don't have special permissions checked. The first one does have it checked. But, when I make the permissions the same, still can't create the first key. Do I need to specify another type of security flag to create the first one?
Re: CRegKey Create() not working
Hmmm, it appears the first one actually modifies the location of the 2nd one? Is this by design for 64-bit systems? I guess it makes me wonder why there would be 2 Directdraw Compatibility folders if the program only modifies the second one?
Re: CRegKey Create() not working
Re: CRegKey Create() not working
In case you run 32-bit application in 64-bit Windows, the 32-bit registry hive, which is WoW6432Node, appears to be in use.
Re: CRegKey Create() not working