|
-
Sep 29th, 2006, 07:43 PM
#1
Thread Starter
Hyperactive Member
enumKey
I'm having trouble enumerating a key's subkeys.
Code:
DWORD iIndex = 0;
LPTSTR pszName = "";
LPDWORD pnNameLength = 0;
FILETIME* pftLastWriteTime = NULL;
CRegKey regEnum;
regEnum.Open(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Video", KEY_READ);
for(iIndex = 0; TRUE; iIndex++)
{
regEnum.EnumKey(iIndex, pszName, pnNameLength, pftLastWriteTime);
int i = 0;
}
for each loop, pnNameLength is undefined value, ans pszName = "". Why? What am I doing wrong. PS: this is impossible to find an example for on the web!!
-
Sep 29th, 2006, 08:50 PM
#2
Re: enumKey
Where does this CRegKey class come from?
My advice: search this board for the registry class I wrote ages ago and use it instead. It's got to be better.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|