Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: c code for image scaling Pin
Ștefan-Mihai MOGA11-Jul-08 21:22
professionalȘtefan-Mihai MOGA11-Jul-08 21:22 
AnswerRe: c code for image scaling Pin
CPallini11-Jul-08 22:01
mveCPallini11-Jul-08 22:01 
QuestionWhich IPC mechanism should be used? Pin
Sameerkumar Namdeo11-Jul-08 18:06
Sameerkumar Namdeo11-Jul-08 18:06 
AnswerRe: Which IPC mechanism should be used? Pin
sudhir_Kumar11-Jul-08 19:52
sudhir_Kumar11-Jul-08 19:52 
GeneralRe: Which IPC mechanism should be used? Pin
Sameerkumar Namdeo11-Jul-08 20:05
Sameerkumar Namdeo11-Jul-08 20:05 
GeneralRe: Which IPC mechanism should be used? Pin
sudhir_Kumar11-Jul-08 20:55
sudhir_Kumar11-Jul-08 20:55 
AnswerRe: Which IPC mechanism should be used? Pin
Bram van Kampen12-Jul-08 14:35
Bram van Kampen12-Jul-08 14:35 
QuestionURLDownloadToCacheFile problem - possible workarounds? Pin
x87Bliss11-Jul-08 11:11
x87Bliss11-Jul-08 11:11 
My program needs to download a file off the internet to get some information needed to continue. It does not need to save the information, just needs to read it once for the next step.

I have tried
CString TempFile;
URLDownloadToCacheFile(NULL, _T("http://validurl/script.cfm?key=value"), TempFile.GetBufferSetLength(MAX_PATH), MAX_PATH, validcallback);


Once those lines run, TempFile gets filled with a valid path to a temporary file, but the file doesn't actually exist - therefore I can't open it. The following code is what I'm using now, and it works. But I don't like it because it has a hard-coded temporary filename (therefore multiple instances may conflict).

CString TempFile;
TempFile.GetEnvironmentVariable(_(T"TEMP"));
TempFile.Appened(_T("\\MyProg.tmp"));
URLDownloadToFile(NULL, _T("sameurlasabove"), TempFile, validcallback);


After those lines run, the file is created and contains the needed information. But again, it uses a hardcoded temp file, therefore multiple instances cannot run.

So now for the questions:
First of all, is URLDownloadToCacheFile failing because it's a text file generated by a script, and not a binary data file (like a jpg), therefore it doesn't cache it?

Second, what is more practical in this situation. Would you implement code to generate a "random" temporary filename that's not in use? Or should I write code that can read the file right off the internet without saving it to disk first? I don't want to shoot a fly with a cannon, but I'm not sure which is the cannon.
QuestionSECURITY_ATTRIBUTES in threading Pin
emmmatty111-Jul-08 8:03
emmmatty111-Jul-08 8:03 
AnswerRe: SECURITY_ATTRIBUTES in threading Pin
Peter Weyzen11-Jul-08 13:56
Peter Weyzen11-Jul-08 13:56 
AnswerRe: SECURITY_ATTRIBUTES in threading Pin
zildjohn0111-Jul-08 14:14
zildjohn0111-Jul-08 14:14 
QuestionCCheckListBox in release mode, Windows XP in Windows classic theme Pin
tsvdevteam11-Jul-08 5:31
tsvdevteam11-Jul-08 5:31 
Joke[OT] Re: CCheckListBox in release mode, Windows XP in Windows classic theme Pin
David Crow11-Jul-08 6:08
David Crow11-Jul-08 6:08 
AnswerRe: CCheckListBox in release mode, Windows XP in Windows classic theme Pin
bob1697211-Jul-08 7:42
bob1697211-Jul-08 7:42 
GeneralRe: CCheckListBox in release mode, Windows XP in Windows classic theme Pin
tsvdevteam11-Jul-08 9:03
tsvdevteam11-Jul-08 9:03 
GeneralRe: CCheckListBox in release mode, Windows XP in Windows classic theme Pin
Bram van Kampen12-Jul-08 14:47
Bram van Kampen12-Jul-08 14:47 
QuestionUpdate only a particial area of a View with UpdateAllViews(...) Pin
CrocodileBuck11-Jul-08 4:55
CrocodileBuck11-Jul-08 4:55 
AnswerRe: Update only a particial area of a View with UpdateAllViews(...) Pin
Mark Salsbery11-Jul-08 5:05
Mark Salsbery11-Jul-08 5:05 
AnswerRe: Update only a particial area of a View with UpdateAllViews(...) Pin
led mike11-Jul-08 5:18
led mike11-Jul-08 5:18 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
CrocodileBuck11-Jul-08 5:27
CrocodileBuck11-Jul-08 5:27 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
Mark Salsbery11-Jul-08 5:31
Mark Salsbery11-Jul-08 5:31 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
CrocodileBuck11-Jul-08 5:46
CrocodileBuck11-Jul-08 5:46 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
Mark Salsbery11-Jul-08 6:05
Mark Salsbery11-Jul-08 6:05 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
CrocodileBuck11-Jul-08 6:16
CrocodileBuck11-Jul-08 6:16 
GeneralRe: Update only a particial area of a View with UpdateAllViews(...) Pin
Mark Salsbery11-Jul-08 6:29
Mark Salsbery11-Jul-08 6:29 

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.