是不是有个regfind什么的函数?如果能给出源代码更好

解决方案 »

  1.   

    首先调用 RegQueryInfoKey(hKey,NULL, NULL,NULL,
    &dwIndex,
    NULL,NULL,NULL, NULL,NULL,NULL, NULL);
    dwIndex中就是它的键的个数然后一个一个的找下去就是了。
      

  2.   

    RegEnumKeyEx
    The RegEnumKeyEx function enumerates subkeys of the specified open registry key. The function retrieves information about one subkey each time it is called. Unlike the RegEnumKey function, RegEnumKeyEx retrieves the class name of the subkey and the time it was last modified. LONG RegEnumKeyEx(
      HKEY hKey,                  // handle to key to enumerate
      DWORD dwIndex,              // subkey index
      LPTSTR lpName,              // subkey name
      LPDWORD lpcName,            // size of subkey buffer
      LPDWORD lpReserved,         // reserved
      LPTSTR lpClass,             // class string buffer
      LPDWORD lpcClass,           // size of class string buffer
      PFILETIME lpftLastWriteTime // last write time
    );
      

  3.   

    如果要包含子键,那就没有
    不包含子键的话,就是RegEnumKeyEx
      

  4.   

    两个都要用,RegQueryInfoKey()得到一共有多少个键值,RegEnumKeyEx()得到每个索引值的键值是什么。