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!!




Reply With Quote