Click here to Skip to main content
15,892,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Server 2003 SP1 Pin
REDSERPENT724-Jun-09 23:25
REDSERPENT724-Jun-09 23:25 
GeneralRe: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Server 2003 SP1 Pin
Naveen24-Jun-09 23:34
Naveen24-Jun-09 23:34 
AnswerRe: Problem Compiling in VS 2005 after installing microsoft platform SDK for Windows Server 2003 SP1 Pin
smitty015725-Jun-09 11:29
smitty015725-Jun-09 11:29 
Questionhow to convert bstr to char[256] Pin
ashish8patil24-Jun-09 22:04
ashish8patil24-Jun-09 22:04 
AnswerRe: how to convert bstr to char[256] Pin
Rajesh R Subramanian24-Jun-09 22:13
professionalRajesh R Subramanian24-Jun-09 22:13 
GeneralRe: how to convert bstr to char[256] Pin
ashish8patil24-Jun-09 22:27
ashish8patil24-Jun-09 22:27 
AnswerRe: how to convert bstr to char[256] Pin
CPallini24-Jun-09 22:19
mveCPallini24-Jun-09 22:19 
GeneralRe: how to convert bstr to char[256] Pin
ashish8patil24-Jun-09 22:20
ashish8patil24-Jun-09 22:20 
Questionwua api help Pin
ashish8patil24-Jun-09 20:28
ashish8patil24-Jun-09 20:28 
QuestionMTOM without .Net framework how ? Pin
ERLN24-Jun-09 19:58
ERLN24-Jun-09 19:58 
AnswerRe: MTOM without .Net framework how ? Pin
Stuart Dootson24-Jun-09 22:35
professionalStuart Dootson24-Jun-09 22:35 
Questionhmm... Now why did this work? Pin
UserNameless24-Jun-09 19:52
UserNameless24-Jun-09 19:52 
AnswerRe: hmm... Now why did this work? Pin
Rajesh R Subramanian24-Jun-09 20:19
professionalRajesh R Subramanian24-Jun-09 20:19 
GeneralRe: hmm... Now why did this work? Pin
UserNameless24-Jun-09 20:34
UserNameless24-Jun-09 20:34 
GeneralRe: hmm... Now why did this work? Pin
Rajesh R Subramanian24-Jun-09 21:01
professionalRajesh R Subramanian24-Jun-09 21:01 
GeneralRe: hmm... Now why did this work? Pin
UserNameless24-Jun-09 21:24
UserNameless24-Jun-09 21:24 
GeneralRe: hmm... Now why did this work? Pin
Rajesh R Subramanian24-Jun-09 22:03
professionalRajesh R Subramanian24-Jun-09 22:03 
GeneralRe: hmm... Now why did this work? Pin
UserNameless24-Jun-09 22:44
UserNameless24-Jun-09 22:44 
QuestionRe: hmm... Now why did this work? Pin
David Crow25-Jun-09 4:05
David Crow25-Jun-09 4:05 
QuestionExecuting external DOS command with output redirecting to file Pin
Rajesh_Parameswaran24-Jun-09 19:44
Rajesh_Parameswaran24-Jun-09 19:44 
Hi there,

I'm trying to find a string inside a text file, using VC++ 6.0 application.
The logs contained in the text file can grow up to MBs (50 - 70 MB)

My aim here is to search a string in that and need to get the time stamp of last occurrence of the string.

I cant use the sequential search as this process runs as a thread and it runs for every 2 seconds. Sequential search will take too much of time, if the size of the log file grows to MBs.

I thought of using the findstr.exe command to find out the occurrence of the string "Error #1028" by this, all the lines matching the string will be redirected to the file, thus makes easy to find the last occurrence of the matching string.

WinExec("findstr   /C:\"ERROR #1028\" C:\\SERVER.log > C:\\temp_log.txt", SW_HIDE)

But, the output seems to be not re-directing to the temp_log.txt file.
I even tried creating the file temp.txt before executing the same, but the contents will be blank. Even I tried the >> operator too.

If i place this same command in a batch file, and invoke the batch file using WinExec(), it works fine.

Please pass on your comments on how this could be achieve or is there any other way to achieve the same, without having a dependency on external DOS command findstr.exe

Thanks in Advance,
Rajesh
AnswerRe: Executing external DOS command with output redirecting to file Pin
Stuart Dootson24-Jun-09 22:30
professionalStuart Dootson24-Jun-09 22:30 
GeneralRe: Executing external DOS command with output redirecting to file Pin
Rajesh_Parameswaran24-Jun-09 23:25
Rajesh_Parameswaran24-Jun-09 23:25 
GeneralRe: Executing external DOS command with output redirecting to file Pin
Stuart Dootson24-Jun-09 23:38
professionalStuart Dootson24-Jun-09 23:38 
QuestionRe: Executing external DOS command with output redirecting to file Pin
David Crow25-Jun-09 4:12
David Crow25-Jun-09 4:12 
AnswerRe: Executing external DOS command with output redirecting to file Pin
Rajesh_Parameswaran25-Jun-09 23:31
Rajesh_Parameswaran25-Jun-09 23:31 

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.