62{
65
76
79 {
81 }
83 {
85 goto CheckValueArgument;
86 }
87
89 {
90CheckValueArgument:
91 blnBadParameter =
FALSE;
94 {
96 break;
97 }
99 {
100 blnUnicodeDump =
TRUE;
101 }
102 else if ((*pchParameter ==
_T(
'/'))&&(*(pchParameter+1) ==
_T(
'f')))
103 {
104 pchFilename = pchParameter+2;
105 }
106 else if (!pchValueFull)
107 {
108 pchValueFull = pchParameter;
109 }
110 else
111 {
112 blnBadParameter =
TRUE;
113 }
114 if (blnBadParameter)
115 {
116 rConsole.
Write(
_T(
"Bad parameter: "));
117 rConsole.
Write(pchParameter);
119 }
120 }
121
124 const TCHAR *pszEmpty =
_T(
"");
125 const TCHAR *pszPath;
126
127 if (blnHelp)
128 {
130
131 if (pDataBuffer)
132 delete pDataBuffer;
133
134 return 0;
135 }
136
137 if (pchValueFull)
138 {
140 goto ValueCommandNAonRoot;
141
143 pchValueName = pchSep?(pchSep+1):(pchValueFull);
144 pszPath = pchSep?pchValueFull:
_T(
".");
145
146
147
148
149
150
151
152 if (pchSep)
153 *pchSep = 0;
154 }
155 else
156 {
157 pchValueName = (
TCHAR*)pszEmpty;
159 }
160
162 {
164 goto SkipValueCommand;
165 }
166
168 goto ValueCommandNAonRoot;
169
170 {
171 rConsole.
Write(
_T(
"Value name : \""));
176 (*pchValueName ==
_T(
'\"'))&&
177 (pchValueName[
l-1] ==
_T(
'\"')))
178 {
179 pchValueName[
l-1] = 0;
180 pchValueName++;
181 }
182 rConsole.
Write(pchValueName);
184
185 nError =
Key.GetValue(pchValueName,
NULL,
NULL,&dwValueSize);
187 {
188 pDataBuffer =
new BYTE [dwValueSize];
189 Key.GetValue(pchValueName,&dwType,pDataBuffer,&dwValueSize);
190 rConsole.
Write(
_T(
"Value type : "));
192 rConsole.
Write(
_T(
"\nValue data : "));
193 switch(dwType)
194 {
196 {
199 for (
unsigned int i = 0 ;
i < dwValueSize ;
i++)
200 {
203 }
204 }
206 break;
208 {
211 for (
unsigned int i = 0 ;
i < dwValueSize ;
i++)
212 {
215 }
216 }
218 break;
220 break;
222 {
223 TCHAR *pchCurrentString = (
TCHAR *)pDataBuffer;
225 while(*pchCurrentString)
226 {
228 rConsole.
Write(pchCurrentString);
230 pchCurrentString +=
_tcslen(pchCurrentString)+1;
231 }
232 }
233 break;
235 break;
241 break;
243 default:
244 {
247 for (
i = 0 ;
i < dwValueSize ;
i++)
248 {
250 {
252
255 }
257 {
259 }
260
261
262 unsigned int n = *(pDataBuffer+
i);
265
266 if (
i && (
i%16 == 15))
267 {
268
269 for (
j =
i-15;
j <=
i;
j += blnUnicodeDump?2:1)\
270 {
271 if ((
j%8 == 0)&&(
j%16 != 0))
272 {
274 }
276
277 if (blnUnicodeDump)
278 {
280 wchar_t ch = *(
TCHAR *)(pDataBuffer+
j);
281
285#else
286
287
289#endif
291 }
292 else
293 {
294 unsigned char ch = *(pDataBuffer+
j);
295
298
299
301#else
303#endif
305 }
307 }
308 }
309 }
310
311
312
314 {
316 {
318 }
321 if (
k && (
k%16 == 15))
322 {
324 for (
j =
k-15;
j <
i;
j += blnUnicodeDump?2:1)
325 {
326 if (blnUnicodeDump&&(
j+1 >=
i))
327 {
329 break;
330 }
331 if ((
j%8 == 0)&&(
j%16 != 0))
332 {
334 }
335
336
337 if (blnUnicodeDump)
338 {
340 wchar_t ch = *(
TCHAR *)(pDataBuffer+
j);
341
345#else
346
347
349#endif
351 }
352 else
353 {
354 unsigned char ch = *(pDataBuffer+
j);
355
358
359
361#else
363#endif
365 }
367 }
368 }
369 }
370 }
372 }
374
375 if (pchFilename)
376 {
377 rConsole.
Write(
_T(
"Exporting value data to "));
378 rConsole.
Write(pchFilename);
380
383 {
384 rConsole.
Write(
_T(
"Cannot create new file "));
385 rConsole.
Write(pchFilename);
387 goto SkipValueCommand;
388 }
389
390 DWORD dwBytesWritten;
392 {
393 rConsole.
Write(
_T(
"Error writting file.\n"));
395 goto SkipValueCommand;
396 }
397
398 ASSERT(dwBytesWritten == dwValueSize);
400 }
401 }
402 else
403 {
409 {
410 rConsole.
Write(
_T(
"(System cannot find the value specified)\n"));
411 }
412 }
413 }
414
415SkipValueCommand:
416 if (pDataBuffer)
417 delete[] pDataBuffer;
418 return 0;
419ValueCommandNAonRoot:
421 return 0;
422}
#define COMMAND_NA_ON_ROOT
void ResetArgumentIteration()
TCHAR * GetNextArgument()
BOOL Write(const TCHAR *p, DWORD dwChars=0)
static const TCHAR * GetValueTypeName(DWORD dwType)
BOOL GetKey(const TCHAR *pchRelativePath, REGSAM DesiredAccess, CRegistryKey &rKey)
const TCHAR * GetLastErrorDescription()
virtual const TCHAR * GetHelpString()
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
_CRTIMP char *__cdecl _itoa(_In_ int _Value, _Pre_notnull_ _Post_z_ char *_Dest, _In_ int _Radix)
#define ERROR_FILE_NOT_FOUND
#define REG_DWORD_LITTLE_ENDIAN
#define REG_DWORD_BIG_ENDIAN
#define REG_RESOURCE_LIST