i'm making a simple program to retvive some registery values of internet explorer but i'm stuck with the regenumkeyex function,in the code below the program should retvive the subkeys under internet explorer registery key (which is 21 keys) and add it to a combo box so the user choose which subkey he want to enter to change values in it but when i run the program only this values is added to the combo box
1-default html editor
so can you please tell me what is wrong with this code ? (why the "desktop" entry is cloned and why dosen't it retvive all the 21 subkeys)/
btw...i have some doubts about the second paramter in regenumkeyex function (the subkey index)
if (RegOpenKeyEx(HKEY_CURRENT_USER,"software\\microsoft\\internet explorer",0,KEY_ALL_ACCESS,&iesub)==ERROR_SUCCESS)
You doing the "m_combo.AddString (subkeys);" regardless of whether the "retsubkeys=RegEnumKeyEx(iesub,i,subkeys,&subsize, NULL,NULL,NULL,NULL );" actually succeeded or not, so that's why your getting an entry twice. Either use a while loop, or put another check in there before adding to the combo box.