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