Re: After recalling same Function get GetLastError = 1008
- From: "Kerem Gümrükcü" <kareem114@xxxxxxxxxxx>
- Date: Wed, 28 Mar 2007 16:01:45 +0200
"Martin Vuille" <jpmv27@xxxxxxxxx> schrieb im Newsbeitrag
news:Xns9901639013B0Ejpmvrealtime@xxxxxxxxxxxxxxxxxx
"Kerem Gümrükcü" <kareem114@xxxxxxxxxxx> wrote in
news:ebh715TcHHA.3408@xxxxxxxxxxxxxxxxxxxx:
sFullCommand = sCMD + " " + sCommandLine;
lpszCommand = new TCHAR[sFullCommand.GetLength()+1];
if(this->m_StartWithOutputRedirection == TRUE){
sFullCommand += " > \"";
sFullCommand += lpszDesktopPath;
sFullCommand += "chkdsk result ";
sFullCommand += sTimeForLogFile + ".txt";
sFullCommand += "\"";
}
_tcscpy(lpszCommand,sFullCommand);
Shouldn't you allocate lpszCommand _after_ you have appended
the output redirection to sFullCommand?
As it stands, you don't allocate enough space in the buffer,
which is quite likely to cause "Exceptional" behaviour.
MV
Hi Martin,
you are my Hero!
I was about to become crazy.
But why did i get such a "wrong" last error code?
Best regards
Kerem Gümrükcü
.
- Follow-Ups:
- Re: After recalling same Function get GetLastError = 1008
- From: Martin Vuille
- Re: After recalling same Function get GetLastError = 1008
- References:
- After recalling same Function get GetLastError = 1008
- From: Kerem Gümrükcü
- Re: After recalling same Function get GetLastError = 1008
- From: Martin Vuille
- After recalling same Function get GetLastError = 1008
- Prev by Date: Re: After recalling same Function get GetLastError = 1008
- Next by Date: Re: After recalling same Function get GetLastError = 1008
- Previous by thread: Re: After recalling same Function get GetLastError = 1008
- Next by thread: Re: After recalling same Function get GetLastError = 1008
- Index(es):