1 ///////////////////////////////////////////////////////////////////////////////
\r
3 // Module: WriteRegistry.h
\r
5 // Desc: Defines the interface for the WriteRegistry functions.
\r
7 // Copyright (c) 2003 Grant McDorman
\r
8 // This file is licensed using a BSD-type license:
\r
9 // This software is provided 'as-is', without any express or implied
\r
10 // warranty. In no event will the authors be held liable for any damages
\r
11 // arising from the use of this software.
\r
13 // Permission is granted to anyone to use this software for any purpose,
\r
14 // including commercial applications, and to alter it and redistribute it
\r
15 // freely, subject to the following restrictions:
\r
17 // 1. The origin of this software must not be misrepresented; you must not
\r
18 // claim that you wrote the original software. If you use this software
\r
19 // in a product, an acknowledgment in the product documentation would be
\r
20 // appreciated but is not required.
\r
21 // 2. Altered source versions must be plainly marked as such, and must not be
\r
22 // misrepresented as being the original software.
\r
23 // 3. This notice may not be removed or altered from any source distribution.
\r
25 ///////////////////////////////////////////////////////////////////////////////
\r
27 #ifndef _WRITEREGISTRY_H_
\r
28 #define _WRITEREGISTRY_H_
\r
30 #if _MSC_VER >= 1000
\r
32 #endif // _MSC_VER >= 1000
\r
35 //-----------------------------------------------------------------------------
\r
36 // WriteRegistryTreeToFile
\r
37 // Writes a registry tree to a file. Registry tree is fully specified by
\r
41 // key registry key name; must start with on of:
\r
42 // HKEY_CLASSES_ROOT or HKCR
\r
43 // HKEY_CURRENT_USER or HKCU
\r
44 // HKEY_LOCAL_MACHINE or HKLM
\r
45 // HKEY_CURRENT_CONFIG or HKCC
\r
46 // HKEY_USERS or HKU
\r
47 // HKEY_PERFORMANCE_DATA or HKPD
\r
48 // HKEY_DYN_DATA or HKDD
\r
49 // filename file to write to
\r
52 // Returns true if successful.
\r
55 // Translates call into WriteRegistryTreeToFile(section, subkey, filename).
\r
57 bool WriteRegistryTreeToFile(const char *key, const char *filename);
\r
60 //-----------------------------------------------------------------------------
\r
61 // WriteRegistryTreeToFile
\r
62 // Writes a registry tree to a file. Registry tree is relative to given key,
\r
63 // which must be one of the root keys.
\r
66 // section registry section; must be one of
\r
67 // HKEY_CLASSES_ROOT
\r
68 // HKEY_CURRENT_USER
\r
69 // HKEY_LOCAL_MACHINE
\r
70 // HKEY_CURRENT_CONFIG
\r
72 // HKEY_PERFORMANCE_DATA
\r
74 // subkey subkey relative to section
\r
75 // filename file to write to
\r
78 // Returns true if successful.
\r
83 bool WriteRegistryTreeToFile(HKEY section, const char *subkey, const char *filename);
\r