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,NU LL,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.
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----