I was enhancing the nteventlog.cpp file, the source of the native library NTEventLogAppender.dll. I noticed following call in function regSetString: RegSetValueEx(hkey, name, 0, REG_SZ, (LPBYTE)value, lstrlen(value)); Though it doesn't produce any error (for the present :-), it is IMHO in contradiction with MSDN documentation, where following is said: "If the data is of type REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ, cbData must include the size of the terminating null character or characters." (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/regsetvalueex.asp) So the correct call should be RegSetValueEx(hkey, name, 0, REG_SZ, (LPBYTE)value, lstrlen(value) + 1); Thanks
Since TCHAR can be either char or wchar_t (but likely char) in this instance, it should be RegSetValueEx(hkey, name, 0, REG_SZ, (LPBYTE)value, lstrlen(value) + sizeof(TCHAR));
Applied Curt's change. It will be in the v1.2.12rc5 build.