File: Poco.Util.WinRegistryKey.html

package info (click to toggle)
poco-doc 1.3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,096 kB
  • sloc: makefile: 9
file content (193 lines) | stat: -rw-r--r-- 12,471 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Util::WinRegistryKey</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Util.html" class="namespace">Poco::Util</a></h1>
<h1 class="symbol">class WinRegistryKey</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Util<br />
<b>Package:</b> Windows<br />
<b>Header:</b> Poco/Util/WinRegistryKey.h</p>
<h2>Description</h2>
<div class="description">
<p>This class implements a convenient interface to the Windows Registry. </p>
<p>This class is only available on Windows platforms. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Util.WinRegistryKey.html#17383" title="Poco::Util::WinRegistryKey::close()">close</a>, <a href="Poco.Util.WinRegistryKey.html#17371" title="Poco::Util::WinRegistryKey::deleteKey()">deleteKey</a>, <a href="Poco.Util.WinRegistryKey.html#17369" title="Poco::Util::WinRegistryKey::deleteValue()">deleteValue</a>, <a href="Poco.Util.WinRegistryKey.html#17372" title="Poco::Util::WinRegistryKey::exists()">exists</a>, <a href="Poco.Util.WinRegistryKey.html#17367" title="Poco::Util::WinRegistryKey::getInt()">getInt</a>, <a href="Poco.Util.WinRegistryKey.html#17357" title="Poco::Util::WinRegistryKey::getString()">getString</a>, <a href="Poco.Util.WinRegistryKey.html#17362" title="Poco::Util::WinRegistryKey::getStringExpand()">getStringExpand</a>, <a href="Poco.Util.WinRegistryKey.html#17389" title="Poco::Util::WinRegistryKey::handleFor()">handleFor</a>, <a href="Poco.Util.WinRegistryKey.html#17387" title="Poco::Util::WinRegistryKey::handleSetError()">handleSetError</a>, <a href="Poco.Util.WinRegistryKey.html#17381" title="Poco::Util::WinRegistryKey::isReadOnly()">isReadOnly</a>, <a href="Poco.Util.WinRegistryKey.html#17384" title="Poco::Util::WinRegistryKey::key()">key</a>, <a href="Poco.Util.WinRegistryKey.html#17382" title="Poco::Util::WinRegistryKey::open()">open</a>, <a href="Poco.Util.WinRegistryKey.html#17364" title="Poco::Util::WinRegistryKey::setInt()">setInt</a>, <a href="Poco.Util.WinRegistryKey.html#17354" title="Poco::Util::WinRegistryKey::setString()">setString</a>, <a href="Poco.Util.WinRegistryKey.html#17359" title="Poco::Util::WinRegistryKey::setStringExpand()">setStringExpand</a>, <a href="Poco.Util.WinRegistryKey.html#17377" title="Poco::Util::WinRegistryKey::subKeys()">subKeys</a>, <a href="Poco.Util.WinRegistryKey.html#17373" title="Poco::Util::WinRegistryKey::type()">type</a>, <a href="Poco.Util.WinRegistryKey.html#17379" title="Poco::Util::WinRegistryKey::values()">values</a></p>
<h2>Types</h2>
<h3><a name="17339">Keys</a></h3>
<p class="decl">typedef std::vector &lt; std::string &gt; <a href="Poco.Util.WinRegistryKey.html#17339" title="Poco::Util::WinRegistryKey::Keys">Keys</a>;</p>
<div class="description">
<p></p>
</div>
<h3><a name="17340">Values</a></h3>
<p class="decl">typedef std::vector &lt; std::string &gt; <a href="Poco.Util.WinRegistryKey.html#17340" title="Poco::Util::WinRegistryKey::Values">Values</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Enumerations</h2>
<h3><a name="17341">Type</a></h3>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17342">REGT_NONE</a> = 0</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17343">REGT_STRING</a> = 1</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17344">REGT_STRING_EXPAND</a> = 2</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="17345">REGT_DWORD</a> = 4</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="17346">WinRegistryKey</a></h3>
<p class="decl"><a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; key,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool readOnly = false<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>. </p>
<p>The key must start with one of the root key names like HKEY_CLASSES_ROOT, e.g. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. </p>
<p>If readOnly is true, then only read access to the registry is available and any attempt to write to the registry will result in an exception. </p>
</div>
<h3><a name="17349">WinRegistryKey</a></h3>
<p class="decl"><a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;HKEY hRootKey,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; subKey,<br />&nbsp;&nbsp;&nbsp;&nbsp;bool readOnly = false<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>. </p>
<p>If readOnly is true, then only read access to the registry is available and any attempt to write to the registry will result in an exception. </p>
</div>
<h2>Destructor</h2>
<h3><a name="17353">~WinRegistryKey</a></h3>
<p class="decl">~<a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Util.WinRegistryKey.html" title="class Poco::Util::WinRegistryKey">WinRegistryKey</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="17371">deleteKey</a></h3>
<p class="decl">void deleteKey();</p>
<div class="description">
<p>Recursively deletes the key and all subkeys. </p>
</div>
<h3><a name="17369">deleteValue</a></h3>
<p class="decl">void deleteValue(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Deletes the value with the given name. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the value does not exist. </p>
</div>
<h3><a name="17372">exists</a></h3>
<p class="decl">bool exists();</p>
<div class="description">
<p>Returns true if and only if the key exists. </p>
</div>
<h3><a name="17375">exists</a></h3>
<p class="decl">bool exists(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Returns true if and only if the given value exists under that key. </p>
</div>
<h3><a name="17367">getInt</a></h3>
<p class="decl">int getInt(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Returns the numeric value (REG_DWORD) with the given name. An empty name denotes the default value. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the value does not exist. </p>
</div>
<h3><a name="17357">getString</a></h3>
<p class="decl">std::string getString(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Returns the string value (REG_SZ) with the given name. An empty name denotes the default value. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the value does not exist. </p>
</div>
<h3><a name="17362">getStringExpand</a></h3>
<p class="decl">std::string getStringExpand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Returns the string value (REG_EXPAND_SZ) with the given name. An empty name denotes the default value. All references to environment variables (%VAR%) in the string are expanded. </p>
<p>Throws a <a href="Poco.NotFoundException.html" title="class Poco::NotFoundException">NotFoundException</a> if the value does not exist. </p>
</div>
<h3><a name="17381">isReadOnly</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool isReadOnly() const;</p>
<div class="description">
<p>Returns true if and only if the key has been opened for read-only access only. </p>
</div>
<h3><a name="17364">setInt</a></h3>
<p class="decl">void setInt(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name,<br />&nbsp;&nbsp;&nbsp;&nbsp;int value<br />);</p>
<div class="description">
<p>Sets the numeric (REG_DWORD) value with the given name. An empty name denotes the default value. </p>
</div>
<h3><a name="17354">setString</a></h3>
<p class="decl">void setString(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; value<br />);</p>
<div class="description">
<p>Sets the string value (REG_SZ) with the given name. An empty name denotes the default value. </p>
</div>
<h3><a name="17359">setStringExpand</a></h3>
<p class="decl">void setStringExpand(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name,<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; value<br />);</p>
<div class="description">
<p>Sets the expandable string value (REG_EXPAND_SZ) with the given name. An empty name denotes the default value. </p>
</div>
<h3><a name="17377">subKeys</a></h3>
<p class="decl">void subKeys(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Util.WinRegistryKey.html#17339" title="Poco::Util::WinRegistryKey::Keys">Keys</a> &amp; keys<br />);</p>
<div class="description">
<p>Appends all subKey names to keys. </p>
</div>
<h3><a name="17373">type</a></h3>
<p class="decl"><a href="Poco.Util.WinRegistryKey.html#17341" title="enum  Poco::Util::WinRegistryKey::Type">Type</a> type(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p>Returns the type of the key value. </p>
</div>
<h3><a name="17379">values</a></h3>
<p class="decl">void values(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Util.WinRegistryKey.html#17340" title="Poco::Util::WinRegistryKey::Values">Values</a> &amp; vals<br />);</p>
<div class="description">
<p>Appends all value names to vals; </p>
</div>
<h3><a name="17383">close</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void close();</p>
<div class="description">
<p></p>
</div>
<h3><a name="17389">handleFor</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static HKEY handleFor(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; rootKey<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="17387">handleSetError</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void handleSetError(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; name<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="17384">key</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::string key() const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="17385">key</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">std::string key(<br />&nbsp;&nbsp;&nbsp;&nbsp;const std::string &amp; valueName<br />) const;</p>
<div class="description">
<p></p>
</div>
<h3><a name="17382">open</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void open();</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>