regenerate winreg using the latest pidl. almost all warnings are now gone
[metze/wireshark/wip.git] / epan / dissectors / packet-dcerpc-winreg.c
1 /* DO NOT EDIT
2         This filter was automatically generated
3         from winreg.idl and winreg.cnf.
4         
5         Pidl is a perl based IDL compiler for DCE/RPC idl files. 
6         It is maintained by the Samba team, not the Wireshark team.
7         Instructions on how to download and install Pidl can be 
8         found at http://wiki.wireshark.org/Pidl
9 */
10
11
12 #ifdef HAVE_CONFIG_H
13 #include "config.h"
14 #endif
15
16 #include <glib.h>
17 #include <string.h>
18 #include <epan/packet.h>
19
20 #include "packet-dcerpc.h"
21 #include "packet-dcerpc-nt.h"
22 #include "packet-windows-common.h"
23 #include "packet-dcerpc-winreg.h"
24
25 /* Ett declarations */
26 static gint ett_dcerpc_winreg = -1;
27 static gint ett_winreg_winreg_AccessMask = -1;
28 static gint ett_winreg_winreg_String = -1;
29 static gint ett_winreg_KeySecurityData = -1;
30 static gint ett_winreg_winreg_SecBuf = -1;
31 static gint ett_winreg_winreg_StringBuf = -1;
32 static gint ett_winreg_QueryMultipleValue = -1;
33
34
35 /* Header field declarations */
36 static gint hf_winreg_winreg_QueryInfoKey_max_valbufsize = -1;
37 static gint hf_winreg_winreg_SecBuf_inherit = -1;
38 static gint hf_winreg_winreg_QueryMultipleValues_key_handle = -1;
39 static gint hf_winreg_winreg_CreateKey_options = -1;
40 static gint hf_winreg_winreg_InitiateSystemShutdownEx_reboot = -1;
41 static gint hf_winreg_winreg_String_name = -1;
42 static gint hf_winreg_winreg_NotifyChangeKeyValue_notify_filter = -1;
43 static gint hf_winreg_winreg_QueryInfoKey_max_subkeysize = -1;
44 static gint hf_winreg_winreg_OpenKey_unknown = -1;
45 static gint hf_winreg_winreg_SetValue_data = -1;
46 static gint hf_winreg_winreg_QueryMultipleValues_values = -1;
47 static gint hf_winreg_winreg_QueryInfoKey_last_changed_time = -1;
48 static gint hf_winreg_QueryMultipleValue_name = -1;
49 static gint hf_winreg_winreg_EnumValue_type = -1;
50 static gint hf_winreg_winreg_SetValue_type = -1;
51 static gint hf_winreg_access_mask = -1;
52 static gint hf_winreg_winreg_CreateKey_secdesc = -1;
53 static gint hf_winreg_winreg_QueryMultipleValues_buffer = -1;
54 static gint hf_winreg_winreg_GetVersion_version = -1;
55 static gint hf_winreg_winreg_SetKeySecurity_access_mask = -1;
56 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY = -1;
57 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown = -1;
58 static gint hf_winreg_winreg_LoadKey_filename = -1;
59 static gint hf_winreg_winreg_EnumValue_enum_index = -1;
60 static gint hf_winreg_winreg_CreateKey_action_taken = -1;
61 static gint hf_winreg_winreg_QueryValue_size = -1;
62 static gint hf_winreg_winreg_QueryMultipleValues_buffer_size = -1;
63 static gint hf_winreg_winreg_CreateKey_keyclass = -1;
64 static gint hf_winreg_system_name = -1;
65 static gint hf_winreg_KeySecurityData_size = -1;
66 static gint hf_winreg_winreg_EnumValue_value = -1;
67 static gint hf_winreg_winreg_AccessMask_KEY_SET_VALUE = -1;
68 static gint hf_winreg_winreg_InitiateSystemShutdownEx_message = -1;
69 static gint hf_winreg_winreg_QueryInfoKey_secdescsize = -1;
70 static gint hf_winreg_sd_max_size = -1;
71 static gint hf_winreg_winreg_QueryValue_data = -1;
72 static gint hf_winreg_winreg_EnumValue_length = -1;
73 static gint hf_winreg_winreg_SecBuf_length = -1;
74 static gint hf_winreg_winreg_QueryValue_value_name = -1;
75 static gint hf_winreg_winreg_QueryInfoKey_num_values = -1;
76 static gint hf_winreg_winreg_InitiateSystemShutdown_reboot = -1;
77 static gint hf_winreg_winreg_CreateKey_new_handle = -1;
78 static gint hf_winreg_winreg_QueryValue_type = -1;
79 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_LINK = -1;
80 static gint hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY = -1;
81 static gint hf_winreg_KeySecurityData_data = -1;
82 static gint hf_winreg_QueryMultipleValue_length = -1;
83 static gint hf_winreg_winreg_LoadKey_keyname = -1;
84 static gint hf_winreg_winreg_InitiateSystemShutdown_hostname = -1;
85 static gint hf_winreg_winreg_StringBuf_name = -1;
86 static gint hf_winreg_winreg_NotifyChangeKeyValue_unknown2 = -1;
87 static gint hf_winreg_winreg_EnumValue_name = -1;
88 static gint hf_winreg_winreg_InitiateSystemShutdownEx_reason = -1;
89 static gint hf_winreg_winreg_InitiateSystemShutdown_message = -1;
90 static gint hf_winreg_winreg_DeleteValue_value = -1;
91 static gint hf_winreg_winreg_SetValue_name = -1;
92 static gint hf_winreg_winreg_EnumKey_keyclass = -1;
93 static gint hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree = -1;
94 static gint hf_winreg_winreg_EnumKey_name = -1;
95 static gint hf_winreg_winreg_QueryValue_length = -1;
96 static gint hf_winreg_QueryMultipleValue_offset = -1;
97 static gint hf_winreg_winreg_SecBuf_sd = -1;
98 static gint hf_winreg_werror = -1;
99 static gint hf_winreg_winreg_QueryInfoKey_num_subkeys = -1;
100 static gint hf_winreg_winreg_String_name_len = -1;
101 static gint hf_winreg_opnum = -1;
102 static gint hf_winreg_QueryMultipleValue_type = -1;
103 static gint hf_winreg_winreg_QueryInfoKey_class_in = -1;
104 static gint hf_winreg_winreg_InitiateSystemShutdownEx_timeout = -1;
105 static gint hf_winreg_handle = -1;
106 static gint hf_winreg_winreg_GetKeySecurity_sec_info = -1;
107 static gint hf_winreg_winreg_DeleteKey_key = -1;
108 static gint hf_winreg_winreg_AccessMask_KEY_NOTIFY = -1;
109 static gint hf_winreg_winreg_EnumKey_last_changed_time = -1;
110 static gint hf_winreg_winreg_QueryInfoKey_max_subkeylen = -1;
111 static gint hf_winreg_sd_actual_size = -1;
112 static gint hf_winreg_winreg_AbortSystemShutdown_server = -1;
113 static gint hf_winreg_sd_offset = -1;
114 static gint hf_winreg_sd = -1;
115 static gint hf_winreg_winreg_EnumKey_enum_index = -1;
116 static gint hf_winreg_winreg_InitiateSystemShutdownEx_hostname = -1;
117 static gint hf_winreg_winreg_InitiateSystemShutdownEx_force_apps = -1;
118 static gint hf_winreg_winreg_CreateKey_name = -1;
119 static gint hf_winreg_winreg_StringBuf_size = -1;
120 static gint hf_winreg_winreg_OpenKey_parent_handle = -1;
121 static gint hf_winreg_winreg_OpenKey_keyname = -1;
122 static gint hf_winreg_KeySecurityData_len = -1;
123 static gint hf_winreg_winreg_InitiateSystemShutdown_force_apps = -1;
124 static gint hf_winreg_winreg_OpenHKPD_access_mask = -1;
125 static gint hf_winreg_winreg_EnumValue_size = -1;
126 static gint hf_winreg_winreg_SetValue_size = -1;
127 static gint hf_winreg_winreg_OpenKey_access_mask = -1;
128 static gint hf_winreg_winreg_InitiateSystemShutdown_timeout = -1;
129 static gint hf_winreg_winreg_QueryInfoKey_max_valnamelen = -1;
130 static gint hf_winreg_winreg_QueryMultipleValues_num_values = -1;
131 static gint hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY = -1;
132 static gint hf_winreg_winreg_String_name_size = -1;
133 static gint hf_winreg_winreg_OpenHKCU_access_mask = -1;
134 static gint hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS = -1;
135 static gint hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE = -1;
136 static gint hf_winreg_winreg_StringBuf_length = -1;
137 static gint hf_winreg_winreg_NotifyChangeKeyValue_string1 = -1;
138 static gint hf_winreg_winreg_NotifyChangeKeyValue_string2 = -1;
139
140 static gint proto_dcerpc_winreg = -1;
141 /* Version information */
142
143
144 static e_uuid_t uuid_dcerpc_winreg = {
145         0x338cd001, 0x2244, 0x31f1,
146         { 0xaa, 0xaa, 0x90, 0x00, 0x38, 0x00, 0x10, 0x03 }
147 };
148 static guint16 ver_dcerpc_winreg = 1;
149
150 static const true_false_string winreg_AccessMask_KEY_QUERY_VALUE_tfs = {
151    "KEY_QUERY_VALUE is SET",
152    "KEY_QUERY_VALUE is NOT SET",
153 };
154 static const true_false_string winreg_AccessMask_KEY_SET_VALUE_tfs = {
155    "KEY_SET_VALUE is SET",
156    "KEY_SET_VALUE is NOT SET",
157 };
158 static const true_false_string winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs = {
159    "KEY_CREATE_SUB_KEY is SET",
160    "KEY_CREATE_SUB_KEY is NOT SET",
161 };
162 static const true_false_string winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs = {
163    "KEY_ENUMERATE_SUB_KEYS is SET",
164    "KEY_ENUMERATE_SUB_KEYS is NOT SET",
165 };
166 static const true_false_string winreg_AccessMask_KEY_NOTIFY_tfs = {
167    "KEY_NOTIFY is SET",
168    "KEY_NOTIFY is NOT SET",
169 };
170 static const true_false_string winreg_AccessMask_KEY_CREATE_LINK_tfs = {
171    "KEY_CREATE_LINK is SET",
172    "KEY_CREATE_LINK is NOT SET",
173 };
174 static const true_false_string winreg_AccessMask_KEY_WOW64_64KEY_tfs = {
175    "KEY_WOW64_64KEY is SET",
176    "KEY_WOW64_64KEY is NOT SET",
177 };
178 static const true_false_string winreg_AccessMask_KEY_WOW64_32KEY_tfs = {
179    "KEY_WOW64_32KEY is SET",
180    "KEY_WOW64_32KEY is NOT SET",
181 };
182 const value_string winreg_winreg_Type_vals[] = {
183         { REG_NONE, "REG_NONE" },
184         { REG_SZ, "REG_SZ" },
185         { REG_EXPAND_SZ, "REG_EXPAND_SZ" },
186         { REG_BINARY, "REG_BINARY" },
187         { REG_DWORD, "REG_DWORD" },
188         { REG_DWORD_BIG_ENDIAN, "REG_DWORD_BIG_ENDIAN" },
189         { REG_LINK, "REG_LINK" },
190         { REG_MULTI_SZ, "REG_MULTI_SZ" },
191         { REG_RESOURCE_LIST, "REG_RESOURCE_LIST" },
192         { REG_FULL_RESOURCE_DESCRIPTOR, "REG_FULL_RESOURCE_DESCRIPTOR" },
193         { REG_RESOURCE_REQUIREMENTS_LIST, "REG_RESOURCE_REQUIREMENTS_LIST" },
194         { REG_QWORD, "REG_QWORD" },
195 { 0, NULL }
196 };
197 static int winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
198 static int winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
199 static int winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
200 static int winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
201 static int winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
202 static int winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
203 static int winreg_dissect_element_KeySecurityData_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
204 static int winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
205 static int winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
206 static int winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
207 static int winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
208 static int winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
209 const value_string winreg_winreg_CreateAction_vals[] = {
210         { REG_ACTION_NONE, "REG_ACTION_NONE" },
211         { REG_CREATED_NEW_KEY, "REG_CREATED_NEW_KEY" },
212         { REG_OPENED_EXISTING_KEY, "REG_OPENED_EXISTING_KEY" },
213 { 0, NULL }
214 };
215 static int winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
216 static int winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
217 static int winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
218 static int winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
219 static int winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
220 static int winreg_dissect_element_QueryMultipleValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
221 static int winreg_dissect_element_QueryMultipleValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
222 static int winreg_dissect_element_QueryMultipleValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
223 static int winreg_dissect_element_QueryMultipleValue_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
224 static int winreg_dissect_element_QueryMultipleValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
225 static int winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
226 static int winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
227 static int winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
228 static int winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
229 static int winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
230 static int winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
231 static int winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
232 static int winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
233 static int winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
234 static int winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
235 static int winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
236 static int winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
237 static int winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
238 static int winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
239 static int winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
240 static int winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
241 static int winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
242 static int winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
243 static int winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
244 static int winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
245 static int winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
246 static int winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
247 static int winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
248 static int winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
249 static int winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
250 static int winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
251 static int winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
252 static int winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
253 static int winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
254 static int winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
255 static int winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
256 static int winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
257 static int winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
258 static int winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
259 static int winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
260 static int winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
261 static int winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
262 static int winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
263 static int winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
264 static int winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
265 static int winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
266 static int winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
267 static int winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
268 static int winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
269 static int winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
270 static int winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
271 static int winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
272 static int winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
273 static int winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
274 static int winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
275 static int winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
276 static int winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
277 static int winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
278 static int winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
279 static int winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
280 static int winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
281 static int winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
282 static int winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
283 static int winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
284 static int winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
285 static int winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
286 static int winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
287 static int winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
288 static int winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
289 static int winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
290 static int winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
291 static int winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
292 static int winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
293 static int winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
294 static int winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
295 static int winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
296 static int winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
297 static int winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
298 static int winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
299 static int winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
300 static int winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
301 static int winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
302 static int winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
303 static int winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
304 static int winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
305 static int winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
306 static int winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
307 static int winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
308 static int winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
309 static int winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
310 static int winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
311 static int winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
312 static int winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
313 static int winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
314 static int winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
315 static int winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
316 static int winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
317 static int winreg_dissect_element_OpenKey_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
318 static int winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
319 static int winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
320 static int winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
321 static int winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
322 static int winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
323 static int winreg_dissect_element_QueryInfoKey_class_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
324 static int winreg_dissect_element_QueryInfoKey_class_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
325 static int winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
326 static int winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
327 static int winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
328 static int winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
329 static int winreg_dissect_element_QueryInfoKey_max_subkeysize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
330 static int winreg_dissect_element_QueryInfoKey_max_subkeysize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
331 static int winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
332 static int winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
333 static int winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
334 static int winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
335 static int winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
336 static int winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
337 static int winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
338 static int winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
339 static int winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
340 static int winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
341 static int winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
342 static int winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
343 static int winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
344 static int winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
345 static int winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
346 static int winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
347 static int winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
348 static int winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
349 static int winreg_dissect_element_QueryValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
350 static int winreg_dissect_element_QueryValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
351 static int winreg_dissect_element_QueryValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
352 static int winreg_dissect_element_QueryValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
353 static int winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
354 static int winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
355 static int winreg_dissect_element_SetKeySecurity_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
356 static int winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
357 static int winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
358 static int winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
359 static int winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
360 static int winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
361 static int winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
362 static int winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
363 static int winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
364 static int winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
365 static int winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
366 static int winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
367 static int winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
368 static int winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
369 static int winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
370 static int winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
371 static int winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
372 static int winreg_dissect_element_InitiateSystemShutdown_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
373 static int winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
374 static int winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
375 static int winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
376 static int winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
377 static int winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
378 static int winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
379 static int winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
380 static int winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
381 static int winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
382 static int winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
383 static int winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
384 static int winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
385 static int winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
386 static int winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
387 static int winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
388 static int winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
389 static int winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
390 static int winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
391 static int winreg_dissect_element_QueryMultipleValues_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
392 static int winreg_dissect_element_QueryMultipleValues_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
393 static int winreg_dissect_element_QueryMultipleValues_values__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
394 static int winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
395 static int winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
396 static int winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
397 static int winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
398 static int winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
399 static int winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
400 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
401 static int winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
402 static int winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
403 static int winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
404 static int winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
405 static int winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
406 static int winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
407 static int winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
408 static int winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
409 static int winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
410 static int winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
411 static int winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
412 static int winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
413 static int winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
414 static int winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
415 static int winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
416 static int winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
417 static int winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_);
418 static void
419 winreg_specific_rights(tvbuff_t *tvb, gint offset, proto_tree *tree, guint32 access)
420 {
421         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY, tvb, offset, 4, access);
422         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY, tvb, offset, 4, access);
423         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_LINK, tvb, offset, 4, access);
424         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_NOTIFY, tvb, offset, 4, access);
425         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS, tvb, offset, 4, access);
426         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY, tvb, offset, 4, access);
427         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_SET_VALUE, tvb, offset, 4, access);
428         proto_tree_add_boolean(tree, hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE, tvb, offset, 4, access);
429 }
430 struct access_mask_info winreg_access_mask_info = {
431         "WINREG",               /* Name of specific rights */
432         winreg_specific_rights, /* Dissection function */
433         NULL,                   /* Generic mapping table */
434         NULL                    /* Standard mapping table */
435 };
436 static int
437 winreg_dissect_element_KeySecurityData_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep)
438 {
439         guint32 len;
440         dcerpc_info *di;
441         di=pinfo->private_data;
442         if(di->conformant_run){
443                 /*just a run to handle conformant arrays, nothing to dissect */
444                 return offset;
445         }
446         /* this is a varying and conformant array */
447         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
448                                      hf_winreg_sd_max_size, NULL);
449         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
450                                      hf_winreg_sd_offset, NULL);
451         offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, drep,
452                                      hf_winreg_sd_actual_size, &len);
453         dissect_nt_sec_desc(tvb, offset, pinfo, tree, drep, TRUE, len,
454                 &winreg_access_mask_info);
455         offset += len;
456         return offset;
457 }
458 int
459 winreg_dissect_bitmap_AccessMask(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, guint8 *drep, int hf_index _U_, guint32 param _U_)
460 {
461         offset = dissect_nt_access_mask(
462                 tvb, offset, pinfo, tree, drep, hf_winreg_access_mask,
463                 &winreg_access_mask_info, NULL);
464         return offset;
465 }
466 /* FIXME: pidl generates the wrong name for external symbols */
467 static int
468 winreg_dissect_struct_initshutdown_String(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param)
469 {
470         #include "packet-dcerpc-initshutdown.h"
471         return initshutdown_dissect_struct_String(tvb, offset, pinfo, parent_tree, drep, hf_index, param);
472 }
473
474
475 /* IDL: bitmap { */
476 /* IDL:         KEY_QUERY_VALUE =  0x00001 , */
477 /* IDL:         KEY_SET_VALUE =  0x00002 , */
478 /* IDL:         KEY_CREATE_SUB_KEY =  0x00004 , */
479 /* IDL:         KEY_ENUMERATE_SUB_KEYS =  0x00008 , */
480 /* IDL:         KEY_NOTIFY =  0x00010 , */
481 /* IDL:         KEY_CREATE_LINK =  0x00020 , */
482 /* IDL:         KEY_WOW64_64KEY =  0x00100 , */
483 /* IDL:         KEY_WOW64_32KEY =  0x00200 , */
484 /* IDL: } */
485
486
487 /* IDL: enum { */
488 /* IDL:         REG_NONE=0, */
489 /* IDL:         REG_SZ=1, */
490 /* IDL:         REG_EXPAND_SZ=2, */
491 /* IDL:         REG_BINARY=3, */
492 /* IDL:         REG_DWORD=4, */
493 /* IDL:         REG_DWORD_BIG_ENDIAN=5, */
494 /* IDL:         REG_LINK=6, */
495 /* IDL:         REG_MULTI_SZ=7, */
496 /* IDL:         REG_RESOURCE_LIST=8, */
497 /* IDL:         REG_FULL_RESOURCE_DESCRIPTOR=9, */
498 /* IDL:         REG_RESOURCE_REQUIREMENTS_LIST=10, */
499 /* IDL:         REG_QWORD=11, */
500 /* IDL: } */
501
502 int
503 winreg_dissect_enum_Type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
504 {
505         guint32 parameter=0;
506         if(param){
507                 parameter=(guint32)*param;
508         }
509         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
510         if(param){
511                 *param=(guint32)parameter;
512         }
513         return offset;
514 }
515
516
517 /* IDL: struct { */
518 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_len; */
519 /* IDL:         [value(strlen_m_term(name)*2)] uint16 name_size; */
520 /* IDL:         [charset(UTF16)] [unique(1)] uint16 *name; */
521 /* IDL: } */
522
523 static int
524 winreg_dissect_element_String_name_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
525 {
526         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_String_name_len, 0);
527
528         return offset;
529 }
530
531 static int
532 winreg_dissect_element_String_name_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
533 {
534         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_String_name_size, 0);
535
536         return offset;
537 }
538
539 static int
540 winreg_dissect_element_String_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
541 {
542         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_String_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_String_name);
543
544         return offset;
545 }
546
547 static int
548 winreg_dissect_element_String_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
549 {
550         char *data;
551
552         offset = dissect_ndr_cvstring(tvb, offset, pinfo, tree, drep, sizeof(guint16), hf_winreg_winreg_String_name, FALSE, &data);
553         proto_item_append_text(tree, ": %s", data);
554
555         return offset;
556 }
557
558 int
559 winreg_dissect_struct_String(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
560 {
561         proto_item *item = NULL;
562         proto_tree *tree = NULL;
563         int old_offset;
564
565         ALIGN_TO_4_BYTES;
566
567         old_offset = offset;
568
569         if (parent_tree) {
570                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
571                 tree = proto_item_add_subtree(item, ett_winreg_winreg_String);
572         }
573         
574         offset = winreg_dissect_element_String_name_len(tvb, offset, pinfo, tree, drep);
575
576         offset = winreg_dissect_element_String_name_size(tvb, offset, pinfo, tree, drep);
577
578         offset = winreg_dissect_element_String_name(tvb, offset, pinfo, tree, drep);
579
580
581         proto_item_set_len(item, offset-old_offset);
582
583         return offset;
584 }
585
586
587 /* IDL: struct { */
588 /* IDL:         [size_is(size)] [length_is(len)] [unique(1)] uint8 *data; */
589 /* IDL:         uint32 size; */
590 /* IDL:         uint32 len; */
591 /* IDL: } */
592
593 static int
594 winreg_dissect_element_KeySecurityData_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
595 {
596         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_KeySecurityData_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_KeySecurityData_data);
597
598         return offset;
599 }
600
601 static int
602 winreg_dissect_element_KeySecurityData_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
603 {
604         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_data, 0);
605
606         return offset;
607 }
608
609 static int
610 winreg_dissect_element_KeySecurityData_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
611 {
612         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_size, 0);
613
614         return offset;
615 }
616
617 static int
618 winreg_dissect_element_KeySecurityData_len(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
619 {
620         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_KeySecurityData_len, 0);
621
622         return offset;
623 }
624
625 int
626 winreg_dissect_struct_KeySecurityData(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
627 {
628         proto_item *item = NULL;
629         proto_tree *tree = NULL;
630         int old_offset;
631
632         ALIGN_TO_4_BYTES;
633
634         old_offset = offset;
635
636         if (parent_tree) {
637                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
638                 tree = proto_item_add_subtree(item, ett_winreg_KeySecurityData);
639         }
640         
641         offset = winreg_dissect_element_KeySecurityData_data(tvb, offset, pinfo, tree, drep);
642
643         offset = winreg_dissect_element_KeySecurityData_size(tvb, offset, pinfo, tree, drep);
644
645         offset = winreg_dissect_element_KeySecurityData_len(tvb, offset, pinfo, tree, drep);
646
647
648         proto_item_set_len(item, offset-old_offset);
649
650         return offset;
651 }
652
653
654 /* IDL: struct { */
655 /* IDL:         uint32 length; */
656 /* IDL:         KeySecurityData sd; */
657 /* IDL:         uint8 inherit; */
658 /* IDL: } */
659
660 static int
661 winreg_dissect_element_SecBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
662 {
663         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SecBuf_length, 0);
664
665         return offset;
666 }
667
668 static int
669 winreg_dissect_element_SecBuf_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
670 {
671         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_SecBuf_sd,0);
672
673         return offset;
674 }
675
676 static int
677 winreg_dissect_element_SecBuf_inherit(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
678 {
679         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SecBuf_inherit, 0);
680
681         return offset;
682 }
683
684 int
685 winreg_dissect_struct_SecBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
686 {
687         proto_item *item = NULL;
688         proto_tree *tree = NULL;
689         int old_offset;
690
691         ALIGN_TO_4_BYTES;
692
693         old_offset = offset;
694
695         if (parent_tree) {
696                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
697                 tree = proto_item_add_subtree(item, ett_winreg_winreg_SecBuf);
698         }
699         
700         offset = winreg_dissect_element_SecBuf_length(tvb, offset, pinfo, tree, drep);
701
702         offset = winreg_dissect_element_SecBuf_sd(tvb, offset, pinfo, tree, drep);
703
704         offset = winreg_dissect_element_SecBuf_inherit(tvb, offset, pinfo, tree, drep);
705
706
707         proto_item_set_len(item, offset-old_offset);
708
709         return offset;
710 }
711
712
713 /* IDL: enum { */
714 /* IDL:         REG_ACTION_NONE=0, */
715 /* IDL:         REG_CREATED_NEW_KEY=1, */
716 /* IDL:         REG_OPENED_EXISTING_KEY=2, */
717 /* IDL: } */
718
719 int
720 winreg_dissect_enum_CreateAction(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)
721 {
722         guint32 parameter=0;
723         if(param){
724                 parameter=(guint32)*param;
725         }
726         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_index, &parameter);
727         if(param){
728                 *param=(guint32)parameter;
729         }
730         return offset;
731 }
732
733
734 /* IDL: struct { */
735 /* IDL:         [value(strlen_m_term(name)*2)] uint16 length; */
736 /* IDL:         uint16 size; */
737 /* IDL:         [charset(UTF16)] [size_is(size/2)] [length_is(length/2)] [unique(1)] uint16 *name; */
738 /* IDL: } */
739
740 static int
741 winreg_dissect_element_StringBuf_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
742 {
743         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_length, 0);
744
745         return offset;
746 }
747
748 static int
749 winreg_dissect_element_StringBuf_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
750 {
751         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_size, 0);
752
753         return offset;
754 }
755
756 static int
757 winreg_dissect_element_StringBuf_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
758 {
759         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_StringBuf_name_, NDR_POINTER_UNIQUE, "Pointer to Name (uint16)",hf_winreg_winreg_StringBuf_name);
760
761         return offset;
762 }
763
764 static int
765 winreg_dissect_element_StringBuf_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
766 {
767         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_StringBuf_name__);
768
769         return offset;
770 }
771
772 static int
773 winreg_dissect_element_StringBuf_name__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
774 {
775         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_StringBuf_name, 0);
776
777         return offset;
778 }
779
780 int
781 winreg_dissect_struct_StringBuf(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
782 {
783         proto_item *item = NULL;
784         proto_tree *tree = NULL;
785         int old_offset;
786
787         ALIGN_TO_4_BYTES;
788
789         old_offset = offset;
790
791         if (parent_tree) {
792                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
793                 tree = proto_item_add_subtree(item, ett_winreg_winreg_StringBuf);
794         }
795         
796         offset = winreg_dissect_element_StringBuf_length(tvb, offset, pinfo, tree, drep);
797
798         offset = winreg_dissect_element_StringBuf_size(tvb, offset, pinfo, tree, drep);
799
800         offset = winreg_dissect_element_StringBuf_name(tvb, offset, pinfo, tree, drep);
801
802
803         proto_item_set_len(item, offset-old_offset);
804
805         return offset;
806 }
807
808
809 /* IDL: struct { */
810 /* IDL:         [unique(1)] winreg_String *name; */
811 /* IDL:         winreg_Type type; */
812 /* IDL:         uint32 offset; */
813 /* IDL:         uint32 length; */
814 /* IDL: } */
815
816 static int
817 winreg_dissect_element_QueryMultipleValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
818 {
819         offset = dissect_ndr_embedded_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValue_name_, NDR_POINTER_UNIQUE, "Pointer to Name (winreg_String)",hf_winreg_QueryMultipleValue_name);
820
821         return offset;
822 }
823
824 static int
825 winreg_dissect_element_QueryMultipleValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
826 {
827         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_QueryMultipleValue_name,0);
828
829         return offset;
830 }
831
832 static int
833 winreg_dissect_element_QueryMultipleValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
834 {
835         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_type, 0);
836
837         return offset;
838 }
839
840 static int
841 winreg_dissect_element_QueryMultipleValue_offset(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
842 {
843         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_offset, 0);
844
845         return offset;
846 }
847
848 static int
849 winreg_dissect_element_QueryMultipleValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
850 {
851         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_QueryMultipleValue_length, 0);
852
853         return offset;
854 }
855
856 int
857 winreg_dissect_struct_QueryMultipleValue(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *parent_tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 param _U_)
858 {
859         proto_item *item = NULL;
860         proto_tree *tree = NULL;
861         int old_offset;
862
863         ALIGN_TO_4_BYTES;
864
865         old_offset = offset;
866
867         if (parent_tree) {
868                 item = proto_tree_add_item(parent_tree, hf_index, tvb, offset, -1, TRUE);
869                 tree = proto_item_add_subtree(item, ett_winreg_QueryMultipleValue);
870         }
871         
872         offset = winreg_dissect_element_QueryMultipleValue_name(tvb, offset, pinfo, tree, drep);
873
874         offset = winreg_dissect_element_QueryMultipleValue_type(tvb, offset, pinfo, tree, drep);
875
876         offset = winreg_dissect_element_QueryMultipleValue_offset(tvb, offset, pinfo, tree, drep);
877
878         offset = winreg_dissect_element_QueryMultipleValue_length(tvb, offset, pinfo, tree, drep);
879
880
881         proto_item_set_len(item, offset-old_offset);
882
883         return offset;
884 }
885
886 static int
887 winreg_dissect_element_OpenHKCR_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
888 {
889         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCR_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
890
891         return offset;
892 }
893
894 static int
895 winreg_dissect_element_OpenHKCR_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
896 {
897         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
898
899         return offset;
900 }
901
902 static int
903 winreg_dissect_element_OpenHKCR_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
904 {
905         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
906
907         return offset;
908 }
909
910 static int
911 winreg_dissect_element_OpenHKCR_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
912 {
913         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCR_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
914
915         return offset;
916 }
917
918 static int
919 winreg_dissect_element_OpenHKCR_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
920 {
921         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
922
923         return offset;
924 }
925
926 /* IDL: WERROR winreg_OpenHKCR( */
927 /* IDL: [unique(1)] [in] uint16 *system_name, */
928 /* IDL: [in] winreg_AccessMask access_mask, */
929 /* IDL: [out] [ref] policy_handle *handle */
930 /* IDL: ); */
931
932 static int
933 winreg_dissect_OpenHKCR_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
934 {
935         guint32 status;
936
937         pinfo->dcerpc_procedure_name="OpenHKCR";
938         offset = winreg_dissect_element_OpenHKCR_handle(tvb, offset, pinfo, tree, drep);
939         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
940
941         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
942
943         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
944                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
945
946         return offset;
947 }
948
949 static int
950 winreg_dissect_OpenHKCR_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
951 {
952         pinfo->dcerpc_procedure_name="OpenHKCR";
953         offset = winreg_dissect_element_OpenHKCR_system_name(tvb, offset, pinfo, tree, drep);
954         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
955         offset = winreg_dissect_element_OpenHKCR_access_mask(tvb, offset, pinfo, tree, drep);
956         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
957         return offset;
958 }
959
960 static int
961 winreg_dissect_element_OpenHKCU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
962 {
963         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
964
965         return offset;
966 }
967
968 static int
969 winreg_dissect_element_OpenHKCU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
970 {
971         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
972
973         return offset;
974 }
975
976 static int
977 winreg_dissect_element_OpenHKCU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
978 {
979         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenHKCU_access_mask, 0);
980
981         return offset;
982 }
983
984 static int
985 winreg_dissect_element_OpenHKCU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
986 {
987         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
988
989         return offset;
990 }
991
992 static int
993 winreg_dissect_element_OpenHKCU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
994 {
995         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
996
997         return offset;
998 }
999
1000 /* IDL: WERROR winreg_OpenHKCU( */
1001 /* IDL: [unique(1)] [in] uint16 *system_name, */
1002 /* IDL: [in] winreg_AccessMask access_mask, */
1003 /* IDL: [out] [ref] policy_handle *handle */
1004 /* IDL: ); */
1005
1006 static int
1007 winreg_dissect_OpenHKCU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1008 {
1009         guint32 status;
1010
1011         pinfo->dcerpc_procedure_name="OpenHKCU";
1012         offset = winreg_dissect_element_OpenHKCU_handle(tvb, offset, pinfo, tree, drep);
1013         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1014
1015         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1016
1017         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1018                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1019
1020         return offset;
1021 }
1022
1023 static int
1024 winreg_dissect_OpenHKCU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1025 {
1026         pinfo->dcerpc_procedure_name="OpenHKCU";
1027         offset = winreg_dissect_element_OpenHKCU_system_name(tvb, offset, pinfo, tree, drep);
1028         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1029         offset = winreg_dissect_element_OpenHKCU_access_mask(tvb, offset, pinfo, tree, drep);
1030         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1031         return offset;
1032 }
1033
1034 static int
1035 winreg_dissect_element_OpenHKLM_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1036 {
1037         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKLM_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1038
1039         return offset;
1040 }
1041
1042 static int
1043 winreg_dissect_element_OpenHKLM_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1044 {
1045         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1046
1047         return offset;
1048 }
1049
1050 static int
1051 winreg_dissect_element_OpenHKLM_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1052 {
1053         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1054
1055         return offset;
1056 }
1057
1058 static int
1059 winreg_dissect_element_OpenHKLM_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1060 {
1061         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKLM_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1062
1063         return offset;
1064 }
1065
1066 static int
1067 winreg_dissect_element_OpenHKLM_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1068 {
1069         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1070
1071         return offset;
1072 }
1073
1074 /* IDL: WERROR winreg_OpenHKLM( */
1075 /* IDL: [unique(1)] [in] uint16 *system_name, */
1076 /* IDL: [in] winreg_AccessMask access_mask, */
1077 /* IDL: [out] [ref] policy_handle *handle */
1078 /* IDL: ); */
1079
1080 static int
1081 winreg_dissect_OpenHKLM_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1082 {
1083         guint32 status;
1084
1085         pinfo->dcerpc_procedure_name="OpenHKLM";
1086         offset = winreg_dissect_element_OpenHKLM_handle(tvb, offset, pinfo, tree, drep);
1087         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1088
1089         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1090
1091         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1092                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1093
1094         return offset;
1095 }
1096
1097 static int
1098 winreg_dissect_OpenHKLM_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1099 {
1100         pinfo->dcerpc_procedure_name="OpenHKLM";
1101         offset = winreg_dissect_element_OpenHKLM_system_name(tvb, offset, pinfo, tree, drep);
1102         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1103         offset = winreg_dissect_element_OpenHKLM_access_mask(tvb, offset, pinfo, tree, drep);
1104         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1105         return offset;
1106 }
1107
1108 static int
1109 winreg_dissect_element_OpenHKPD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1110 {
1111         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1112
1113         return offset;
1114 }
1115
1116 static int
1117 winreg_dissect_element_OpenHKPD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1118 {
1119         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1120
1121         return offset;
1122 }
1123
1124 static int
1125 winreg_dissect_element_OpenHKPD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1126 {
1127         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenHKPD_access_mask, 0);
1128
1129         return offset;
1130 }
1131
1132 static int
1133 winreg_dissect_element_OpenHKPD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1134 {
1135         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1136
1137         return offset;
1138 }
1139
1140 static int
1141 winreg_dissect_element_OpenHKPD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1142 {
1143         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1144
1145         return offset;
1146 }
1147
1148 /* IDL: WERROR winreg_OpenHKPD( */
1149 /* IDL: [unique(1)] [in] uint16 *system_name, */
1150 /* IDL: [in] winreg_AccessMask access_mask, */
1151 /* IDL: [out] [ref] policy_handle *handle */
1152 /* IDL: ); */
1153
1154 static int
1155 winreg_dissect_OpenHKPD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1156 {
1157         guint32 status;
1158
1159         pinfo->dcerpc_procedure_name="OpenHKPD";
1160         offset = winreg_dissect_element_OpenHKPD_handle(tvb, offset, pinfo, tree, drep);
1161         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1162
1163         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1164
1165         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1166                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1167
1168         return offset;
1169 }
1170
1171 static int
1172 winreg_dissect_OpenHKPD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1173 {
1174         pinfo->dcerpc_procedure_name="OpenHKPD";
1175         offset = winreg_dissect_element_OpenHKPD_system_name(tvb, offset, pinfo, tree, drep);
1176         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1177         offset = winreg_dissect_element_OpenHKPD_access_mask(tvb, offset, pinfo, tree, drep);
1178         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1179         return offset;
1180 }
1181
1182 static int
1183 winreg_dissect_element_OpenHKU_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1184 {
1185         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKU_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
1186
1187         return offset;
1188 }
1189
1190 static int
1191 winreg_dissect_element_OpenHKU_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1192 {
1193         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
1194
1195         return offset;
1196 }
1197
1198 static int
1199 winreg_dissect_element_OpenHKU_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1200 {
1201         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1202
1203         return offset;
1204 }
1205
1206 static int
1207 winreg_dissect_element_OpenHKU_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1208 {
1209         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKU_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1210
1211         return offset;
1212 }
1213
1214 static int
1215 winreg_dissect_element_OpenHKU_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1216 {
1217         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
1218
1219         return offset;
1220 }
1221
1222 /* IDL: WERROR winreg_OpenHKU( */
1223 /* IDL: [unique(1)] [in] uint16 *system_name, */
1224 /* IDL: [in] winreg_AccessMask access_mask, */
1225 /* IDL: [out] [ref] policy_handle *handle */
1226 /* IDL: ); */
1227
1228 static int
1229 winreg_dissect_OpenHKU_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1230 {
1231         guint32 status;
1232
1233         pinfo->dcerpc_procedure_name="OpenHKU";
1234         offset = winreg_dissect_element_OpenHKU_handle(tvb, offset, pinfo, tree, drep);
1235         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1236
1237         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1238
1239         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1240                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1241
1242         return offset;
1243 }
1244
1245 static int
1246 winreg_dissect_OpenHKU_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1247 {
1248         pinfo->dcerpc_procedure_name="OpenHKU";
1249         offset = winreg_dissect_element_OpenHKU_system_name(tvb, offset, pinfo, tree, drep);
1250         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1251         offset = winreg_dissect_element_OpenHKU_access_mask(tvb, offset, pinfo, tree, drep);
1252         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1253         return offset;
1254 }
1255
1256 static int
1257 winreg_dissect_element_CloseKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1258 {
1259         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CloseKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1260
1261         return offset;
1262 }
1263
1264 static int
1265 winreg_dissect_element_CloseKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1266 {
1267         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_CLOSE);
1268
1269         return offset;
1270 }
1271
1272 /* IDL: WERROR winreg_CloseKey( */
1273 /* IDL: [out] [in] [ref] policy_handle *handle */
1274 /* IDL: ); */
1275
1276 static int
1277 winreg_dissect_CloseKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1278 {
1279         guint32 status;
1280
1281         pinfo->dcerpc_procedure_name="CloseKey";
1282         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, drep);
1283         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1284
1285         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1286
1287         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1288                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1289
1290         return offset;
1291 }
1292
1293 static int
1294 winreg_dissect_CloseKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1295 {
1296         pinfo->dcerpc_procedure_name="CloseKey";
1297         offset = winreg_dissect_element_CloseKey_handle(tvb, offset, pinfo, tree, drep);
1298         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1299         return offset;
1300 }
1301
1302 static int
1303 winreg_dissect_element_CreateKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1304 {
1305         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1306
1307         return offset;
1308 }
1309
1310 static int
1311 winreg_dissect_element_CreateKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1312 {
1313         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1314
1315         return offset;
1316 }
1317
1318 static int
1319 winreg_dissect_element_CreateKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1320 {
1321         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_CreateKey_name,0);
1322
1323         return offset;
1324 }
1325
1326 static int
1327 winreg_dissect_element_CreateKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1328 {
1329         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_CreateKey_keyclass,0);
1330
1331         return offset;
1332 }
1333
1334 static int
1335 winreg_dissect_element_CreateKey_options(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1336 {
1337         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_options, 0);
1338
1339         return offset;
1340 }
1341
1342 static int
1343 winreg_dissect_element_CreateKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1344 {
1345         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
1346
1347         return offset;
1348 }
1349
1350 static int
1351 winreg_dissect_element_CreateKey_secdesc(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1352 {
1353         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_secdesc_, NDR_POINTER_UNIQUE, "Pointer to Secdesc (winreg_SecBuf)",hf_winreg_winreg_CreateKey_secdesc);
1354
1355         return offset;
1356 }
1357
1358 static int
1359 winreg_dissect_element_CreateKey_secdesc_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1360 {
1361         offset = winreg_dissect_struct_SecBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_CreateKey_secdesc,0);
1362
1363         return offset;
1364 }
1365
1366 static int
1367 winreg_dissect_element_CreateKey_new_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1368 {
1369         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_new_handle_, NDR_POINTER_REF, "Pointer to New Handle (policy_handle)",hf_winreg_winreg_CreateKey_new_handle);
1370
1371         return offset;
1372 }
1373
1374 static int
1375 winreg_dissect_element_CreateKey_new_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1376 {
1377         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_new_handle, PIDL_POLHND_OPEN);
1378
1379         return offset;
1380 }
1381
1382 static int
1383 winreg_dissect_element_CreateKey_action_taken(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1384 {
1385         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_CreateKey_action_taken_, NDR_POINTER_UNIQUE, "Pointer to Action Taken (winreg_CreateAction)",hf_winreg_winreg_CreateKey_action_taken);
1386
1387         return offset;
1388 }
1389
1390 static int
1391 winreg_dissect_element_CreateKey_action_taken_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1392 {
1393         offset = winreg_dissect_enum_CreateAction(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_CreateKey_action_taken, 0);
1394
1395         return offset;
1396 }
1397
1398 /* IDL: WERROR winreg_CreateKey( */
1399 /* IDL: [in] [ref] policy_handle *handle, */
1400 /* IDL: [in] winreg_String name, */
1401 /* IDL: [in] winreg_String keyclass, */
1402 /* IDL: [in] uint32 options, */
1403 /* IDL: [in] winreg_AccessMask access_mask, */
1404 /* IDL: [in] [unique(1)] winreg_SecBuf *secdesc, */
1405 /* IDL: [out] [ref] policy_handle *new_handle, */
1406 /* IDL: [out] [in] [unique(1)] winreg_CreateAction *action_taken */
1407 /* IDL: ); */
1408
1409 static int
1410 winreg_dissect_CreateKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1411 {
1412         guint32 status;
1413
1414         pinfo->dcerpc_procedure_name="CreateKey";
1415         offset = winreg_dissect_element_CreateKey_new_handle(tvb, offset, pinfo, tree, drep);
1416         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1417
1418         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, drep);
1419         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1420
1421         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1422
1423         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1424                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1425
1426         return offset;
1427 }
1428
1429 static int
1430 winreg_dissect_CreateKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1431 {
1432         pinfo->dcerpc_procedure_name="CreateKey";
1433         offset = winreg_dissect_element_CreateKey_handle(tvb, offset, pinfo, tree, drep);
1434         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1435         offset = winreg_dissect_element_CreateKey_name(tvb, offset, pinfo, tree, drep);
1436         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1437         offset = winreg_dissect_element_CreateKey_keyclass(tvb, offset, pinfo, tree, drep);
1438         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1439         offset = winreg_dissect_element_CreateKey_options(tvb, offset, pinfo, tree, drep);
1440         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1441         offset = winreg_dissect_element_CreateKey_access_mask(tvb, offset, pinfo, tree, drep);
1442         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1443         offset = winreg_dissect_element_CreateKey_secdesc(tvb, offset, pinfo, tree, drep);
1444         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1445         offset = winreg_dissect_element_CreateKey_action_taken(tvb, offset, pinfo, tree, drep);
1446         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1447         return offset;
1448 }
1449
1450 static int
1451 winreg_dissect_element_DeleteKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1452 {
1453         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_DeleteKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1454
1455         return offset;
1456 }
1457
1458 static int
1459 winreg_dissect_element_DeleteKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1460 {
1461         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1462
1463         return offset;
1464 }
1465
1466 static int
1467 winreg_dissect_element_DeleteKey_key(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1468 {
1469         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_DeleteKey_key,0);
1470
1471         return offset;
1472 }
1473
1474 /* IDL: WERROR winreg_DeleteKey( */
1475 /* IDL: [in] [ref] policy_handle *handle, */
1476 /* IDL: [in] winreg_String key */
1477 /* IDL: ); */
1478
1479 static int
1480 winreg_dissect_DeleteKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1481 {
1482         guint32 status;
1483
1484         pinfo->dcerpc_procedure_name="DeleteKey";
1485         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1486
1487         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1488                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1489
1490         return offset;
1491 }
1492
1493 static int
1494 winreg_dissect_DeleteKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1495 {
1496         pinfo->dcerpc_procedure_name="DeleteKey";
1497         offset = winreg_dissect_element_DeleteKey_handle(tvb, offset, pinfo, tree, drep);
1498         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1499         offset = winreg_dissect_element_DeleteKey_key(tvb, offset, pinfo, tree, drep);
1500         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1501         return offset;
1502 }
1503
1504 static int
1505 winreg_dissect_element_DeleteValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1506 {
1507         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_DeleteValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1508
1509         return offset;
1510 }
1511
1512 static int
1513 winreg_dissect_element_DeleteValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1514 {
1515         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1516
1517         return offset;
1518 }
1519
1520 static int
1521 winreg_dissect_element_DeleteValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1522 {
1523         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_DeleteValue_value,0);
1524
1525         return offset;
1526 }
1527
1528 /* IDL: WERROR winreg_DeleteValue( */
1529 /* IDL: [in] [ref] policy_handle *handle, */
1530 /* IDL: [in] winreg_String value */
1531 /* IDL: ); */
1532
1533 static int
1534 winreg_dissect_DeleteValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1535 {
1536         guint32 status;
1537
1538         pinfo->dcerpc_procedure_name="DeleteValue";
1539         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1540
1541         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1542                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1543
1544         return offset;
1545 }
1546
1547 static int
1548 winreg_dissect_DeleteValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1549 {
1550         pinfo->dcerpc_procedure_name="DeleteValue";
1551         offset = winreg_dissect_element_DeleteValue_handle(tvb, offset, pinfo, tree, drep);
1552         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1553         offset = winreg_dissect_element_DeleteValue_value(tvb, offset, pinfo, tree, drep);
1554         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1555         return offset;
1556 }
1557
1558 static int
1559 winreg_dissect_element_EnumKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1560 {
1561         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1562
1563         return offset;
1564 }
1565
1566 static int
1567 winreg_dissect_element_EnumKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1568 {
1569         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1570
1571         return offset;
1572 }
1573
1574 static int
1575 winreg_dissect_element_EnumKey_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1576 {
1577         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumKey_enum_index, 0);
1578
1579         return offset;
1580 }
1581
1582 static int
1583 winreg_dissect_element_EnumKey_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1584 {
1585         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_name_, NDR_POINTER_REF, "Pointer to Name (winreg_StringBuf)",hf_winreg_winreg_EnumKey_name);
1586
1587         return offset;
1588 }
1589
1590 static int
1591 winreg_dissect_element_EnumKey_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1592 {
1593         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumKey_name,0);
1594
1595         return offset;
1596 }
1597
1598 static int
1599 winreg_dissect_element_EnumKey_keyclass(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1600 {
1601         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_keyclass_, NDR_POINTER_UNIQUE, "Pointer to Keyclass (winreg_StringBuf)",hf_winreg_winreg_EnumKey_keyclass);
1602
1603         return offset;
1604 }
1605
1606 static int
1607 winreg_dissect_element_EnumKey_keyclass_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1608 {
1609         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumKey_keyclass,0);
1610
1611         return offset;
1612 }
1613
1614 static int
1615 winreg_dissect_element_EnumKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1616 {
1617         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumKey_last_changed_time_, NDR_POINTER_UNIQUE, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_EnumKey_last_changed_time);
1618
1619         return offset;
1620 }
1621
1622 static int
1623 winreg_dissect_element_EnumKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1624 {
1625         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumKey_last_changed_time);
1626
1627         return offset;
1628 }
1629
1630 /* IDL: WERROR winreg_EnumKey( */
1631 /* IDL: [in] [ref] policy_handle *handle, */
1632 /* IDL: [in] uint32 enum_index, */
1633 /* IDL: [out] [in] [ref] winreg_StringBuf *name, */
1634 /* IDL: [out] [in] [unique(1)] winreg_StringBuf *keyclass, */
1635 /* IDL: [out] [in] [unique(1)] NTTIME *last_changed_time */
1636 /* IDL: ); */
1637
1638 static int
1639 winreg_dissect_EnumKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1640 {
1641         guint32 status;
1642
1643         pinfo->dcerpc_procedure_name="EnumKey";
1644         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, drep);
1645         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1646
1647         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, drep);
1648         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1649
1650         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, drep);
1651         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1652
1653         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1654
1655         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1656                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1657
1658         return offset;
1659 }
1660
1661 static int
1662 winreg_dissect_EnumKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1663 {
1664         pinfo->dcerpc_procedure_name="EnumKey";
1665         offset = winreg_dissect_element_EnumKey_handle(tvb, offset, pinfo, tree, drep);
1666         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1667         offset = winreg_dissect_element_EnumKey_enum_index(tvb, offset, pinfo, tree, drep);
1668         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1669         offset = winreg_dissect_element_EnumKey_name(tvb, offset, pinfo, tree, drep);
1670         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1671         offset = winreg_dissect_element_EnumKey_keyclass(tvb, offset, pinfo, tree, drep);
1672         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1673         offset = winreg_dissect_element_EnumKey_last_changed_time(tvb, offset, pinfo, tree, drep);
1674         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1675         return offset;
1676 }
1677
1678 static int
1679 winreg_dissect_element_EnumValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1680 {
1681         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1682
1683         return offset;
1684 }
1685
1686 static int
1687 winreg_dissect_element_EnumValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1688 {
1689         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1690
1691         return offset;
1692 }
1693
1694 static int
1695 winreg_dissect_element_EnumValue_enum_index(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1696 {
1697         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_enum_index, 0);
1698
1699         return offset;
1700 }
1701
1702 static int
1703 winreg_dissect_element_EnumValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1704 {
1705         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_name_, NDR_POINTER_REF, "Pointer to Name (winreg_StringBuf)",hf_winreg_winreg_EnumValue_name);
1706
1707         return offset;
1708 }
1709
1710 static int
1711 winreg_dissect_element_EnumValue_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1712 {
1713         offset = winreg_dissect_struct_StringBuf(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_EnumValue_name,0);
1714
1715         return offset;
1716 }
1717
1718 static int
1719 winreg_dissect_element_EnumValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1720 {
1721         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_EnumValue_type);
1722
1723         return offset;
1724 }
1725
1726 static int
1727 winreg_dissect_element_EnumValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1728 {
1729         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_type, 0);
1730
1731         return offset;
1732 }
1733
1734 static int
1735 winreg_dissect_element_EnumValue_value(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1736 {
1737         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_value_, NDR_POINTER_UNIQUE, "Pointer to Value (uint8)",hf_winreg_winreg_EnumValue_value);
1738
1739         return offset;
1740 }
1741
1742 static int
1743 winreg_dissect_element_EnumValue_value_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1744 {
1745         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_value__);
1746
1747         return offset;
1748 }
1749
1750 static int
1751 winreg_dissect_element_EnumValue_value__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1752 {
1753         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_value, 0);
1754
1755         return offset;
1756 }
1757
1758 static int
1759 winreg_dissect_element_EnumValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1760 {
1761         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_size_, NDR_POINTER_UNIQUE, "Pointer to Size (uint32)",hf_winreg_winreg_EnumValue_size);
1762
1763         return offset;
1764 }
1765
1766 static int
1767 winreg_dissect_element_EnumValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1768 {
1769         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_size, 0);
1770
1771         return offset;
1772 }
1773
1774 static int
1775 winreg_dissect_element_EnumValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1776 {
1777         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_EnumValue_length_, NDR_POINTER_UNIQUE, "Pointer to Length (uint32)",hf_winreg_winreg_EnumValue_length);
1778
1779         return offset;
1780 }
1781
1782 static int
1783 winreg_dissect_element_EnumValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1784 {
1785         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_EnumValue_length, 0);
1786
1787         return offset;
1788 }
1789
1790 /* IDL: WERROR winreg_EnumValue( */
1791 /* IDL: [in] [ref] policy_handle *handle, */
1792 /* IDL: [in] uint32 enum_index, */
1793 /* IDL: [out] [in] [ref] winreg_StringBuf *name, */
1794 /* IDL: [out] [in] [unique(1)] winreg_Type *type, */
1795 /* IDL: [size_is(*size)] [length_is(*length)] [out] [in] [unique(1)] uint8 *value, */
1796 /* IDL: [out] [in] [unique(1)] uint32 *size, */
1797 /* IDL: [out] [in] [unique(1)] uint32 *length */
1798 /* IDL: ); */
1799
1800 static int
1801 winreg_dissect_EnumValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1802 {
1803         guint32 status;
1804
1805         pinfo->dcerpc_procedure_name="EnumValue";
1806         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, drep);
1807         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1808
1809         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, drep);
1810         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1811
1812         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, drep);
1813         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1814
1815         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, drep);
1816         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1817
1818         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, drep);
1819         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1820
1821         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1822
1823         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1824                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1825
1826         return offset;
1827 }
1828
1829 static int
1830 winreg_dissect_EnumValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1831 {
1832         pinfo->dcerpc_procedure_name="EnumValue";
1833         offset = winreg_dissect_element_EnumValue_handle(tvb, offset, pinfo, tree, drep);
1834         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1835         offset = winreg_dissect_element_EnumValue_enum_index(tvb, offset, pinfo, tree, drep);
1836         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1837         offset = winreg_dissect_element_EnumValue_name(tvb, offset, pinfo, tree, drep);
1838         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1839         offset = winreg_dissect_element_EnumValue_type(tvb, offset, pinfo, tree, drep);
1840         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1841         offset = winreg_dissect_element_EnumValue_value(tvb, offset, pinfo, tree, drep);
1842         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1843         offset = winreg_dissect_element_EnumValue_size(tvb, offset, pinfo, tree, drep);
1844         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1845         offset = winreg_dissect_element_EnumValue_length(tvb, offset, pinfo, tree, drep);
1846         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1847         return offset;
1848 }
1849
1850 static int
1851 winreg_dissect_element_FlushKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1852 {
1853         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_FlushKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1854
1855         return offset;
1856 }
1857
1858 static int
1859 winreg_dissect_element_FlushKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1860 {
1861         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1862
1863         return offset;
1864 }
1865
1866 /* IDL: WERROR winreg_FlushKey( */
1867 /* IDL: [in] [ref] policy_handle *handle */
1868 /* IDL: ); */
1869
1870 static int
1871 winreg_dissect_FlushKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1872 {
1873         guint32 status;
1874
1875         pinfo->dcerpc_procedure_name="FlushKey";
1876         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1877
1878         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1879                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1880
1881         return offset;
1882 }
1883
1884 static int
1885 winreg_dissect_FlushKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1886 {
1887         pinfo->dcerpc_procedure_name="FlushKey";
1888         offset = winreg_dissect_element_FlushKey_handle(tvb, offset, pinfo, tree, drep);
1889         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1890         return offset;
1891 }
1892
1893 static int
1894 winreg_dissect_element_GetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1895 {
1896         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1897
1898         return offset;
1899 }
1900
1901 static int
1902 winreg_dissect_element_GetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1903 {
1904         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1905
1906         return offset;
1907 }
1908
1909 static int
1910 winreg_dissect_element_GetKeySecurity_sec_info(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1911 {
1912                 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetKeySecurity_sec_info, NULL);
1913
1914         return offset;
1915 }
1916
1917 static int
1918 winreg_dissect_element_GetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1919 {
1920         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
1921
1922         return offset;
1923 }
1924
1925 static int
1926 winreg_dissect_element_GetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1927 {
1928         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_sd,0);
1929
1930         return offset;
1931 }
1932
1933 /* IDL: WERROR winreg_GetKeySecurity( */
1934 /* IDL: [in] [ref] policy_handle *handle, */
1935 /* IDL: [in] security_secinfo sec_info, */
1936 /* IDL: [out] [in] [ref] KeySecurityData *sd */
1937 /* IDL: ); */
1938
1939 static int
1940 winreg_dissect_GetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1941 {
1942         guint32 status;
1943
1944         pinfo->dcerpc_procedure_name="GetKeySecurity";
1945         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
1946         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1947
1948         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
1949
1950         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
1951                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
1952
1953         return offset;
1954 }
1955
1956 static int
1957 winreg_dissect_GetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1958 {
1959         pinfo->dcerpc_procedure_name="GetKeySecurity";
1960         offset = winreg_dissect_element_GetKeySecurity_handle(tvb, offset, pinfo, tree, drep);
1961         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1962         offset = winreg_dissect_element_GetKeySecurity_sec_info(tvb, offset, pinfo, tree, drep);
1963         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1964         offset = winreg_dissect_element_GetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
1965         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
1966         return offset;
1967 }
1968
1969 static int
1970 winreg_dissect_element_LoadKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1971 {
1972         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
1973
1974         return offset;
1975 }
1976
1977 static int
1978 winreg_dissect_element_LoadKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1979 {
1980         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
1981
1982         return offset;
1983 }
1984
1985 static int
1986 winreg_dissect_element_LoadKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1987 {
1988         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_keyname_, NDR_POINTER_UNIQUE, "Pointer to Keyname (winreg_String)",hf_winreg_winreg_LoadKey_keyname);
1989
1990         return offset;
1991 }
1992
1993 static int
1994 winreg_dissect_element_LoadKey_keyname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
1995 {
1996         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_LoadKey_keyname,0);
1997
1998         return offset;
1999 }
2000
2001 static int
2002 winreg_dissect_element_LoadKey_filename(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2003 {
2004         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_LoadKey_filename_, NDR_POINTER_UNIQUE, "Pointer to Filename (winreg_String)",hf_winreg_winreg_LoadKey_filename);
2005
2006         return offset;
2007 }
2008
2009 static int
2010 winreg_dissect_element_LoadKey_filename_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2011 {
2012         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_LoadKey_filename,0);
2013
2014         return offset;
2015 }
2016
2017 /* IDL: WERROR winreg_LoadKey( */
2018 /* IDL: [in] [ref] policy_handle *handle, */
2019 /* IDL: [unique(1)] [in] winreg_String *keyname, */
2020 /* IDL: [unique(1)] [in] winreg_String *filename */
2021 /* IDL: ); */
2022
2023 static int
2024 winreg_dissect_LoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2025 {
2026         guint32 status;
2027
2028         pinfo->dcerpc_procedure_name="LoadKey";
2029         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2030
2031         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2032                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2033
2034         return offset;
2035 }
2036
2037 static int
2038 winreg_dissect_LoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2039 {
2040         pinfo->dcerpc_procedure_name="LoadKey";
2041         offset = winreg_dissect_element_LoadKey_handle(tvb, offset, pinfo, tree, drep);
2042         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2043         offset = winreg_dissect_element_LoadKey_keyname(tvb, offset, pinfo, tree, drep);
2044         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2045         offset = winreg_dissect_element_LoadKey_filename(tvb, offset, pinfo, tree, drep);
2046         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2047         return offset;
2048 }
2049
2050 static int
2051 winreg_dissect_element_NotifyChangeKeyValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2052 {
2053         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_NotifyChangeKeyValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2054
2055         return offset;
2056 }
2057
2058 static int
2059 winreg_dissect_element_NotifyChangeKeyValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2060 {
2061         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2062
2063         return offset;
2064 }
2065
2066 static int
2067 winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2068 {
2069         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree, 0);
2070
2071         return offset;
2072 }
2073
2074 static int
2075 winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2076 {
2077         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_notify_filter, 0);
2078
2079         return offset;
2080 }
2081
2082 static int
2083 winreg_dissect_element_NotifyChangeKeyValue_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2084 {
2085         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown, 0);
2086
2087         return offset;
2088 }
2089
2090 static int
2091 winreg_dissect_element_NotifyChangeKeyValue_string1(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2092 {
2093         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_NotifyChangeKeyValue_string1,0);
2094
2095         return offset;
2096 }
2097
2098 static int
2099 winreg_dissect_element_NotifyChangeKeyValue_string2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2100 {
2101         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_NotifyChangeKeyValue_string2,0);
2102
2103         return offset;
2104 }
2105
2106 static int
2107 winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2108 {
2109         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_NotifyChangeKeyValue_unknown2, 0);
2110
2111         return offset;
2112 }
2113
2114 /* IDL: WERROR winreg_NotifyChangeKeyValue( */
2115 /* IDL: [in] [ref] policy_handle *handle, */
2116 /* IDL: [in] uint8 watch_subtree, */
2117 /* IDL: [in] uint32 notify_filter, */
2118 /* IDL: [in] uint32 unknown, */
2119 /* IDL: [in] winreg_String string1, */
2120 /* IDL: [in] winreg_String string2, */
2121 /* IDL: [in] uint32 unknown2 */
2122 /* IDL: ); */
2123
2124 static int
2125 winreg_dissect_NotifyChangeKeyValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2126 {
2127         guint32 status;
2128
2129         pinfo->dcerpc_procedure_name="NotifyChangeKeyValue";
2130         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2131
2132         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2133                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2134
2135         return offset;
2136 }
2137
2138 static int
2139 winreg_dissect_NotifyChangeKeyValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2140 {
2141         pinfo->dcerpc_procedure_name="NotifyChangeKeyValue";
2142         offset = winreg_dissect_element_NotifyChangeKeyValue_handle(tvb, offset, pinfo, tree, drep);
2143         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2144         offset = winreg_dissect_element_NotifyChangeKeyValue_watch_subtree(tvb, offset, pinfo, tree, drep);
2145         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2146         offset = winreg_dissect_element_NotifyChangeKeyValue_notify_filter(tvb, offset, pinfo, tree, drep);
2147         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2148         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown(tvb, offset, pinfo, tree, drep);
2149         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2150         offset = winreg_dissect_element_NotifyChangeKeyValue_string1(tvb, offset, pinfo, tree, drep);
2151         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2152         offset = winreg_dissect_element_NotifyChangeKeyValue_string2(tvb, offset, pinfo, tree, drep);
2153         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2154         offset = winreg_dissect_element_NotifyChangeKeyValue_unknown2(tvb, offset, pinfo, tree, drep);
2155         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2156         return offset;
2157 }
2158
2159 static int
2160 winreg_dissect_element_OpenKey_parent_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2161 {
2162         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenKey_parent_handle_, NDR_POINTER_REF, "Pointer to Parent Handle (policy_handle)",hf_winreg_winreg_OpenKey_parent_handle);
2163
2164         return offset;
2165 }
2166
2167 static int
2168 winreg_dissect_element_OpenKey_parent_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2169 {
2170         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_parent_handle, 0);
2171
2172         return offset;
2173 }
2174
2175 static int
2176 winreg_dissect_element_OpenKey_keyname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2177 {
2178         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_OpenKey_keyname,0);
2179
2180         return offset;
2181 }
2182
2183 static int
2184 winreg_dissect_element_OpenKey_unknown(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2185 {
2186         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_unknown, 0);
2187
2188         return offset;
2189 }
2190
2191 static int
2192 winreg_dissect_element_OpenKey_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2193 {
2194         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_OpenKey_access_mask, 0);
2195
2196         return offset;
2197 }
2198
2199 static int
2200 winreg_dissect_element_OpenKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2201 {
2202         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2203
2204         return offset;
2205 }
2206
2207 static int
2208 winreg_dissect_element_OpenKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2209 {
2210         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
2211
2212         return offset;
2213 }
2214
2215 /* IDL: WERROR winreg_OpenKey( */
2216 /* IDL: [in] [ref] policy_handle *parent_handle, */
2217 /* IDL: [in] winreg_String keyname, */
2218 /* IDL: [in] uint32 unknown, */
2219 /* IDL: [in] winreg_AccessMask access_mask, */
2220 /* IDL: [out] [ref] policy_handle *handle */
2221 /* IDL: ); */
2222
2223 static int
2224 winreg_dissect_OpenKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2225 {
2226         guint32 status;
2227
2228         pinfo->dcerpc_procedure_name="OpenKey";
2229         offset = winreg_dissect_element_OpenKey_handle(tvb, offset, pinfo, tree, drep);
2230         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2231
2232         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2233
2234         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2235                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2236
2237         return offset;
2238 }
2239
2240 static int
2241 winreg_dissect_OpenKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2242 {
2243         pinfo->dcerpc_procedure_name="OpenKey";
2244         offset = winreg_dissect_element_OpenKey_parent_handle(tvb, offset, pinfo, tree, drep);
2245         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2246         offset = winreg_dissect_element_OpenKey_keyname(tvb, offset, pinfo, tree, drep);
2247         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2248         offset = winreg_dissect_element_OpenKey_unknown(tvb, offset, pinfo, tree, drep);
2249         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2250         offset = winreg_dissect_element_OpenKey_access_mask(tvb, offset, pinfo, tree, drep);
2251         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2252         return offset;
2253 }
2254
2255 static int
2256 winreg_dissect_element_QueryInfoKey_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2257 {
2258         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2259
2260         return offset;
2261 }
2262
2263 static int
2264 winreg_dissect_element_QueryInfoKey_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2265 {
2266         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2267
2268         return offset;
2269 }
2270
2271 static int
2272 winreg_dissect_element_QueryInfoKey_class_in(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2273 {
2274         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_class_in_, NDR_POINTER_REF, "Pointer to Class In (winreg_String)",hf_winreg_winreg_QueryInfoKey_class_in);
2275
2276         return offset;
2277 }
2278
2279 static int
2280 winreg_dissect_element_QueryInfoKey_class_in_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2281 {
2282         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_QueryInfoKey_class_in,0);
2283
2284         return offset;
2285 }
2286
2287 static int
2288 winreg_dissect_element_QueryInfoKey_num_subkeys(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2289 {
2290         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_num_subkeys_, NDR_POINTER_REF, "Pointer to Num Subkeys (uint32)",hf_winreg_winreg_QueryInfoKey_num_subkeys);
2291
2292         return offset;
2293 }
2294
2295 static int
2296 winreg_dissect_element_QueryInfoKey_num_subkeys_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2297 {
2298         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_num_subkeys, 0);
2299
2300         return offset;
2301 }
2302
2303 static int
2304 winreg_dissect_element_QueryInfoKey_max_subkeylen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2305 {
2306         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_subkeylen_, NDR_POINTER_REF, "Pointer to Max Subkeylen (uint32)",hf_winreg_winreg_QueryInfoKey_max_subkeylen);
2307
2308         return offset;
2309 }
2310
2311 static int
2312 winreg_dissect_element_QueryInfoKey_max_subkeylen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2313 {
2314         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_subkeylen, 0);
2315
2316         return offset;
2317 }
2318
2319 static int
2320 winreg_dissect_element_QueryInfoKey_max_subkeysize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2321 {
2322         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_subkeysize_, NDR_POINTER_REF, "Pointer to Max Subkeysize (uint32)",hf_winreg_winreg_QueryInfoKey_max_subkeysize);
2323
2324         return offset;
2325 }
2326
2327 static int
2328 winreg_dissect_element_QueryInfoKey_max_subkeysize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2329 {
2330         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_subkeysize, 0);
2331
2332         return offset;
2333 }
2334
2335 static int
2336 winreg_dissect_element_QueryInfoKey_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2337 {
2338         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_num_values_, NDR_POINTER_REF, "Pointer to Num Values (uint32)",hf_winreg_winreg_QueryInfoKey_num_values);
2339
2340         return offset;
2341 }
2342
2343 static int
2344 winreg_dissect_element_QueryInfoKey_num_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2345 {
2346         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_num_values, 0);
2347
2348         return offset;
2349 }
2350
2351 static int
2352 winreg_dissect_element_QueryInfoKey_max_valnamelen(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2353 {
2354         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_valnamelen_, NDR_POINTER_REF, "Pointer to Max Valnamelen (uint32)",hf_winreg_winreg_QueryInfoKey_max_valnamelen);
2355
2356         return offset;
2357 }
2358
2359 static int
2360 winreg_dissect_element_QueryInfoKey_max_valnamelen_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2361 {
2362         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_valnamelen, 0);
2363
2364         return offset;
2365 }
2366
2367 static int
2368 winreg_dissect_element_QueryInfoKey_max_valbufsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2369 {
2370         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_max_valbufsize_, NDR_POINTER_REF, "Pointer to Max Valbufsize (uint32)",hf_winreg_winreg_QueryInfoKey_max_valbufsize);
2371
2372         return offset;
2373 }
2374
2375 static int
2376 winreg_dissect_element_QueryInfoKey_max_valbufsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2377 {
2378         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_max_valbufsize, 0);
2379
2380         return offset;
2381 }
2382
2383 static int
2384 winreg_dissect_element_QueryInfoKey_secdescsize(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2385 {
2386         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_secdescsize_, NDR_POINTER_REF, "Pointer to Secdescsize (uint32)",hf_winreg_winreg_QueryInfoKey_secdescsize);
2387
2388         return offset;
2389 }
2390
2391 static int
2392 winreg_dissect_element_QueryInfoKey_secdescsize_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2393 {
2394         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_secdescsize, 0);
2395
2396         return offset;
2397 }
2398
2399 static int
2400 winreg_dissect_element_QueryInfoKey_last_changed_time(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2401 {
2402         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryInfoKey_last_changed_time_, NDR_POINTER_REF, "Pointer to Last Changed Time (NTTIME)",hf_winreg_winreg_QueryInfoKey_last_changed_time);
2403
2404         return offset;
2405 }
2406
2407 static int
2408 winreg_dissect_element_QueryInfoKey_last_changed_time_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2409 {
2410         offset = dissect_ndr_nt_NTTIME(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryInfoKey_last_changed_time);
2411
2412         return offset;
2413 }
2414
2415 /* IDL: WERROR winreg_QueryInfoKey( */
2416 /* IDL: [in] [ref] policy_handle *handle, */
2417 /* IDL: [out] [in] [ref] winreg_String *class_in, */
2418 /* IDL: [out] [ref] uint32 *num_subkeys, */
2419 /* IDL: [out] [ref] uint32 *max_subkeylen, */
2420 /* IDL: [out] [ref] uint32 *max_subkeysize, */
2421 /* IDL: [out] [ref] uint32 *num_values, */
2422 /* IDL: [out] [ref] uint32 *max_valnamelen, */
2423 /* IDL: [out] [ref] uint32 *max_valbufsize, */
2424 /* IDL: [out] [ref] uint32 *secdescsize, */
2425 /* IDL: [out] [ref] NTTIME *last_changed_time */
2426 /* IDL: ); */
2427
2428 static int
2429 winreg_dissect_QueryInfoKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2430 {
2431         guint32 status;
2432
2433         pinfo->dcerpc_procedure_name="QueryInfoKey";
2434         offset = winreg_dissect_element_QueryInfoKey_class_in(tvb, offset, pinfo, tree, drep);
2435         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2436
2437         offset = winreg_dissect_element_QueryInfoKey_num_subkeys(tvb, offset, pinfo, tree, drep);
2438         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2439
2440         offset = winreg_dissect_element_QueryInfoKey_max_subkeylen(tvb, offset, pinfo, tree, drep);
2441         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2442
2443         offset = winreg_dissect_element_QueryInfoKey_max_subkeysize(tvb, offset, pinfo, tree, drep);
2444         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2445
2446         offset = winreg_dissect_element_QueryInfoKey_num_values(tvb, offset, pinfo, tree, drep);
2447         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2448
2449         offset = winreg_dissect_element_QueryInfoKey_max_valnamelen(tvb, offset, pinfo, tree, drep);
2450         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2451
2452         offset = winreg_dissect_element_QueryInfoKey_max_valbufsize(tvb, offset, pinfo, tree, drep);
2453         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2454
2455         offset = winreg_dissect_element_QueryInfoKey_secdescsize(tvb, offset, pinfo, tree, drep);
2456         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2457
2458         offset = winreg_dissect_element_QueryInfoKey_last_changed_time(tvb, offset, pinfo, tree, drep);
2459         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2460
2461         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2462
2463         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2464                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2465
2466         return offset;
2467 }
2468
2469 static int
2470 winreg_dissect_QueryInfoKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2471 {
2472         pinfo->dcerpc_procedure_name="QueryInfoKey";
2473         offset = winreg_dissect_element_QueryInfoKey_handle(tvb, offset, pinfo, tree, drep);
2474         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2475         offset = winreg_dissect_element_QueryInfoKey_class_in(tvb, offset, pinfo, tree, drep);
2476         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2477         return offset;
2478 }
2479
2480 static int
2481 winreg_dissect_element_QueryValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2482 {
2483         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2484
2485         return offset;
2486 }
2487
2488 static int
2489 winreg_dissect_element_QueryValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2490 {
2491         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2492
2493         return offset;
2494 }
2495
2496 static int
2497 winreg_dissect_element_QueryValue_value_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2498 {
2499         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_QueryValue_value_name,0);
2500
2501         return offset;
2502 }
2503
2504 static int
2505 winreg_dissect_element_QueryValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2506 {
2507         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_type_, NDR_POINTER_UNIQUE, "Pointer to Type (winreg_Type)",hf_winreg_winreg_QueryValue_type);
2508
2509         return offset;
2510 }
2511
2512 static int
2513 winreg_dissect_element_QueryValue_type_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2514 {
2515         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_type, 0);
2516
2517         return offset;
2518 }
2519
2520 static int
2521 winreg_dissect_element_QueryValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2522 {
2523         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_data_, NDR_POINTER_UNIQUE, "Pointer to Data (uint8)",hf_winreg_winreg_QueryValue_data);
2524
2525         return offset;
2526 }
2527
2528 static int
2529 winreg_dissect_element_QueryValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2530 {
2531         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_data__);
2532
2533         return offset;
2534 }
2535
2536 static int
2537 winreg_dissect_element_QueryValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2538 {
2539         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_data, 0);
2540
2541         return offset;
2542 }
2543
2544 static int
2545 winreg_dissect_element_QueryValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2546 {
2547         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_size_, NDR_POINTER_UNIQUE, "Pointer to Size (uint32)",hf_winreg_winreg_QueryValue_size);
2548
2549         return offset;
2550 }
2551
2552 static int
2553 winreg_dissect_element_QueryValue_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2554 {
2555         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_size, 0);
2556
2557         return offset;
2558 }
2559
2560 static int
2561 winreg_dissect_element_QueryValue_length(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2562 {
2563         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryValue_length_, NDR_POINTER_UNIQUE, "Pointer to Length (uint32)",hf_winreg_winreg_QueryValue_length);
2564
2565         return offset;
2566 }
2567
2568 static int
2569 winreg_dissect_element_QueryValue_length_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2570 {
2571         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryValue_length, 0);
2572
2573         return offset;
2574 }
2575
2576 /* IDL: WERROR winreg_QueryValue( */
2577 /* IDL: [in] [ref] policy_handle *handle, */
2578 /* IDL: [in] winreg_String value_name, */
2579 /* IDL: [out] [unique(1)] [in] winreg_Type *type, */
2580 /* IDL: [size_is(*size)] [length_is(*length)] [out] [unique(1)] [in] uint8 *data, */
2581 /* IDL: [out] [unique(1)] [in] uint32 *size, */
2582 /* IDL: [out] [unique(1)] [in] uint32 *length */
2583 /* IDL: ); */
2584
2585 static int
2586 winreg_dissect_QueryValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2587 {
2588         guint32 status;
2589
2590         pinfo->dcerpc_procedure_name="QueryValue";
2591         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, drep);
2592         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2593
2594         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, drep);
2595         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2596
2597         offset = winreg_dissect_element_QueryValue_size(tvb, offset, pinfo, tree, drep);
2598         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2599
2600         offset = winreg_dissect_element_QueryValue_length(tvb, offset, pinfo, tree, drep);
2601         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2602
2603         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2604
2605         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2606                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2607
2608         return offset;
2609 }
2610
2611 static int
2612 winreg_dissect_QueryValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2613 {
2614         pinfo->dcerpc_procedure_name="QueryValue";
2615         offset = winreg_dissect_element_QueryValue_handle(tvb, offset, pinfo, tree, drep);
2616         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2617         offset = winreg_dissect_element_QueryValue_value_name(tvb, offset, pinfo, tree, drep);
2618         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2619         offset = winreg_dissect_element_QueryValue_type(tvb, offset, pinfo, tree, drep);
2620         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2621         offset = winreg_dissect_element_QueryValue_data(tvb, offset, pinfo, tree, drep);
2622         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2623         offset = winreg_dissect_element_QueryValue_size(tvb, offset, pinfo, tree, drep);
2624         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2625         offset = winreg_dissect_element_QueryValue_length(tvb, offset, pinfo, tree, drep);
2626         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2627         return offset;
2628 }
2629
2630 /* IDL: WERROR winreg_ReplaceKey( */
2631 /* IDL:  */
2632 /* IDL: ); */
2633
2634 static int
2635 winreg_dissect_ReplaceKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2636 {
2637         guint32 status;
2638
2639         pinfo->dcerpc_procedure_name="ReplaceKey";
2640         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2641
2642         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2643                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2644
2645         return offset;
2646 }
2647
2648 static int
2649 winreg_dissect_ReplaceKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2650 {
2651         pinfo->dcerpc_procedure_name="ReplaceKey";
2652         return offset;
2653 }
2654
2655 /* IDL: WERROR winreg_RestoreKey( */
2656 /* IDL:  */
2657 /* IDL: ); */
2658
2659 static int
2660 winreg_dissect_RestoreKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2661 {
2662         guint32 status;
2663
2664         pinfo->dcerpc_procedure_name="RestoreKey";
2665         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2666
2667         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2668                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2669
2670         return offset;
2671 }
2672
2673 static int
2674 winreg_dissect_RestoreKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2675 {
2676         pinfo->dcerpc_procedure_name="RestoreKey";
2677         return offset;
2678 }
2679
2680 /* IDL: WERROR winreg_SaveKey( */
2681 /* IDL:  */
2682 /* IDL: ); */
2683
2684 static int
2685 winreg_dissect_SaveKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2686 {
2687         guint32 status;
2688
2689         pinfo->dcerpc_procedure_name="SaveKey";
2690         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2691
2692         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2693                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2694
2695         return offset;
2696 }
2697
2698 static int
2699 winreg_dissect_SaveKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2700 {
2701         pinfo->dcerpc_procedure_name="SaveKey";
2702         return offset;
2703 }
2704
2705 static int
2706 winreg_dissect_element_SetKeySecurity_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2707 {
2708         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetKeySecurity_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2709
2710         return offset;
2711 }
2712
2713 static int
2714 winreg_dissect_element_SetKeySecurity_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2715 {
2716         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2717
2718         return offset;
2719 }
2720
2721 static int
2722 winreg_dissect_element_SetKeySecurity_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2723 {
2724         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetKeySecurity_access_mask, 0);
2725
2726         return offset;
2727 }
2728
2729 static int
2730 winreg_dissect_element_SetKeySecurity_sd(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2731 {
2732         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetKeySecurity_sd_, NDR_POINTER_REF, "Pointer to Sd (KeySecurityData)",hf_winreg_sd);
2733
2734         return offset;
2735 }
2736
2737 static int
2738 winreg_dissect_element_SetKeySecurity_sd_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2739 {
2740         offset = winreg_dissect_struct_KeySecurityData(tvb,offset,pinfo,tree,drep,hf_winreg_sd,0);
2741
2742         return offset;
2743 }
2744
2745 /* IDL: WERROR winreg_SetKeySecurity( */
2746 /* IDL: [in] [ref] policy_handle *handle, */
2747 /* IDL: [in] winreg_AccessMask access_mask, */
2748 /* IDL: [out] [in] [ref] KeySecurityData *sd */
2749 /* IDL: ); */
2750
2751 static int
2752 winreg_dissect_SetKeySecurity_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2753 {
2754         guint32 status;
2755
2756         pinfo->dcerpc_procedure_name="SetKeySecurity";
2757         offset = winreg_dissect_element_SetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
2758         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2759
2760         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2761
2762         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2763                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2764
2765         return offset;
2766 }
2767
2768 static int
2769 winreg_dissect_SetKeySecurity_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2770 {
2771         pinfo->dcerpc_procedure_name="SetKeySecurity";
2772         offset = winreg_dissect_element_SetKeySecurity_handle(tvb, offset, pinfo, tree, drep);
2773         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2774         offset = winreg_dissect_element_SetKeySecurity_access_mask(tvb, offset, pinfo, tree, drep);
2775         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2776         offset = winreg_dissect_element_SetKeySecurity_sd(tvb, offset, pinfo, tree, drep);
2777         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2778         return offset;
2779 }
2780
2781 static int
2782 winreg_dissect_element_SetValue_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2783 {
2784         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
2785
2786         return offset;
2787 }
2788
2789 static int
2790 winreg_dissect_element_SetValue_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2791 {
2792         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
2793
2794         return offset;
2795 }
2796
2797 static int
2798 winreg_dissect_element_SetValue_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2799 {
2800         offset = winreg_dissect_struct_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_SetValue_name,0);
2801
2802         return offset;
2803 }
2804
2805 static int
2806 winreg_dissect_element_SetValue_type(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2807 {
2808         offset = winreg_dissect_enum_Type(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_type, 0);
2809
2810         return offset;
2811 }
2812
2813 static int
2814 winreg_dissect_element_SetValue_data(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2815 {
2816         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_data_, NDR_POINTER_REF, "Pointer to Data (uint8)",hf_winreg_winreg_SetValue_data);
2817
2818         return offset;
2819 }
2820
2821 static int
2822 winreg_dissect_element_SetValue_data_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2823 {
2824         offset = dissect_ndr_ucarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_SetValue_data__);
2825
2826         return offset;
2827 }
2828
2829 static int
2830 winreg_dissect_element_SetValue_data__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2831 {
2832         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_data, 0);
2833
2834         return offset;
2835 }
2836
2837 static int
2838 winreg_dissect_element_SetValue_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2839 {
2840         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_SetValue_size, 0);
2841
2842         return offset;
2843 }
2844
2845 /* IDL: WERROR winreg_SetValue( */
2846 /* IDL: [in] [ref] policy_handle *handle, */
2847 /* IDL: [in] winreg_String name, */
2848 /* IDL: [in] winreg_Type type, */
2849 /* IDL: [size_is(size)] [in] [ref] uint8 *data, */
2850 /* IDL: [in] uint32 size */
2851 /* IDL: ); */
2852
2853 static int
2854 winreg_dissect_SetValue_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2855 {
2856         guint32 status;
2857
2858         pinfo->dcerpc_procedure_name="SetValue";
2859         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2860
2861         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2862                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2863
2864         return offset;
2865 }
2866
2867 static int
2868 winreg_dissect_SetValue_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2869 {
2870         pinfo->dcerpc_procedure_name="SetValue";
2871         offset = winreg_dissect_element_SetValue_handle(tvb, offset, pinfo, tree, drep);
2872         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2873         offset = winreg_dissect_element_SetValue_name(tvb, offset, pinfo, tree, drep);
2874         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2875         offset = winreg_dissect_element_SetValue_type(tvb, offset, pinfo, tree, drep);
2876         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2877         offset = winreg_dissect_element_SetValue_data(tvb, offset, pinfo, tree, drep);
2878         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2879         offset = winreg_dissect_element_SetValue_size(tvb, offset, pinfo, tree, drep);
2880         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2881         return offset;
2882 }
2883
2884 /* IDL: WERROR winreg_UnLoadKey( */
2885 /* IDL:  */
2886 /* IDL: ); */
2887
2888 static int
2889 winreg_dissect_UnLoadKey_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2890 {
2891         guint32 status;
2892
2893         pinfo->dcerpc_procedure_name="UnLoadKey";
2894         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2895
2896         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2897                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2898
2899         return offset;
2900 }
2901
2902 static int
2903 winreg_dissect_UnLoadKey_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2904 {
2905         pinfo->dcerpc_procedure_name="UnLoadKey";
2906         return offset;
2907 }
2908
2909 static int
2910 winreg_dissect_element_InitiateSystemShutdown_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2911 {
2912         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdown_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdown_hostname);
2913
2914         return offset;
2915 }
2916
2917 static int
2918 winreg_dissect_element_InitiateSystemShutdown_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2919 {
2920         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_hostname, 0);
2921
2922         return offset;
2923 }
2924
2925 static int
2926 winreg_dissect_element_InitiateSystemShutdown_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2927 {
2928         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdown_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_winreg_winreg_InitiateSystemShutdown_message);
2929
2930         return offset;
2931 }
2932
2933 static int
2934 winreg_dissect_element_InitiateSystemShutdown_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2935 {
2936         offset = winreg_dissect_struct_initshutdown_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_InitiateSystemShutdown_message,0);
2937
2938         return offset;
2939 }
2940
2941 static int
2942 winreg_dissect_element_InitiateSystemShutdown_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2943 {
2944         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_timeout, 0);
2945
2946         return offset;
2947 }
2948
2949 static int
2950 winreg_dissect_element_InitiateSystemShutdown_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2951 {
2952         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_force_apps, 0);
2953
2954         return offset;
2955 }
2956
2957 static int
2958 winreg_dissect_element_InitiateSystemShutdown_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2959 {
2960         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdown_reboot, 0);
2961
2962         return offset;
2963 }
2964
2965 /* IDL: WERROR winreg_InitiateSystemShutdown( */
2966 /* IDL: [unique(1)] [in] uint16 *hostname, */
2967 /* IDL: [unique(1)] [in] initshutdown_String *message, */
2968 /* IDL: [in] uint32 timeout, */
2969 /* IDL: [in] uint8 force_apps, */
2970 /* IDL: [in] uint8 reboot */
2971 /* IDL: ); */
2972
2973 static int
2974 winreg_dissect_InitiateSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2975 {
2976         guint32 status;
2977
2978         pinfo->dcerpc_procedure_name="InitiateSystemShutdown";
2979         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
2980
2981         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
2982                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
2983
2984         return offset;
2985 }
2986
2987 static int
2988 winreg_dissect_InitiateSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
2989 {
2990         pinfo->dcerpc_procedure_name="InitiateSystemShutdown";
2991         offset = winreg_dissect_element_InitiateSystemShutdown_hostname(tvb, offset, pinfo, tree, drep);
2992         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2993         offset = winreg_dissect_element_InitiateSystemShutdown_message(tvb, offset, pinfo, tree, drep);
2994         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2995         offset = winreg_dissect_element_InitiateSystemShutdown_timeout(tvb, offset, pinfo, tree, drep);
2996         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2997         offset = winreg_dissect_element_InitiateSystemShutdown_force_apps(tvb, offset, pinfo, tree, drep);
2998         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
2999         offset = winreg_dissect_element_InitiateSystemShutdown_reboot(tvb, offset, pinfo, tree, drep);
3000         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3001         return offset;
3002 }
3003
3004 static int
3005 winreg_dissect_element_AbortSystemShutdown_server(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3006 {
3007         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_AbortSystemShutdown_server_, NDR_POINTER_UNIQUE, "Pointer to Server (uint16)",hf_winreg_winreg_AbortSystemShutdown_server);
3008
3009         return offset;
3010 }
3011
3012 static int
3013 winreg_dissect_element_AbortSystemShutdown_server_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3014 {
3015         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_AbortSystemShutdown_server, 0);
3016
3017         return offset;
3018 }
3019
3020 /* IDL: WERROR winreg_AbortSystemShutdown( */
3021 /* IDL: [unique(1)] [in] uint16 *server */
3022 /* IDL: ); */
3023
3024 static int
3025 winreg_dissect_AbortSystemShutdown_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3026 {
3027         guint32 status;
3028
3029         pinfo->dcerpc_procedure_name="AbortSystemShutdown";
3030         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3031
3032         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3033                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3034
3035         return offset;
3036 }
3037
3038 static int
3039 winreg_dissect_AbortSystemShutdown_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3040 {
3041         pinfo->dcerpc_procedure_name="AbortSystemShutdown";
3042         offset = winreg_dissect_element_AbortSystemShutdown_server(tvb, offset, pinfo, tree, drep);
3043         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3044         return offset;
3045 }
3046
3047 static int
3048 winreg_dissect_element_GetVersion_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3049 {
3050         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetVersion_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3051
3052         return offset;
3053 }
3054
3055 static int
3056 winreg_dissect_element_GetVersion_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3057 {
3058         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, 0);
3059
3060         return offset;
3061 }
3062
3063 static int
3064 winreg_dissect_element_GetVersion_version(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3065 {
3066         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_GetVersion_version_, NDR_POINTER_REF, "Pointer to Version (uint32)",hf_winreg_winreg_GetVersion_version);
3067
3068         return offset;
3069 }
3070
3071 static int
3072 winreg_dissect_element_GetVersion_version_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3073 {
3074         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_GetVersion_version, 0);
3075
3076         return offset;
3077 }
3078
3079 /* IDL: WERROR winreg_GetVersion( */
3080 /* IDL: [in] [ref] policy_handle *handle, */
3081 /* IDL: [out] [ref] uint32 *version */
3082 /* IDL: ); */
3083
3084 static int
3085 winreg_dissect_GetVersion_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3086 {
3087         guint32 status;
3088
3089         pinfo->dcerpc_procedure_name="GetVersion";
3090         offset = winreg_dissect_element_GetVersion_version(tvb, offset, pinfo, tree, drep);
3091         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3092
3093         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3094
3095         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3096                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3097
3098         return offset;
3099 }
3100
3101 static int
3102 winreg_dissect_GetVersion_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3103 {
3104         pinfo->dcerpc_procedure_name="GetVersion";
3105         offset = winreg_dissect_element_GetVersion_handle(tvb, offset, pinfo, tree, drep);
3106         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3107         return offset;
3108 }
3109
3110 static int
3111 winreg_dissect_element_OpenHKCC_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3112 {
3113         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCC_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3114
3115         return offset;
3116 }
3117
3118 static int
3119 winreg_dissect_element_OpenHKCC_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3120 {
3121         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3122
3123         return offset;
3124 }
3125
3126 static int
3127 winreg_dissect_element_OpenHKCC_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3128 {
3129         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3130
3131         return offset;
3132 }
3133
3134 static int
3135 winreg_dissect_element_OpenHKCC_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3136 {
3137         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKCC_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3138
3139         return offset;
3140 }
3141
3142 static int
3143 winreg_dissect_element_OpenHKCC_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3144 {
3145         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3146
3147         return offset;
3148 }
3149
3150 /* IDL: WERROR winreg_OpenHKCC( */
3151 /* IDL: [unique(1)] [in] uint16 *system_name, */
3152 /* IDL: [in] winreg_AccessMask access_mask, */
3153 /* IDL: [out] [ref] policy_handle *handle */
3154 /* IDL: ); */
3155
3156 static int
3157 winreg_dissect_OpenHKCC_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3158 {
3159         guint32 status;
3160
3161         pinfo->dcerpc_procedure_name="OpenHKCC";
3162         offset = winreg_dissect_element_OpenHKCC_handle(tvb, offset, pinfo, tree, drep);
3163         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3164
3165         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3166
3167         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3168                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3169
3170         return offset;
3171 }
3172
3173 static int
3174 winreg_dissect_OpenHKCC_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3175 {
3176         pinfo->dcerpc_procedure_name="OpenHKCC";
3177         offset = winreg_dissect_element_OpenHKCC_system_name(tvb, offset, pinfo, tree, drep);
3178         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3179         offset = winreg_dissect_element_OpenHKCC_access_mask(tvb, offset, pinfo, tree, drep);
3180         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3181         return offset;
3182 }
3183
3184 static int
3185 winreg_dissect_element_OpenHKDD_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3186 {
3187         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKDD_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3188
3189         return offset;
3190 }
3191
3192 static int
3193 winreg_dissect_element_OpenHKDD_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3194 {
3195         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3196
3197         return offset;
3198 }
3199
3200 static int
3201 winreg_dissect_element_OpenHKDD_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3202 {
3203         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3204
3205         return offset;
3206 }
3207
3208 static int
3209 winreg_dissect_element_OpenHKDD_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3210 {
3211         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKDD_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3212
3213         return offset;
3214 }
3215
3216 static int
3217 winreg_dissect_element_OpenHKDD_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3218 {
3219         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3220
3221         return offset;
3222 }
3223
3224 /* IDL: WERROR winreg_OpenHKDD( */
3225 /* IDL: [unique(1)] [in] uint16 *system_name, */
3226 /* IDL: [in] winreg_AccessMask access_mask, */
3227 /* IDL: [out] [ref] policy_handle *handle */
3228 /* IDL: ); */
3229
3230 static int
3231 winreg_dissect_OpenHKDD_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3232 {
3233         guint32 status;
3234
3235         pinfo->dcerpc_procedure_name="OpenHKDD";
3236         offset = winreg_dissect_element_OpenHKDD_handle(tvb, offset, pinfo, tree, drep);
3237         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3238
3239         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3240
3241         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3242                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3243
3244         return offset;
3245 }
3246
3247 static int
3248 winreg_dissect_OpenHKDD_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3249 {
3250         pinfo->dcerpc_procedure_name="OpenHKDD";
3251         offset = winreg_dissect_element_OpenHKDD_system_name(tvb, offset, pinfo, tree, drep);
3252         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3253         offset = winreg_dissect_element_OpenHKDD_access_mask(tvb, offset, pinfo, tree, drep);
3254         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3255         return offset;
3256 }
3257
3258 static int
3259 winreg_dissect_element_QueryMultipleValues_key_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3260 {
3261         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_key_handle_, NDR_POINTER_REF, "Pointer to Key Handle (policy_handle)",hf_winreg_winreg_QueryMultipleValues_key_handle);
3262
3263         return offset;
3264 }
3265
3266 static int
3267 winreg_dissect_element_QueryMultipleValues_key_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3268 {
3269         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_key_handle, 0);
3270
3271         return offset;
3272 }
3273
3274 static int
3275 winreg_dissect_element_QueryMultipleValues_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3276 {
3277         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_values_, NDR_POINTER_REF, "Pointer to Values (QueryMultipleValue)",hf_winreg_winreg_QueryMultipleValues_values);
3278
3279         return offset;
3280 }
3281
3282 static int
3283 winreg_dissect_element_QueryMultipleValues_values_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3284 {
3285         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_values__);
3286
3287         return offset;
3288 }
3289
3290 static int
3291 winreg_dissect_element_QueryMultipleValues_values__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3292 {
3293         offset = winreg_dissect_struct_QueryMultipleValue(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_QueryMultipleValues_values,0);
3294
3295         return offset;
3296 }
3297
3298 static int
3299 winreg_dissect_element_QueryMultipleValues_num_values(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3300 {
3301         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_num_values, 0);
3302
3303         return offset;
3304 }
3305
3306 static int
3307 winreg_dissect_element_QueryMultipleValues_buffer(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3308 {
3309         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer_, NDR_POINTER_UNIQUE, "Pointer to Buffer (uint8)",hf_winreg_winreg_QueryMultipleValues_buffer);
3310
3311         return offset;
3312 }
3313
3314 static int
3315 winreg_dissect_element_QueryMultipleValues_buffer_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3316 {
3317         offset = dissect_ndr_ucvarray(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer__);
3318
3319         return offset;
3320 }
3321
3322 static int
3323 winreg_dissect_element_QueryMultipleValues_buffer__(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3324 {
3325         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_buffer, 0);
3326
3327         return offset;
3328 }
3329
3330 static int
3331 winreg_dissect_element_QueryMultipleValues_buffer_size(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3332 {
3333         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_QueryMultipleValues_buffer_size_, NDR_POINTER_REF, "Pointer to Buffer Size (uint32)",hf_winreg_winreg_QueryMultipleValues_buffer_size);
3334
3335         return offset;
3336 }
3337
3338 static int
3339 winreg_dissect_element_QueryMultipleValues_buffer_size_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3340 {
3341         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_QueryMultipleValues_buffer_size, 0);
3342
3343         return offset;
3344 }
3345
3346 /* IDL: WERROR winreg_QueryMultipleValues( */
3347 /* IDL: [in] [ref] policy_handle *key_handle, */
3348 /* IDL: [size_is(num_values)] [length_is(num_values)] [out] [in] [ref] QueryMultipleValue *values, */
3349 /* IDL: [in] uint32 num_values, */
3350 /* IDL: [size_is(*buffer_size)] [length_is(*buffer_size)] [out] [unique(1)] [in] uint8 *buffer, */
3351 /* IDL: [out] [in] [ref] uint32 *buffer_size */
3352 /* IDL: ); */
3353
3354 static int
3355 winreg_dissect_QueryMultipleValues_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3356 {
3357         guint32 status;
3358
3359         pinfo->dcerpc_procedure_name="QueryMultipleValues";
3360         offset = winreg_dissect_element_QueryMultipleValues_values(tvb, offset, pinfo, tree, drep);
3361         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3362
3363         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, drep);
3364         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3365
3366         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, drep);
3367         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3368
3369         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3370
3371         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3372                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3373
3374         return offset;
3375 }
3376
3377 static int
3378 winreg_dissect_QueryMultipleValues_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3379 {
3380         pinfo->dcerpc_procedure_name="QueryMultipleValues";
3381         offset = winreg_dissect_element_QueryMultipleValues_key_handle(tvb, offset, pinfo, tree, drep);
3382         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3383         offset = winreg_dissect_element_QueryMultipleValues_values(tvb, offset, pinfo, tree, drep);
3384         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3385         offset = winreg_dissect_element_QueryMultipleValues_num_values(tvb, offset, pinfo, tree, drep);
3386         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3387         offset = winreg_dissect_element_QueryMultipleValues_buffer(tvb, offset, pinfo, tree, drep);
3388         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3389         offset = winreg_dissect_element_QueryMultipleValues_buffer_size(tvb, offset, pinfo, tree, drep);
3390         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3391         return offset;
3392 }
3393
3394 static int
3395 winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3396 {
3397         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdownEx_hostname_, NDR_POINTER_UNIQUE, "Pointer to Hostname (uint16)",hf_winreg_winreg_InitiateSystemShutdownEx_hostname);
3398
3399         return offset;
3400 }
3401
3402 static int
3403 winreg_dissect_element_InitiateSystemShutdownEx_hostname_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3404 {
3405         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_hostname, 0);
3406
3407         return offset;
3408 }
3409
3410 static int
3411 winreg_dissect_element_InitiateSystemShutdownEx_message(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3412 {
3413         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_InitiateSystemShutdownEx_message_, NDR_POINTER_UNIQUE, "Pointer to Message (initshutdown_String)",hf_winreg_winreg_InitiateSystemShutdownEx_message);
3414
3415         return offset;
3416 }
3417
3418 static int
3419 winreg_dissect_element_InitiateSystemShutdownEx_message_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3420 {
3421         offset = winreg_dissect_struct_initshutdown_String(tvb,offset,pinfo,tree,drep,hf_winreg_winreg_InitiateSystemShutdownEx_message,0);
3422
3423         return offset;
3424 }
3425
3426 static int
3427 winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3428 {
3429         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_timeout, 0);
3430
3431         return offset;
3432 }
3433
3434 static int
3435 winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3436 {
3437         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_force_apps, 0);
3438
3439         return offset;
3440 }
3441
3442 static int
3443 winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3444 {
3445         offset = PIDL_dissect_uint8(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_reboot, 0);
3446
3447         return offset;
3448 }
3449
3450 static int
3451 winreg_dissect_element_InitiateSystemShutdownEx_reason(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3452 {
3453         offset = PIDL_dissect_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_winreg_InitiateSystemShutdownEx_reason, 0);
3454
3455         return offset;
3456 }
3457
3458 /* IDL: WERROR winreg_InitiateSystemShutdownEx( */
3459 /* IDL: [unique(1)] [in] uint16 *hostname, */
3460 /* IDL: [unique(1)] [in] initshutdown_String *message, */
3461 /* IDL: [in] uint32 timeout, */
3462 /* IDL: [in] uint8 force_apps, */
3463 /* IDL: [in] uint8 reboot, */
3464 /* IDL: [in] uint32 reason */
3465 /* IDL: ); */
3466
3467 static int
3468 winreg_dissect_InitiateSystemShutdownEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3469 {
3470         guint32 status;
3471
3472         pinfo->dcerpc_procedure_name="InitiateSystemShutdownEx";
3473         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3474
3475         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3476                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3477
3478         return offset;
3479 }
3480
3481 static int
3482 winreg_dissect_InitiateSystemShutdownEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3483 {
3484         pinfo->dcerpc_procedure_name="InitiateSystemShutdownEx";
3485         offset = winreg_dissect_element_InitiateSystemShutdownEx_hostname(tvb, offset, pinfo, tree, drep);
3486         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3487         offset = winreg_dissect_element_InitiateSystemShutdownEx_message(tvb, offset, pinfo, tree, drep);
3488         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3489         offset = winreg_dissect_element_InitiateSystemShutdownEx_timeout(tvb, offset, pinfo, tree, drep);
3490         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3491         offset = winreg_dissect_element_InitiateSystemShutdownEx_force_apps(tvb, offset, pinfo, tree, drep);
3492         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3493         offset = winreg_dissect_element_InitiateSystemShutdownEx_reboot(tvb, offset, pinfo, tree, drep);
3494         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3495         offset = winreg_dissect_element_InitiateSystemShutdownEx_reason(tvb, offset, pinfo, tree, drep);
3496         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3497         return offset;
3498 }
3499
3500 /* IDL: WERROR winreg_SaveKeyEx( */
3501 /* IDL:  */
3502 /* IDL: ); */
3503
3504 static int
3505 winreg_dissect_SaveKeyEx_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3506 {
3507         guint32 status;
3508
3509         pinfo->dcerpc_procedure_name="SaveKeyEx";
3510         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3511
3512         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3513                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3514
3515         return offset;
3516 }
3517
3518 static int
3519 winreg_dissect_SaveKeyEx_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3520 {
3521         pinfo->dcerpc_procedure_name="SaveKeyEx";
3522         return offset;
3523 }
3524
3525 static int
3526 winreg_dissect_element_OpenHKPT_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3527 {
3528         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPT_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3529
3530         return offset;
3531 }
3532
3533 static int
3534 winreg_dissect_element_OpenHKPT_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3535 {
3536         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3537
3538         return offset;
3539 }
3540
3541 static int
3542 winreg_dissect_element_OpenHKPT_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3543 {
3544         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3545
3546         return offset;
3547 }
3548
3549 static int
3550 winreg_dissect_element_OpenHKPT_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3551 {
3552         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPT_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3553
3554         return offset;
3555 }
3556
3557 static int
3558 winreg_dissect_element_OpenHKPT_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3559 {
3560         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3561
3562         return offset;
3563 }
3564
3565 /* IDL: WERROR winreg_OpenHKPT( */
3566 /* IDL: [unique(1)] [in] uint16 *system_name, */
3567 /* IDL: [in] winreg_AccessMask access_mask, */
3568 /* IDL: [out] [ref] policy_handle *handle */
3569 /* IDL: ); */
3570
3571 static int
3572 winreg_dissect_OpenHKPT_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3573 {
3574         guint32 status;
3575
3576         pinfo->dcerpc_procedure_name="OpenHKPT";
3577         offset = winreg_dissect_element_OpenHKPT_handle(tvb, offset, pinfo, tree, drep);
3578         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3579
3580         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3581
3582         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3583                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3584
3585         return offset;
3586 }
3587
3588 static int
3589 winreg_dissect_OpenHKPT_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3590 {
3591         pinfo->dcerpc_procedure_name="OpenHKPT";
3592         offset = winreg_dissect_element_OpenHKPT_system_name(tvb, offset, pinfo, tree, drep);
3593         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3594         offset = winreg_dissect_element_OpenHKPT_access_mask(tvb, offset, pinfo, tree, drep);
3595         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3596         return offset;
3597 }
3598
3599 static int
3600 winreg_dissect_element_OpenHKPN_system_name(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3601 {
3602         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPN_system_name_, NDR_POINTER_UNIQUE, "Pointer to System Name (uint16)",hf_winreg_system_name);
3603
3604         return offset;
3605 }
3606
3607 static int
3608 winreg_dissect_element_OpenHKPN_system_name_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3609 {
3610         offset = PIDL_dissect_uint16(tvb, offset, pinfo, tree, drep, hf_winreg_system_name, 0);
3611
3612         return offset;
3613 }
3614
3615 static int
3616 winreg_dissect_element_OpenHKPN_access_mask(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3617 {
3618         offset = winreg_dissect_bitmap_AccessMask(tvb, offset, pinfo, tree, drep, hf_winreg_access_mask, 0);
3619
3620         return offset;
3621 }
3622
3623 static int
3624 winreg_dissect_element_OpenHKPN_handle(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3625 {
3626         offset = dissect_ndr_toplevel_pointer(tvb, offset, pinfo, tree, drep, winreg_dissect_element_OpenHKPN_handle_, NDR_POINTER_REF, "Pointer to Handle (policy_handle)",hf_winreg_handle);
3627
3628         return offset;
3629 }
3630
3631 static int
3632 winreg_dissect_element_OpenHKPN_handle_(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3633 {
3634         offset = PIDL_dissect_policy_hnd(tvb, offset, pinfo, tree, drep, hf_winreg_handle, PIDL_POLHND_OPEN);
3635
3636         return offset;
3637 }
3638
3639 /* IDL: WERROR winreg_OpenHKPN( */
3640 /* IDL: [unique(1)] [in] uint16 *system_name, */
3641 /* IDL: [in] winreg_AccessMask access_mask, */
3642 /* IDL: [out] [ref] policy_handle *handle */
3643 /* IDL: ); */
3644
3645 static int
3646 winreg_dissect_OpenHKPN_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3647 {
3648         guint32 status;
3649
3650         pinfo->dcerpc_procedure_name="OpenHKPN";
3651         offset = winreg_dissect_element_OpenHKPN_handle(tvb, offset, pinfo, tree, drep);
3652         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3653
3654         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3655
3656         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3657                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3658
3659         return offset;
3660 }
3661
3662 static int
3663 winreg_dissect_OpenHKPN_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3664 {
3665         pinfo->dcerpc_procedure_name="OpenHKPN";
3666         offset = winreg_dissect_element_OpenHKPN_system_name(tvb, offset, pinfo, tree, drep);
3667         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3668         offset = winreg_dissect_element_OpenHKPN_access_mask(tvb, offset, pinfo, tree, drep);
3669         offset = dissect_deferred_pointers(pinfo, tvb, offset, drep);
3670         return offset;
3671 }
3672
3673 /* IDL: WERROR winreg_QueryMultipleValues2( */
3674 /* IDL:  */
3675 /* IDL: ); */
3676
3677 static int
3678 winreg_dissect_QueryMultipleValues2_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3679 {
3680         guint32 status;
3681
3682         pinfo->dcerpc_procedure_name="QueryMultipleValues2";
3683         offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep, hf_winreg_werror, &status);
3684
3685         if (status != 0 && check_col(pinfo->cinfo, COL_INFO))
3686                 col_append_fstr(pinfo->cinfo, COL_INFO, ", Error: %s", val_to_str(status, WERR_errors, "Unknown DOS error 0x%08x"));
3687
3688         return offset;
3689 }
3690
3691 static int
3692 winreg_dissect_QueryMultipleValues2_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)
3693 {
3694         pinfo->dcerpc_procedure_name="QueryMultipleValues2";
3695         return offset;
3696 }
3697
3698
3699 static dcerpc_sub_dissector winreg_dissectors[] = {
3700         { 0, "OpenHKCR",
3701            winreg_dissect_OpenHKCR_request, winreg_dissect_OpenHKCR_response},
3702         { 1, "OpenHKCU",
3703            winreg_dissect_OpenHKCU_request, winreg_dissect_OpenHKCU_response},
3704         { 2, "OpenHKLM",
3705            winreg_dissect_OpenHKLM_request, winreg_dissect_OpenHKLM_response},
3706         { 3, "OpenHKPD",
3707            winreg_dissect_OpenHKPD_request, winreg_dissect_OpenHKPD_response},
3708         { 4, "OpenHKU",
3709            winreg_dissect_OpenHKU_request, winreg_dissect_OpenHKU_response},
3710         { 5, "CloseKey",
3711            winreg_dissect_CloseKey_request, winreg_dissect_CloseKey_response},
3712         { 6, "CreateKey",
3713            winreg_dissect_CreateKey_request, winreg_dissect_CreateKey_response},
3714         { 7, "DeleteKey",
3715            winreg_dissect_DeleteKey_request, winreg_dissect_DeleteKey_response},
3716         { 8, "DeleteValue",
3717            winreg_dissect_DeleteValue_request, winreg_dissect_DeleteValue_response},
3718         { 9, "EnumKey",
3719            winreg_dissect_EnumKey_request, winreg_dissect_EnumKey_response},
3720         { 10, "EnumValue",
3721            winreg_dissect_EnumValue_request, winreg_dissect_EnumValue_response},
3722         { 11, "FlushKey",
3723            winreg_dissect_FlushKey_request, winreg_dissect_FlushKey_response},
3724         { 12, "GetKeySecurity",
3725            winreg_dissect_GetKeySecurity_request, winreg_dissect_GetKeySecurity_response},
3726         { 13, "LoadKey",
3727            winreg_dissect_LoadKey_request, winreg_dissect_LoadKey_response},
3728         { 14, "NotifyChangeKeyValue",
3729            winreg_dissect_NotifyChangeKeyValue_request, winreg_dissect_NotifyChangeKeyValue_response},
3730         { 15, "OpenKey",
3731            winreg_dissect_OpenKey_request, winreg_dissect_OpenKey_response},
3732         { 16, "QueryInfoKey",
3733            winreg_dissect_QueryInfoKey_request, winreg_dissect_QueryInfoKey_response},
3734         { 17, "QueryValue",
3735            winreg_dissect_QueryValue_request, winreg_dissect_QueryValue_response},
3736         { 18, "ReplaceKey",
3737            winreg_dissect_ReplaceKey_request, winreg_dissect_ReplaceKey_response},
3738         { 19, "RestoreKey",
3739            winreg_dissect_RestoreKey_request, winreg_dissect_RestoreKey_response},
3740         { 20, "SaveKey",
3741            winreg_dissect_SaveKey_request, winreg_dissect_SaveKey_response},
3742         { 21, "SetKeySecurity",
3743            winreg_dissect_SetKeySecurity_request, winreg_dissect_SetKeySecurity_response},
3744         { 22, "SetValue",
3745            winreg_dissect_SetValue_request, winreg_dissect_SetValue_response},
3746         { 23, "UnLoadKey",
3747            winreg_dissect_UnLoadKey_request, winreg_dissect_UnLoadKey_response},
3748         { 24, "InitiateSystemShutdown",
3749            winreg_dissect_InitiateSystemShutdown_request, winreg_dissect_InitiateSystemShutdown_response},
3750         { 25, "AbortSystemShutdown",
3751            winreg_dissect_AbortSystemShutdown_request, winreg_dissect_AbortSystemShutdown_response},
3752         { 26, "GetVersion",
3753            winreg_dissect_GetVersion_request, winreg_dissect_GetVersion_response},
3754         { 27, "OpenHKCC",
3755            winreg_dissect_OpenHKCC_request, winreg_dissect_OpenHKCC_response},
3756         { 28, "OpenHKDD",
3757            winreg_dissect_OpenHKDD_request, winreg_dissect_OpenHKDD_response},
3758         { 29, "QueryMultipleValues",
3759            winreg_dissect_QueryMultipleValues_request, winreg_dissect_QueryMultipleValues_response},
3760         { 30, "InitiateSystemShutdownEx",
3761            winreg_dissect_InitiateSystemShutdownEx_request, winreg_dissect_InitiateSystemShutdownEx_response},
3762         { 31, "SaveKeyEx",
3763            winreg_dissect_SaveKeyEx_request, winreg_dissect_SaveKeyEx_response},
3764         { 32, "OpenHKPT",
3765            winreg_dissect_OpenHKPT_request, winreg_dissect_OpenHKPT_response},
3766         { 33, "OpenHKPN",
3767            winreg_dissect_OpenHKPN_request, winreg_dissect_OpenHKPN_response},
3768         { 34, "QueryMultipleValues2",
3769            winreg_dissect_QueryMultipleValues2_request, winreg_dissect_QueryMultipleValues2_response},
3770         { 0, NULL, NULL, NULL }
3771 };
3772
3773 void proto_register_dcerpc_winreg(void)
3774 {
3775         static hf_register_info hf[] = {
3776         { &hf_winreg_winreg_QueryInfoKey_max_valbufsize, 
3777           { "Max Valbufsize", "winreg.winreg_QueryInfoKey.max_valbufsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3778         { &hf_winreg_winreg_SecBuf_inherit, 
3779           { "Inherit", "winreg.winreg_SecBuf.inherit", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3780         { &hf_winreg_winreg_QueryMultipleValues_key_handle, 
3781           { "Key Handle", "winreg.winreg_QueryMultipleValues.key_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
3782         { &hf_winreg_winreg_CreateKey_options, 
3783           { "Options", "winreg.winreg_CreateKey.options", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3784         { &hf_winreg_winreg_InitiateSystemShutdownEx_reboot, 
3785           { "Reboot", "winreg.winreg_InitiateSystemShutdownEx.reboot", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3786         { &hf_winreg_winreg_String_name, 
3787           { "Name", "winreg.winreg_String.name", FT_STRING, BASE_DEC, NULL, 0, "", HFILL }},
3788         { &hf_winreg_winreg_NotifyChangeKeyValue_notify_filter, 
3789           { "Notify Filter", "winreg.winreg_NotifyChangeKeyValue.notify_filter", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3790         { &hf_winreg_winreg_QueryInfoKey_max_subkeysize, 
3791           { "Max Subkeysize", "winreg.winreg_QueryInfoKey.max_subkeysize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3792         { &hf_winreg_winreg_OpenKey_unknown, 
3793           { "Unknown", "winreg.winreg_OpenKey.unknown", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3794         { &hf_winreg_winreg_SetValue_data, 
3795           { "Data", "winreg.winreg_SetValue.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3796         { &hf_winreg_winreg_QueryMultipleValues_values, 
3797           { "Values", "winreg.winreg_QueryMultipleValues.values", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3798         { &hf_winreg_winreg_QueryInfoKey_last_changed_time, 
3799           { "Last Changed Time", "winreg.winreg_QueryInfoKey.last_changed_time", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0, "", HFILL }},
3800         { &hf_winreg_QueryMultipleValue_name, 
3801           { "Name", "winreg.QueryMultipleValue.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3802         { &hf_winreg_winreg_EnumValue_type, 
3803           { "Type", "winreg.winreg_EnumValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
3804         { &hf_winreg_winreg_SetValue_type, 
3805           { "Type", "winreg.winreg_SetValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
3806         { &hf_winreg_access_mask, 
3807           { "Access Mask", "winreg.access_mask", FT_UINT32, BASE_HEX, NULL, 0, " ", HFILL }},
3808         { &hf_winreg_winreg_CreateKey_secdesc, 
3809           { "Secdesc", "winreg.winreg_CreateKey.secdesc", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3810         { &hf_winreg_winreg_QueryMultipleValues_buffer, 
3811           { "Buffer", "winreg.winreg_QueryMultipleValues.buffer", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3812         { &hf_winreg_winreg_GetVersion_version, 
3813           { "Version", "winreg.winreg_GetVersion.version", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3814         { &hf_winreg_winreg_SetKeySecurity_access_mask, 
3815           { "Access Mask", "winreg.winreg_SetKeySecurity.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
3816         { &hf_winreg_winreg_AccessMask_KEY_WOW64_64KEY, 
3817           { "Key Wow64 64key", "winreg.winreg_AccessMask.KEY_WOW64_64KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_64KEY_tfs), ( 0x00100 ), "", HFILL }},
3818         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown, 
3819           { "Unknown", "winreg.winreg_NotifyChangeKeyValue.unknown", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3820         { &hf_winreg_winreg_LoadKey_filename, 
3821           { "Filename", "winreg.winreg_LoadKey.filename", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3822         { &hf_winreg_winreg_EnumValue_enum_index, 
3823           { "Enum Index", "winreg.winreg_EnumValue.enum_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3824         { &hf_winreg_winreg_CreateKey_action_taken, 
3825           { "Action Taken", "winreg.winreg_CreateKey.action_taken", FT_UINT32, BASE_DEC, VALS(winreg_winreg_CreateAction_vals), 0, "", HFILL }},
3826         { &hf_winreg_winreg_QueryValue_size, 
3827           { "Size", "winreg.winreg_QueryValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3828         { &hf_winreg_winreg_QueryMultipleValues_buffer_size, 
3829           { "Buffer Size", "winreg.winreg_QueryMultipleValues.buffer_size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3830         { &hf_winreg_winreg_CreateKey_keyclass, 
3831           { "Keyclass", "winreg.winreg_CreateKey.keyclass", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3832         { &hf_winreg_system_name, 
3833           { "System Name", "winreg.system_name", FT_UINT16, BASE_DEC, NULL, 0, " ", HFILL }},
3834         { &hf_winreg_KeySecurityData_size, 
3835           { "Size", "winreg.KeySecurityData.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3836         { &hf_winreg_winreg_EnumValue_value, 
3837           { "Value", "winreg.winreg_EnumValue.value", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3838         { &hf_winreg_winreg_AccessMask_KEY_SET_VALUE, 
3839           { "Key Set Value", "winreg.winreg_AccessMask.KEY_SET_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_SET_VALUE_tfs), ( 0x00002 ), "", HFILL }},
3840         { &hf_winreg_winreg_InitiateSystemShutdownEx_message, 
3841           { "Message", "winreg.winreg_InitiateSystemShutdownEx.message", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
3842         { &hf_winreg_winreg_QueryInfoKey_secdescsize, 
3843           { "Secdescsize", "winreg.winreg_QueryInfoKey.secdescsize", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3844         { &hf_winreg_sd_max_size, 
3845           { "Max Size", "winreg.sd.max_size", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
3846         { &hf_winreg_winreg_QueryValue_data, 
3847           { "Data", "winreg.winreg_QueryValue.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3848         { &hf_winreg_winreg_EnumValue_length, 
3849           { "Length", "winreg.winreg_EnumValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3850         { &hf_winreg_winreg_SecBuf_length, 
3851           { "Length", "winreg.winreg_SecBuf.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3852         { &hf_winreg_winreg_QueryValue_value_name, 
3853           { "Value Name", "winreg.winreg_QueryValue.value_name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3854         { &hf_winreg_winreg_QueryInfoKey_num_values, 
3855           { "Num Values", "winreg.winreg_QueryInfoKey.num_values", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3856         { &hf_winreg_winreg_InitiateSystemShutdown_reboot, 
3857           { "Reboot", "winreg.winreg_InitiateSystemShutdown.reboot", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3858         { &hf_winreg_winreg_CreateKey_new_handle, 
3859           { "New Handle", "winreg.winreg_CreateKey.new_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
3860         { &hf_winreg_winreg_QueryValue_type, 
3861           { "Type", "winreg.winreg_QueryValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
3862         { &hf_winreg_winreg_AccessMask_KEY_CREATE_LINK, 
3863           { "Key Create Link", "winreg.winreg_AccessMask.KEY_CREATE_LINK", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_LINK_tfs), ( 0x00020 ), "", HFILL }},
3864         { &hf_winreg_winreg_AccessMask_KEY_WOW64_32KEY, 
3865           { "Key Wow64 32key", "winreg.winreg_AccessMask.KEY_WOW64_32KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_WOW64_32KEY_tfs), ( 0x00200 ), "", HFILL }},
3866         { &hf_winreg_KeySecurityData_data, 
3867           { "Data", "winreg.KeySecurityData.data", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3868         { &hf_winreg_QueryMultipleValue_length, 
3869           { "Length", "winreg.QueryMultipleValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3870         { &hf_winreg_winreg_LoadKey_keyname, 
3871           { "Keyname", "winreg.winreg_LoadKey.keyname", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3872         { &hf_winreg_winreg_InitiateSystemShutdown_hostname, 
3873           { "Hostname", "winreg.winreg_InitiateSystemShutdown.hostname", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3874         { &hf_winreg_winreg_StringBuf_name, 
3875           { "Name", "winreg.winreg_StringBuf.name", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3876         { &hf_winreg_winreg_NotifyChangeKeyValue_unknown2, 
3877           { "Unknown2", "winreg.winreg_NotifyChangeKeyValue.unknown2", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3878         { &hf_winreg_winreg_EnumValue_name, 
3879           { "Name", "winreg.winreg_EnumValue.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3880         { &hf_winreg_winreg_InitiateSystemShutdownEx_reason, 
3881           { "Reason", "winreg.winreg_InitiateSystemShutdownEx.reason", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3882         { &hf_winreg_winreg_InitiateSystemShutdown_message, 
3883           { "Message", "winreg.winreg_InitiateSystemShutdown.message", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
3884         { &hf_winreg_winreg_DeleteValue_value, 
3885           { "Value", "winreg.winreg_DeleteValue.value", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3886         { &hf_winreg_winreg_SetValue_name, 
3887           { "Name", "winreg.winreg_SetValue.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3888         { &hf_winreg_winreg_EnumKey_keyclass, 
3889           { "Keyclass", "winreg.winreg_EnumKey.keyclass", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3890         { &hf_winreg_winreg_NotifyChangeKeyValue_watch_subtree, 
3891           { "Watch Subtree", "winreg.winreg_NotifyChangeKeyValue.watch_subtree", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3892         { &hf_winreg_winreg_EnumKey_name, 
3893           { "Name", "winreg.winreg_EnumKey.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3894         { &hf_winreg_winreg_QueryValue_length, 
3895           { "Length", "winreg.winreg_QueryValue.length", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3896         { &hf_winreg_QueryMultipleValue_offset, 
3897           { "Offset", "winreg.QueryMultipleValue.offset", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3898         { &hf_winreg_winreg_SecBuf_sd, 
3899           { "Sd", "winreg.winreg_SecBuf.sd", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3900         { &hf_winreg_werror, 
3901           { "Windows Error", "winreg.werror", FT_UINT32, BASE_HEX, VALS(WERR_errors), 0, "", HFILL }},
3902         { &hf_winreg_winreg_QueryInfoKey_num_subkeys, 
3903           { "Num Subkeys", "winreg.winreg_QueryInfoKey.num_subkeys", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3904         { &hf_winreg_winreg_String_name_len, 
3905           { "Name Len", "winreg.winreg_String.name_len", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3906         { &hf_winreg_opnum, 
3907           { "Operation", "winreg.opnum", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3908         { &hf_winreg_QueryMultipleValue_type, 
3909           { "Type", "winreg.QueryMultipleValue.type", FT_UINT32, BASE_DEC, VALS(winreg_winreg_Type_vals), 0, "", HFILL }},
3910         { &hf_winreg_winreg_QueryInfoKey_class_in, 
3911           { "Class In", "winreg.winreg_QueryInfoKey.class_in", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3912         { &hf_winreg_winreg_InitiateSystemShutdownEx_timeout, 
3913           { "Timeout", "winreg.winreg_InitiateSystemShutdownEx.timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3914         { &hf_winreg_handle, 
3915           { "Handle", "winreg.handle", FT_BYTES, BASE_NONE, NULL, 0, " ", HFILL }},
3916         { &hf_winreg_winreg_GetKeySecurity_sec_info, 
3917           { "Sec Info", "winreg.winreg_GetKeySecurity.sec_info", FT_NONE, BASE_HEX, NULL, 0, "", HFILL }},
3918         { &hf_winreg_winreg_DeleteKey_key, 
3919           { "Key", "winreg.winreg_DeleteKey.key", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3920         { &hf_winreg_winreg_AccessMask_KEY_NOTIFY, 
3921           { "Key Notify", "winreg.winreg_AccessMask.KEY_NOTIFY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_NOTIFY_tfs), ( 0x00010 ), "", HFILL }},
3922         { &hf_winreg_winreg_EnumKey_last_changed_time, 
3923           { "Last Changed Time", "winreg.winreg_EnumKey.last_changed_time", FT_ABSOLUTE_TIME, BASE_NONE, NULL, 0, "", HFILL }},
3924         { &hf_winreg_winreg_QueryInfoKey_max_subkeylen, 
3925           { "Max Subkeylen", "winreg.winreg_QueryInfoKey.max_subkeylen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3926         { &hf_winreg_sd_actual_size, 
3927           { "Actual Size", "winreg.sd.actual_size", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
3928         { &hf_winreg_winreg_AbortSystemShutdown_server, 
3929           { "Server", "winreg.winreg_AbortSystemShutdown.server", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3930         { &hf_winreg_sd_offset, 
3931           { "Offset", "winreg.sd.offset", FT_UINT32, BASE_DEC, NULL, 0, " ", HFILL }},
3932         { &hf_winreg_sd, 
3933           { "KeySecurityData", "winreg.sd", FT_NONE, BASE_NONE, NULL, 0, " ", HFILL }},
3934         { &hf_winreg_winreg_EnumKey_enum_index, 
3935           { "Enum Index", "winreg.winreg_EnumKey.enum_index", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3936         { &hf_winreg_winreg_InitiateSystemShutdownEx_hostname, 
3937           { "Hostname", "winreg.winreg_InitiateSystemShutdownEx.hostname", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3938         { &hf_winreg_winreg_InitiateSystemShutdownEx_force_apps, 
3939           { "Force Apps", "winreg.winreg_InitiateSystemShutdownEx.force_apps", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3940         { &hf_winreg_winreg_CreateKey_name, 
3941           { "Name", "winreg.winreg_CreateKey.name", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3942         { &hf_winreg_winreg_StringBuf_size, 
3943           { "Size", "winreg.winreg_StringBuf.size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3944         { &hf_winreg_winreg_OpenKey_parent_handle, 
3945           { "Parent Handle", "winreg.winreg_OpenKey.parent_handle", FT_BYTES, BASE_NONE, NULL, 0, "", HFILL }},
3946         { &hf_winreg_winreg_OpenKey_keyname, 
3947           { "Keyname", "winreg.winreg_OpenKey.keyname", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3948         { &hf_winreg_KeySecurityData_len, 
3949           { "Len", "winreg.KeySecurityData.len", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3950         { &hf_winreg_winreg_InitiateSystemShutdown_force_apps, 
3951           { "Force Apps", "winreg.winreg_InitiateSystemShutdown.force_apps", FT_UINT8, BASE_DEC, NULL, 0, "", HFILL }},
3952         { &hf_winreg_winreg_OpenHKPD_access_mask, 
3953           { "Access Mask", "winreg.winreg_OpenHKPD.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
3954         { &hf_winreg_winreg_EnumValue_size, 
3955           { "Size", "winreg.winreg_EnumValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3956         { &hf_winreg_winreg_SetValue_size, 
3957           { "Size", "winreg.winreg_SetValue.size", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3958         { &hf_winreg_winreg_OpenKey_access_mask, 
3959           { "Access Mask", "winreg.winreg_OpenKey.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
3960         { &hf_winreg_winreg_InitiateSystemShutdown_timeout, 
3961           { "Timeout", "winreg.winreg_InitiateSystemShutdown.timeout", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3962         { &hf_winreg_winreg_QueryInfoKey_max_valnamelen, 
3963           { "Max Valnamelen", "winreg.winreg_QueryInfoKey.max_valnamelen", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3964         { &hf_winreg_winreg_QueryMultipleValues_num_values, 
3965           { "Num Values", "winreg.winreg_QueryMultipleValues.num_values", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL }},
3966         { &hf_winreg_winreg_AccessMask_KEY_CREATE_SUB_KEY, 
3967           { "Key Create Sub Key", "winreg.winreg_AccessMask.KEY_CREATE_SUB_KEY", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_CREATE_SUB_KEY_tfs), ( 0x00004 ), "", HFILL }},
3968         { &hf_winreg_winreg_String_name_size, 
3969           { "Name Size", "winreg.winreg_String.name_size", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3970         { &hf_winreg_winreg_OpenHKCU_access_mask, 
3971           { "Access Mask", "winreg.winreg_OpenHKCU.access_mask", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL }},
3972         { &hf_winreg_winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS, 
3973           { "Key Enumerate Sub Keys", "winreg.winreg_AccessMask.KEY_ENUMERATE_SUB_KEYS", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_ENUMERATE_SUB_KEYS_tfs), ( 0x00008 ), "", HFILL }},
3974         { &hf_winreg_winreg_AccessMask_KEY_QUERY_VALUE, 
3975           { "Key Query Value", "winreg.winreg_AccessMask.KEY_QUERY_VALUE", FT_BOOLEAN, 32, TFS(&winreg_AccessMask_KEY_QUERY_VALUE_tfs), ( 0x00001 ), "", HFILL }},
3976         { &hf_winreg_winreg_StringBuf_length, 
3977           { "Length", "winreg.winreg_StringBuf.length", FT_UINT16, BASE_DEC, NULL, 0, "", HFILL }},
3978         { &hf_winreg_winreg_NotifyChangeKeyValue_string1, 
3979           { "String1", "winreg.winreg_NotifyChangeKeyValue.string1", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3980         { &hf_winreg_winreg_NotifyChangeKeyValue_string2, 
3981           { "String2", "winreg.winreg_NotifyChangeKeyValue.string2", FT_NONE, BASE_NONE, NULL, 0, "", HFILL }},
3982         };
3983
3984
3985         static gint *ett[] = {
3986                 &ett_dcerpc_winreg,
3987                 &ett_winreg_winreg_AccessMask,
3988                 &ett_winreg_winreg_String,
3989                 &ett_winreg_KeySecurityData,
3990                 &ett_winreg_winreg_SecBuf,
3991                 &ett_winreg_winreg_StringBuf,
3992                 &ett_winreg_QueryMultipleValue,
3993         };
3994
3995         proto_dcerpc_winreg = proto_register_protocol("Remote Registry Service", "WINREG", "winreg");
3996         proto_register_field_array(proto_dcerpc_winreg, hf, array_length (hf));
3997         proto_register_subtree_array(ett, array_length(ett));
3998 }
3999
4000 void proto_reg_handoff_dcerpc_winreg(void)
4001 {
4002         dcerpc_init_uuid(proto_dcerpc_winreg, ett_dcerpc_winreg,
4003                 &uuid_dcerpc_winreg, ver_dcerpc_winreg,
4004                 winreg_dissectors, hf_winreg_opnum);
4005 }