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