+static LSTATUS wchar_get_data( const WCHAR *input, const DWORD type,
const WCHAR separator, DWORD *size_out, BYTE **out)
This whitespace use is a bit weird. Is there a precedent for it?
Nope. I think it's far easier to read with some indentation (eg patch 7), but if you'd rather have it the old way I can put it back.
/* If it's the first character or the previous one was a separator */
if (!p || temp[p - 1] == 0)
{
HeapFree(GetProcessHeap(), 0, temp);
return ERROR_BAD_COMMAND;
}
What does advapi32 do if you have empty substrings?
advapi32 just takes some data and copies it without validation. With RegSetValueEx I could give a REG_DWORD value a 1kb string consisting entirely of control characters and get it back in one piece.
Input has to be handled by the program, and it's basically up to the program to determine the syntax (Regedit for example uses newlines as separators) so these are just quirks of reg.exe
Does native write different error messages for a negative DWORD, improperly separated REG_MULTI_SZ and invalid REG_BINARY?
Assuming you mean error codes: Native advapi32 doesn't validate, and native reg only returns 1 or 0.