書き込みログ関数cディスクWriteLog


void WriteLog(char * szLog)
{
	SYSTEMTIME st;
	GetLocalTime(&st);
	FILE *fp;
	fp = fopen("c:\\log.txt", "at");
	fprintf(fp, "MyLogInfo: %d:%d:%d:%d ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
	fprintf(fp, szLog);
	fclose(fp);
	OutputDebugStringA(szLog);
}

void WriteLog(wchar_t * szLog)
{
	SYSTEMTIME st;
	GetLocalTime(&st);
	FILE *fp;
	fp = _wfopen(L"c:\\ribi.txt", L"at");
	//fwprintf(fp, L"MyLogInfo: %d:%d:%d:%d ", st.wHour, st.wMinute, st.wSecond, st.wMilliseconds);
	fwprintf(fp, szLog);
	fclose(fp);
	OutputDebugString(szLog);
}
	wchar_t ribi2[100];
swprintf(ribi2, L"        %d     ", nowport);
	WriteLog(ribi2);