On Mon, 1 Sep 2014 15:05:32 +0200, Jonathan Vollebregt wrote:
+#define MAX_TYPE_LENGTH 32
+static const WCHAR type_names[][MAX_TYPE_LENGTH] = { + {'R','E','G','_','N','O','N','E',0}, + {'R','E','G','_','S','Z',0}, + {'R','E','G','_','E','X','P','A','N','D','_','S','Z',0}, + {'R','E','G','_','B','I','N','A','R','Y',0}, + {'R','E','G','_','D','W','O','R','D',0}, + {'R','E','G','_','D','W','O','R','D','_','B','I','G','_','E','N','D','I','A','N',0}, + {0}, + {'R','E','G','_','M','U','L','T','I','_','S','Z',0}, +}; + + +
Why are you defining MAX_TYPE_LENGTH as 32? The longest is 21 (including the null terminator) or, if you include REG_DWORD_LITTLE_ENDIAN, the longest is 24.
Also, what is the purpose of {0}? And you have included three newlines.
-- Hugh McMaster