N
news.ticino.com
Hi all,
I would like my program to enumerate all the subkeys of HKEY_LOCAL_MACHINE.
source:
char buffer[255]="";
int retval=22;
FILETIME ftLastWriteTime;
DWORD max = 255;
int i;
retval=RegOpenKeyEx(HKEY_LOCAL_MACHINE,NULL,0,KEY_READ,&rtch);
for (i=0,retval=ERROR_SUCCESS;retval == ERROR_SUCCESS || retval
==ERROR_MORE_DATA;i++) {
retval=RegEnumKeyEx(rtch,i,buffer,(LPDWORD)&max,NULL,NULL,NULL,&ftLastWriteT
ime);
printf("%s\n",buffer);
}
the program only enumerates the first 2 subkeys of HKEY_LOCAL_MACHINE but
there are 5 subkeys.
there must be a bug somewhere, unfortunately I can't find it.
Can anyone help me?
any help is appreciated.
I would like my program to enumerate all the subkeys of HKEY_LOCAL_MACHINE.
source:
char buffer[255]="";
int retval=22;
FILETIME ftLastWriteTime;
DWORD max = 255;
int i;
retval=RegOpenKeyEx(HKEY_LOCAL_MACHINE,NULL,0,KEY_READ,&rtch);
for (i=0,retval=ERROR_SUCCESS;retval == ERROR_SUCCESS || retval
==ERROR_MORE_DATA;i++) {
retval=RegEnumKeyEx(rtch,i,buffer,(LPDWORD)&max,NULL,NULL,NULL,&ftLastWriteT
ime);
printf("%s\n",buffer);
}
the program only enumerates the first 2 subkeys of HKEY_LOCAL_MACHINE but
there are 5 subkeys.
there must be a bug somewhere, unfortunately I can't find it.
Can anyone help me?
any help is appreciated.