|There's something wrong in the posted snippet:
Souldrift wrote:// version 1
sprintf_s( callString, "%s\\%s", buf, file.c_str() );
Here you're using a uninitialised
buf variable (as far as I can tell from the posted code...).
Souldrift wrote:har buf;
sprintf_s( buf, "c:\\Users\\zwatschek\\work\\svn\\incubation\\ttsServer\\Data\\ttsWatchdog.exe" );
sprintf_s( id, "%d", pid );
long res=long(ShellExecute(0, "open", callString, id, 0, SW_SHOWNORMAL));
here you're copying (with a wrong call to
sprintf_s - missing
len parameter-) the file name to the
buf variable, but, afterwards, you're not using
Please check through the posted code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke