Click here to Skip to main content
15,919,422 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Shiv Murti Pal5-Oct-09 1:48
Shiv Murti Pal5-Oct-09 1:48 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Michael Schubert5-Oct-09 2:21
Michael Schubert5-Oct-09 2:21 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
CPallini5-Oct-09 3:31
mveCPallini5-Oct-09 3:31 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
David Crow5-Oct-09 4:03
David Crow5-Oct-09 4:03 
AnswerRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Randor 5-Oct-09 9:52
professional Randor 5-Oct-09 9:52 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
kilt8-Oct-09 23:42
kilt8-Oct-09 23:42 
GeneralRe: How to Wipe/Clean Internet Explorer temporary internet Files, Cookies, History, Cache using C++/VC++/MFC Pin
Randor 9-Oct-09 11:54
professional Randor 9-Oct-09 11:54 
Questionlet rename file just after it creation in explorer Pin
MrKBA4-Oct-09 22:48
MrKBA4-Oct-09 22:48 
AnswerRe: let rename file just after it creation in explorer Pin
Richard MacCutchan5-Oct-09 1:11
mveRichard MacCutchan5-Oct-09 1:11 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 8:18
MrKBA5-Oct-09 8:18 
GeneralRe: let rename file just after it creation in explorer Pin
Richard MacCutchan5-Oct-09 10:30
mveRichard MacCutchan5-Oct-09 10:30 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 11:16
MrKBA5-Oct-09 11:16 
GeneralRe: let rename file just after it creation in explorer Pin
Richard MacCutchan5-Oct-09 11:27
mveRichard MacCutchan5-Oct-09 11:27 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 12:44
MrKBA5-Oct-09 12:44 
AnswerRe: let rename file just after it creation in explorer Pin
David Crow5-Oct-09 4:07
David Crow5-Oct-09 4:07 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 6:23
MrKBA5-Oct-09 6:23 
QuestionChanging the color of a button [modified] Pin
ratprita4-Oct-09 22:44
ratprita4-Oct-09 22:44 
AnswerRe: Changing the color of a button Pin
CPallini4-Oct-09 23:03
mveCPallini4-Oct-09 23:03 
GeneralRe: Changing the color of a button Pin
ratprita4-Oct-09 23:44
ratprita4-Oct-09 23:44 
GeneralRe: Changing the color of a button Pin
CPallini5-Oct-09 0:18
mveCPallini5-Oct-09 0:18 
AnswerRe: Changing the color of a button Pin
David Crow5-Oct-09 4:09
David Crow5-Oct-09 4:09 
QuestionEnigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 22:33
Souldrift4-Oct-09 22:33 
AnswerRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 22:58
mveCPallini4-Oct-09 22:58 
GeneralRe: Enigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 23:10
Souldrift4-Oct-09 23:10 
I edited the code block. buf was initialized, of course, further above.
In ShellExecute() I tried 'callString' and 'buf' as parameter. But only 'buf' worked.

'buf' is in the example NOT in the ShellExecute(), since I tried last with 'callString'. hm ... I post the code differently ...

char buf[512]
size = GetCurrentDirectoryA( 512, buf ); // get absolute path

char id[32];
sprintf_s( id, "%d", pid );

// version 1
char callString[1024];
sprintf_s( callString, "%s\\%s", buf, file.c_str() );
long res=long(ShellExecute(0, "open", callString, id, 0, SW_SHOWNORMAL));

// version 2
char callString2[1024];
sprintf_s( callString2,  "c:\\Users\\zwatschek\\work\\svn\\incubation\\ttsServer\\Data\\ttsWatchdog.exe" ); 
res=long(ShellExecute(0, "open", callString2, id, 0, SW_SHOWNORMAL));


And still, the contents of callString and callString2 are the same. Version 2 works, version 1 not.

I´ll look into the len parameter of sprintf_s. But I don´t think that´s it.

Thanks.

Souldrift

modified on Monday, October 5, 2009 5:26 AM

GeneralRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 23:37
mveCPallini4-Oct-09 23:37 

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.