Click here to Skip to main content
15,896,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: static control Pin
happy_ram21-Jun-06 3:15
happy_ram21-Jun-06 3:15 
GeneralRe: static control Pin
ashish dogra21-Jun-06 3:17
ashish dogra21-Jun-06 3:17 
GeneralRe: static control Pin
Cedric Moonen21-Jun-06 3:29
Cedric Moonen21-Jun-06 3:29 
QuestionA Drag and Drop Handle? [modified] Pin
TheDelChop21-Jun-06 2:35
TheDelChop21-Jun-06 2:35 
AnswerRe: A Drag and Drop Handle? Pin
David Crow21-Jun-06 2:39
David Crow21-Jun-06 2:39 
AnswerRe: A Drag and Drop Handle? Pin
normanS21-Jun-06 4:47
normanS21-Jun-06 4:47 
AnswerRe: A Drag and Drop Handle? Pin
Michael Dunn21-Jun-06 6:40
sitebuilderMichael Dunn21-Jun-06 6:40 
QuestionFFMPEG +VC++ Console Programming Pin
RahulOP21-Jun-06 2:28
RahulOP21-Jun-06 2:28 
After weeks of trying to program using the dlls and/or libs, i finally considered building my own gui i.e. Console Programming in vc++
Now all i get is
<br />
CString csExecute;<br />
  csExecute="C://msys//home//ffmpeg4//ffmpeg.exe";//+ "ffmpeg -i Rahul.avi -s qcif fort.mpeg";<br />
  csExecute+= " ";<br />
  csExecute+="-i Rahul.avi -s qcif -o fort1.mpeg";<br />
  SECURITY_ATTRIBUTES secattr; <br />
  ZeroMemory(&secattr,sizeof(secattr));<br />
  secattr.nLength = sizeof(secattr);<br />
  secattr.bInheritHandle = TRUE;<br />
<br />
  HANDLE rPipe, wPipe;<br />
<br />
  //Create pipes to write and read data<br />
  CreatePipe(&rPipe,&wPipe,&secattr,0);<br />
  //<br />
  STARTUPINFO sInfo; <br />
  ZeroMemory(&sInfo,sizeof(sInfo));<br />
  PROCESS_INFORMATION pInfo; <br />
  ZeroMemory(&pInfo,sizeof(pInfo));<br />
  sInfo.cb=sizeof(sInfo);<br />
  sInfo.dwFlags=STARTF_USESTDHANDLES;<br />
  sInfo.hStdInput=NULL; <br />
  sInfo.hStdOutput=wPipe; <br />
  sInfo.hStdError=wPipe;<br />
  char command[1024]; <br />
  strcpy(command,csExecute.GetBuffer(csExecute.GetLength()));<br />
<br />
  //Create the process here.<br />
  CreateProcess(0, command,0,0,TRUE,<br />
          NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW,0,0,&sInfo,&pInfo);<br />
  CloseHandle(wPipe);<br />
<br />
  //now read the output pipe here.<br />
  char buf[100];<br />
  DWORD reDword; <br />
  CString m_csOutput,csTemp;<br />
  BOOL res;<br />
  do<br />
  {<br />
                  res=::ReadFile(rPipe,buf,100,&reDword,0);<br />
                  csTemp=buf;<br />
                  m_csOutput+=csTemp.Left(reDword);<br />
  }while(res);<br />
  AfxMessageBox(m_csOutput);<br />


which does a nifty little trick of displaying output from the console
Now all i get is
<br />
"Rahul.avi I/O Error<br />
Usually that means that input file is truncated and/or corrupted "<br />
which is strange since if i try the same from the command line it encodes fine.
So what am I doing wrong?
AnswerRe: FFMPEG +VC++ Console Programming Pin
NiceNaidu21-Jun-06 2:38
NiceNaidu21-Jun-06 2:38 
GeneralRe: FFMPEG +VC++ Console Programming Pin
RahulOP21-Jun-06 3:27
RahulOP21-Jun-06 3:27 
AnswerRe: FFMPEG +VC++ Console Programming Pin
Justin Tay21-Jun-06 2:44
Justin Tay21-Jun-06 2:44 
GeneralRe: FFMPEG +VC++ Console Programming Pin
RahulOP21-Jun-06 3:28
RahulOP21-Jun-06 3:28 
AnswerRe: FFMPEG +VC++ Console Programming Pin
NiceNaidu21-Jun-06 2:48
NiceNaidu21-Jun-06 2:48 
GeneralRe: FFMPEG +VC++ Console Programming Pin
RahulOP21-Jun-06 3:32
RahulOP21-Jun-06 3:32 
AnswerRe: FFMPEG +VC++ Console Programming Pin
Viorel.21-Jun-06 3:08
Viorel.21-Jun-06 3:08 
GeneralRe: FFMPEG +VC++ Console Programming Pin
RahulOP21-Jun-06 3:30
RahulOP21-Jun-06 3:30 
QuestionWindow Messages between different dialogs/Views Pin
The Jerryman21-Jun-06 2:07
The Jerryman21-Jun-06 2:07 
AnswerRe: Window Messages between different dialogs/Views Pin
NiceNaidu21-Jun-06 2:25
NiceNaidu21-Jun-06 2:25 
AnswerRe: Window Messages between different dialogs/Views Pin
David Crow21-Jun-06 2:47
David Crow21-Jun-06 2:47 
Questionquestion for Microsoft Office File Properties Pin
tarikata21-Jun-06 2:05
tarikata21-Jun-06 2:05 
QuestionRe: question for Microsoft Office File Properties Pin
David Crow21-Jun-06 2:50
David Crow21-Jun-06 2:50 
AnswerRe: question for Microsoft Office File Properties Pin
tarikata21-Jun-06 4:14
tarikata21-Jun-06 4:14 
QuestionRe: question for Microsoft Office File Properties Pin
David Crow21-Jun-06 4:25
David Crow21-Jun-06 4:25 
AnswerRe: question for Microsoft Office File Properties Pin
tarikata22-Jun-06 0:45
tarikata22-Jun-06 0:45 
QuestionCString GetLength() issue Pin
kitty521-Jun-06 1:50
kitty521-Jun-06 1:50 

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.