Results 1 to 2 of 2

Thread: enumKey

  1. #1

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258

    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!!
    balls deep in bad code

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    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
  •  



Click Here to Expand Forum to Full Width