Click here to Skip to main content
15,913,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Get USB Drive Letter size Pin
Iain Clarke, Warrior Programmer26-Feb-09 23:53
Iain Clarke, Warrior Programmer26-Feb-09 23:53 
AnswerRe: Get USB Drive Letter size Pin
Le@rner27-Feb-09 1:05
Le@rner27-Feb-09 1:05 
GeneralRe: Get USB Drive Letter size Pin
Hamid_RT27-Feb-09 3:36
Hamid_RT27-Feb-09 3:36 
QuestionAsynchronous Sockets Pin
urbanyoung26-Feb-09 22:42
urbanyoung26-Feb-09 22:42 
AnswerRe: Asynchronous Sockets Pin
Stuart Dootson27-Feb-09 0:11
professionalStuart Dootson27-Feb-09 0:11 
GeneralRe: Asynchronous Sockets Pin
urbanyoung27-Feb-09 1:11
urbanyoung27-Feb-09 1:11 
GeneralRe: Asynchronous Sockets Pin
Stuart Dootson27-Feb-09 2:26
professionalStuart Dootson27-Feb-09 2:26 
QuestionCreating and deleting a temp file Pin
CodingLover26-Feb-09 22:13
CodingLover26-Feb-09 22:13 
I want to create a temp file do some process and delete it.

I've create a temp file like this.

	szTempFile = new TCHAR[MAX_PATH];<br />
<br />
	if(!::GetTempFileName(".","temp",0,szTempFile))<br />
	{<br />
		return -1;<br />
	}


It's creating a temp file on the current working folder.

Then I try to delete the file as follows.

<br />
	if(szTempFile != NULL)<br />
	{<br />
		//delete szTempFile;<br />
		HRESULT b = ::DeleteFile(szTempFile);<br />
	}<br />


This not delete the file. When I check the path it's valid but the result of parameter b is 0.

Can someone help me to find the error.

I appreciate your help all the time...
CodingLover Smile | :)

AnswerRe: Creating and deleting a temp file Pin
«_Superman_»26-Feb-09 22:23
professional«_Superman_»26-Feb-09 22:23 
NewsRe: Creating and deleting a temp file Pin
CodingLover26-Feb-09 22:46
CodingLover26-Feb-09 22:46 
GeneralRe: Creating and deleting a temp file Pin
«_Superman_»26-Feb-09 22:48
professional«_Superman_»26-Feb-09 22:48 
NewsRe: Creating and deleting a temp file Pin
CodingLover26-Feb-09 23:08
CodingLover26-Feb-09 23:08 
GeneralRe: Creating and deleting a temp file Pin
«_Superman_»26-Feb-09 23:49
professional«_Superman_»26-Feb-09 23:49 
GeneralRe: Creating and deleting a temp file Pin
«_Superman_»26-Feb-09 23:57
professional«_Superman_»26-Feb-09 23:57 
QuestionRe: Creating and deleting a temp file Pin
CodingLover1-Mar-09 17:40
CodingLover1-Mar-09 17:40 
NewsRe: Creating and deleting a temp file Pin
CodingLover1-Mar-09 23:12
CodingLover1-Mar-09 23:12 
AnswerRe: Creating and deleting a temp file Pin
Nishad S26-Feb-09 23:06
Nishad S26-Feb-09 23:06 
QuestionRe: Creating and deleting a temp file Pin
CodingLover26-Feb-09 23:14
CodingLover26-Feb-09 23:14 
AnswerRe: Creating and deleting a temp file Pin
Nishad S26-Feb-09 23:19
Nishad S26-Feb-09 23:19 
NewsRe: Creating and deleting a temp file Pin
CodingLover26-Feb-09 23:23
CodingLover26-Feb-09 23:23 
GeneralRe: Creating and deleting a temp file Pin
Iain Clarke, Warrior Programmer26-Feb-09 23:55
Iain Clarke, Warrior Programmer26-Feb-09 23:55 
AnswerRe: Creating and deleting a temp file Pin
Soundman32.226-Feb-09 23:23
Soundman32.226-Feb-09 23:23 
QuestionGetShortPathName Pin
tom groezer26-Feb-09 21:46
tom groezer26-Feb-09 21:46 
QuestionHow to open Cmd prompt Pin
john563226-Feb-09 20:25
john563226-Feb-09 20:25 
AnswerRe: How to open Cmd prompt Pin
«_Superman_»26-Feb-09 20:47
professional«_Superman_»26-Feb-09 20:47 

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.