Click here to Skip to main content
15,918,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create Dll in VC++ for client that works in Delphi Pin
Tim Deveaux2-Oct-01 9:52
Tim Deveaux2-Oct-01 9:52 
GeneralThank you !! Pin
2-Oct-01 11:09
suss2-Oct-01 11:09 
GeneralMultimedia Timer question Pin
RobJones2-Oct-01 8:10
RobJones2-Oct-01 8:10 
GeneralNever Mind Pin
RobJones2-Oct-01 11:03
RobJones2-Oct-01 11:03 
QuestionWhat's wrong with this code? Pin
2-Oct-01 8:05
suss2-Oct-01 8:05 
AnswerRe: What's wrong with this code? Pin
Chris Losinger2-Oct-01 8:21
professionalChris Losinger2-Oct-01 8:21 
AnswerRe: What's wrong with this code? Pin
Tim Deveaux2-Oct-01 8:52
Tim Deveaux2-Oct-01 8:52 
AnswerRe: What's wrong with this code? Pin
Rashid Thadha2-Oct-01 9:49
Rashid Thadha2-Oct-01 9:49 
Alternative that I use --

void LogAuditMessage(DWORD nThreadID, LPCSTR szfmt, ...)
{  
  va_list args;
  va_start(args, szfmt);
  
  static bool bCheckDone(false);
  if (!bCheckDone)
  {
    // now check to see if todays date directory exist YYMMDD
    SYSTEMTIME Current;
    GetLocalTime(&Current);
    
    strcpy(m_cDateFormat, "");	
    sprintf(m_cDateFormat, "%04d%02d%02d", Current.wYear, Current.wMonth, Current.wDay);
    
    // create the main directory, if it does not exist
    if (!FileExists(".\\Audit\\."))
      _mkdir(".\\Audit");
    
    bCheckDone = true;
  }
  
  char sBuff[100] = "";
  sprintf(sBuff, ".\\Audit\\%s.log", m_cDateFormat);
  
  // Write to the logging file
  FILE* f;
  
  char szBuf[1024];
  char cTimeBuff[50] = "";
  _strtime(cTimeBuff);
  
  _vsnprintf(szBuf, 1024, szfmt , args);
  va_end(args);
  
  f = _tfopen(_T(sBuff), _T("a"));
  if (f != NULL)
  {
    _ftprintf(f, _T("%08x, %s, %s\n"), nThreadID, cTimeBuff, szBuf);
    fclose(f);
  }  
}


Cool | :cool:
GeneralCWinThread Pin
kakuni2-Oct-01 5:44
kakuni2-Oct-01 5:44 
GeneralRe: CWinThread Pin
Michael Dunn2-Oct-01 5:53
sitebuilderMichael Dunn2-Oct-01 5:53 
GeneralRe: CWinThread Pin
kakuni2-Oct-01 11:39
kakuni2-Oct-01 11:39 
GeneralRe: CWinThread Pin
Michael Dunn2-Oct-01 17:46
sitebuilderMichael Dunn2-Oct-01 17:46 
Generalwindow messages in com Pin
Christer2-Oct-01 3:22
Christer2-Oct-01 3:22 
GeneralSTLPort-4.5 Pin
Michael Martin2-Oct-01 2:35
professionalMichael Martin2-Oct-01 2:35 
GeneralRe: STLPort-4.5 Pin
Jim Crafton2-Oct-01 3:13
Jim Crafton2-Oct-01 3:13 
GeneralRe: STLPort-4.5 Pin
Michael Martin2-Oct-01 3:59
professionalMichael Martin2-Oct-01 3:59 
GeneralRe: STLPort-4.5 Pin
CodeGuy2-Oct-01 3:39
CodeGuy2-Oct-01 3:39 
QuestionWhat did I get in the call stack??? Pin
Chaos Lawful2-Oct-01 2:16
Chaos Lawful2-Oct-01 2:16 
GeneralMultiprocessor resources/Realtime Pin
Stan the man2-Oct-01 2:05
Stan the man2-Oct-01 2:05 
GeneralJust a question on WININET Pin
Chaos Lawful2-Oct-01 2:05
Chaos Lawful2-Oct-01 2:05 
GeneralGetting rid of the title bar Pin
Stan the man2-Oct-01 1:58
Stan the man2-Oct-01 1:58 
GeneralRe: Getting rid of the title bar Pin
2-Oct-01 8:21
suss2-Oct-01 8:21 
GeneralCListCtrl Refreshing Pin
AJ1232-Oct-01 0:54
AJ1232-Oct-01 0:54 
GeneralRe: CListCtrl Refreshing Pin
Tommy H D Svensson8-Nov-01 23:06
Tommy H D Svensson8-Nov-01 23:06 
Generalserialization Pin
2-Oct-01 0:51
suss2-Oct-01 0:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.