OSDN Git Service

add crashrpt
[tortoisegit/TortoiseGitJp.git] / src / crashrpt / WriteRegistry.h
diff --git a/src/crashrpt/WriteRegistry.h b/src/crashrpt/WriteRegistry.h
new file mode 100644 (file)
index 0000000..7ed3203
--- /dev/null
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////////\r
+//\r
+//  Module: WriteRegistry.h\r
+//\r
+//    Desc: Defines the interface for the WriteRegistry functions.\r
+//\r
+// Copyright (c) 2003 Grant McDorman\r
+// This file is licensed using a BSD-type license:\r
+//  This software is provided 'as-is', without any express or implied\r
+//  warranty.  In no event will the authors be held liable for any damages\r
+//  arising from the use of this software.\r
+//\r
+//  Permission is granted to anyone to use this software for any purpose,\r
+//  including commercial applications, and to alter it and redistribute it\r
+//  freely, subject to the following restrictions:\r
+//\r
+//  1. The origin of this software must not be misrepresented; you must not\r
+//     claim that you wrote the original software. If you use this software\r
+//     in a product, an acknowledgment in the product documentation would be\r
+//     appreciated but is not required.\r
+//  2. Altered source versions must be plainly marked as such, and must not be\r
+//     misrepresented as being the original software.\r
+//  3. This notice may not be removed or altered from any source distribution.\r
+//\r
+///////////////////////////////////////////////////////////////////////////////\r
+\r
+#ifndef _WRITEREGISTRY_H_\r
+#define _WRITEREGISTRY_H_\r
+\r
+#if _MSC_VER >= 1000\r
+#pragma once\r
+#endif // _MSC_VER >= 1000\r
+\r
+\r
+//-----------------------------------------------------------------------------\r
+// WriteRegistryTreeToFile\r
+//    Writes a registry tree to a file. Registry tree is fully specified by\r
+//    the string.\r
+//\r
+// Parameters\r
+//    key     registry key name; must start with on of:\r
+//                HKEY_CLASSES_ROOT or HKCR\r
+//                HKEY_CURRENT_USER or HKCU\r
+//                HKEY_LOCAL_MACHINE or HKLM\r
+//                HKEY_CURRENT_CONFIG or HKCC\r
+//                HKEY_USERS or HKU\r
+//                HKEY_PERFORMANCE_DATA or HKPD\r
+//                HKEY_DYN_DATA or HKDD\r
+//   filename file to write to\r
+//\r
+// Return Values\r
+//    Returns true if successful.\r
+//\r
+// Remarks\r
+//    Translates call into WriteRegistryTreeToFile(section, subkey, filename).\r
+//\r
+bool WriteRegistryTreeToFile(const char *key, const char *filename);\r
+\r
+\r
+//-----------------------------------------------------------------------------\r
+// WriteRegistryTreeToFile\r
+//    Writes a registry tree to a file. Registry tree is relative to given key,\r
+//    which must be one of the root keys.\r
+//\r
+// Parameters\r
+//    section registry section; must be one of\r
+//                HKEY_CLASSES_ROOT\r
+//                HKEY_CURRENT_USER\r
+//                HKEY_LOCAL_MACHINE\r
+//                HKEY_CURRENT_CONFIG\r
+//                HKEY_USERS\r
+//                HKEY_PERFORMANCE_DATA\r
+//                HKEY_DYN_DATA\r
+//   subkey   subkey relative to section\r
+//   filename file to write to\r
+//\r
+// Return Values\r
+//    Returns true if successful.\r
+//\r
+// Remarks\r
+//    none\r
+//\r
+bool WriteRegistryTreeToFile(HKEY section, const char *subkey, const char *filename);\r
+  \r
+\r
+#endif\r