2 * Unix SMB/CIFS implementation.
4 * WINREG client routines
6 * Copyright (c) 2011 Andreas Schneider <asn@samba.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
26 * @brief Query a key for the specified dword value.
28 * Get the data that is associated with the named value of a specified registry
29 * open key. This function ensures that the key is a dword and converts it
32 * @param[in] mem_ctx The memory context to use.
34 * @param[in] h The binding handle for the rpc connection.
36 * @param[in] key_handle A handle to a key that MUST have been opened
39 * @param[in] value The name of the value to query.
41 * @param[out] data A pointer to store the data of the value.
43 * @param[out] pwerr A pointer to a WERROR to store result of the query.
45 * @return NT_STATUS_OK on success or a corresponding error if
46 * there was a problem on the connection.
48 NTSTATUS
dcerpc_winreg_query_dword(TALLOC_CTX
*mem_ctx
,
49 struct dcerpc_binding_handle
*h
,
50 struct policy_handle
*key_handle
,
56 * @brief Query a key for the specified binary value.
58 * Get the data that is associated with the named value of a specified registry
59 * open key. This function ensures that the key is a binary value.
61 * @param[in] mem_ctx The memory context to use.
63 * @param[in] h The binding handle for the rpc connection.
65 * @param[in] key_handle A handle to a key that MUST have been opened
68 * @param[in] value The name of the value to query.
70 * @param[out] data A pointer to store the data of the value.
72 * @param[out] pwerr A pointer to a WERROR to store result of the query.
74 * @return NT_STATUS_OK on success or a corresponding error if
75 * there was a problem on the connection.
77 NTSTATUS
dcerpc_winreg_query_binary(TALLOC_CTX
*mem_ctx
,
78 struct dcerpc_binding_handle
*h
,
79 struct policy_handle
*key_handle
,
85 * @brief Set a value with the specified dword data.
87 * @param[in] mem_ctx The memory context to use.
89 * @param[in] h The binding handle for the rpc connection.
91 * @param[in] key_handle A handle to a key that MUST have been opened
94 * @param[in] value The name of the value to set.
96 * @param[in] data The data to store in the value.
98 * @param[out] pwerr A pointer to a WERROR to store result of the query.
100 * @return NT_STATUS_OK on success or a corresponding error if
101 * there was a problem on the connection.
103 NTSTATUS
dcerpc_winreg_set_dword(TALLOC_CTX
*mem_ctx
,
104 struct dcerpc_binding_handle
*h
,
105 struct policy_handle
*key_handle
,
111 * @brief Set a value with the specified sz data.
113 * @param[in] mem_ctx The memory context to use.
115 * @param[in] h The binding handle for the rpc connection.
117 * @param[in] key_handle A handle to a key that MUST have been opened
120 * @param[in] value The name of the value to set.
122 * @param[in] data The data to store in the value.
124 * @param[out] pwerr A pointer to a WERROR to store result of the query.
126 * @return NT_STATUS_OK on success or a corresponding error if
127 * there was a problem on the connection.
129 NTSTATUS
dcerpc_winreg_set_sz(TALLOC_CTX
*mem_ctx
,
130 struct dcerpc_binding_handle
*h
,
131 struct policy_handle
*key_handle
,
137 * @brief Set a value with the specified expand sz data.
139 * @param[in] mem_ctx The memory context to use.
141 * @param[in] h The binding handle for the rpc connection.
143 * @param[in] key_handle A handle to a key that MUST have been opened
146 * @param[in] value The name of the value to set.
148 * @param[in] data The data to store in the value.
150 * @param[out] pwerr A pointer to a WERROR to store result of the query.
152 * @return NT_STATUS_OK on success or a corresponding error if
153 * there was a problem on the connection.
155 NTSTATUS
dcerpc_winreg_set_expand_sz(TALLOC_CTX
*mem_ctx
,
156 struct dcerpc_binding_handle
*h
,
157 struct policy_handle
*key_handle
,
162 #endif /* CLI_WINREG_H */
164 /* vim: set ts=8 sw=8 noet cindent syntax=c.doxygen: */