1 Replies - 1022 Views - Last Post: 18 November 2010 - 10:09 AM Rate Topic: -----

#1 dellthinker  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 15-October 10

Regkey assistance

Posted 18 November 2010 - 12:57 AM

I have a bool function that returns true when RegCreateKeyEx returns ERROR_SUCCESS, the function works but it's creating a key in the wrong place. The code...

bool SetRegFunc(){
     HKEY hKey;
     DWORD lRes = RegOpenKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\HomeBase",0,KEY_WRITE,&hKey);
     if(lRes != ERROR_SUCCESS){
     DWORD dwDisposition;
     lRes = RegCreateKeyEx(HKEY_LOCAL_MACHINE,"SOFTWARE\\HomeBase",0,0,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,0,&hKey,&dwDisposition);return true;}
     else{cout << "Registry key already exists " << endl; return true;}
}



Is there any reason why the key is being created in HKEY_LOCAL_MACHINE\SOFTWARE\Wow64Node instead of HKEY_LOCAL_MACHINE\SOFTWARE where I want it to be? Thanx in advance.

P.S. Yes this is for Windows.

Is This A Good Question/Topic? 0
  • +

Replies To: Regkey assistance

#2 Salem_c  Icon User is offline

  • void main'ers are DOOMED
  • member icon

Reputation: 1689
  • View blog
  • Posts: 3,209
  • Joined: 30-May 10

Re: Regkey assistance

Posted 18 November 2010 - 10:09 AM

Did you google "wow64node"?

I did, and look what I found.
http://www.windowsit...ry-subkey-.aspx
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1