奇妙な問題を抱えている
sprintf(tmp, "\"%s\"", filename);
出力が
"filename"
しかし、代わりに私は得る
\"filename\"
ここで何が起こっているのですか?
=============================
extern "C" void __export __pascal MyFunc(LPTSTR m_avi, LPTSTR m_mpg)
{
int frameRate = 20;
char szAVI[MAX_PATH], szMPG[MAX_PATH];
#ifdef UNICODE
wcstombs(szAVI, m_avi, _tcslen(m_avi) + 1);
wcstombs(szMPG, m_mpg, _tcslen(m_mpg) + 1);
#else
strcpy(szAVI, m_avi);
strcpy(szMPG, m_mpg);
#endif
//Call to ffmpeg.exe
char cmdline[1000] = "ffmpeg ", tmp[50];
//Overwrite without asking
strcat(cmdline, "-y ");
//Input file
sprintf(tmp, "-i \"%s\" ", szAVI);
strcat(cmdline, tmp);
//Lock output at 20 frames per second
sprintf(tmp, "-r %i ", frameRate);
strcat(cmdline, tmp);
//Output file
sprintf(tmp, "\"%s\"", szMPG);
strcat(cmdline, tmp);
WinExec(cmdline, SW_HIDE);
}