oProc = "proc" + Sys(2015) &oProc = CreateObject("sqlsql.obj") cResponse = &oProc..Receive ( cValue ) ? cResponseCalled Function. This is living inside an out-of-process COM object that should log to disk whatever it gets. Because it is a MTDLL, each instance should have its own log and not step on the others.
Parameter lcString Declare INTEGER GetCurrentThreadId IN WIN32API lcString = Alltrim( Transform( lcString ) ) + Chr(13)+Chr(10) cLogName = "-Log-PID" + Alltrim( Transform( _VFP.ProcessId ) ) + ; "-ThreadID-" + Alltrim( Transform(GetCurrentThreadId()) ) + ".txt" cLogPath = "c:\" lcString = lcString + "Seconds since midnight: "+; AllTrim(Str(Seconds(),10,3) ) + Chr(13)+Chr(10) If This.iNewLog = 1 StrToFile (lcString , cLogPath + cLogName , .f. ) This.iNewLog = 0 Else StrToFile (lcString , cLogPath + cLogName , .t. ) EndIf FlushThanks.