Example #1
0
	std::wstring render(bool propper, std::wstring syntax, std::wstring date_format = DATE_FORMAT, DWORD langId = 0) const {
		if (propper) {
			// To obtain the appropriate message string from the message file, load the message file with the LoadLibrary function and use the FormatMessage function
			strEx::replace(syntax, _T("%message%"), render_message(langId));
		} else {
			strEx::replace(syntax, _T("%message%"), _T("%message% needs the descriptions flag set!"));
		}

		strEx::replace(syntax, _T("%source%"), get_source());
		strEx::replace(syntax, _T("%computer%"), get_computer());
		strEx::replace(syntax, _T("%generated%"), strEx::format_date(get_time_generated(), date_format));
		strEx::replace(syntax, _T("%written%"), strEx::format_date(get_time_written(), date_format));
		strEx::replace(syntax, _T("%generated-raw%"), strEx::itos(pevlr_->TimeGenerated));
		strEx::replace(syntax, _T("%written-raw%"), strEx::itos(pevlr_->TimeWritten));
		strEx::replace(syntax, _T("%type%"), translateType(eventType()));
		strEx::replace(syntax, _T("%category%"), strEx::itos(pevlr_->EventCategory));
		strEx::replace(syntax, _T("%facility%"), strEx::itos(facility()));
		strEx::replace(syntax, _T("%qualifier%"), strEx::itos(facility()));
		strEx::replace(syntax, _T("%customer%"), strEx::itos(customer()));
		strEx::replace(syntax, _T("%rawid%"), strEx::itos(raw_id()));
		strEx::replace(syntax, _T("%severity%"), translateSeverity(severity()));
		strEx::replace(syntax, _T("%strings%"), enumStrings());
		strEx::replace(syntax, _T("%log%"), file_);
		strEx::replace(syntax, _T("%file%"), file_);
		strEx::replace(syntax, _T("%id%"), strEx::itos(eventID()));
		strEx::replace(syntax, _T("%user%"), userSID());
		return syntax;
	}
Example #2
0
int			launch_party(char **tab, int nb_col, int nb_line)
{
	while (!test_end(tab, nb_col, nb_line))
	{
		get_player(tab, nb_col);
		print_tab(tab, nb_col, nb_line);
		if (test_end(tab, nb_col, nb_line))
			return (0);
		get_computer(tab, nb_col);
		print_tab(tab, nb_col, nb_line);
	}
	return (0);
}