|
-
Jul 10th, 2003, 01:53 AM
#1
Thread Starter
Member
Windows Registry Reading
Hello friends,
I want to read all subkeys under a particular key.
I got the function and tried. The codes are : -
// for enumerating the subkeys
int i = 0;
char subKeyName[SIZE] ;
memset(subKeyName, 0, SIZE);
DWORD Buffsize = SIZE;
PFILETIME time = NULL;
cout<<subKeyName;
do
{
if(RegEnumKeyEx(HKEY_CURRENT_USER, i, subKeyName, &Buffsize, 0, NULL, NULL, time) != ERROR_NO_MORE_ITEMS)
{
cout<<subKeyName<<"\n";
i++;
}
else
break;
}while(1);
The thing is it shows all subkey names but after showing first 3 - 4 names corectly the subsequent names are shown of having only 4-5 characters . e.g If subkey is Console then it is shown as Conso.
Any help ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|