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

C / C++ / MFC

 
GeneralRe: need help for a simple basic program in mfc vc++ [modified] Pin
«_Superman_»29-Apr-10 5:35
professional«_Superman_»29-Apr-10 5:35 
AnswerRe: need help for a simple basic program in mfc vc++ Pin
rajapp1-May-10 20:58
rajapp1-May-10 20:58 
GeneralRe: need help for a simple basic program in mfc vc++ Pin
Richard MacCutchan1-May-10 21:21
mveRichard MacCutchan1-May-10 21:21 
QuestionRe: need help for a simple basic program in mfc vc++ Pin
David Crow29-Apr-10 2:45
David Crow29-Apr-10 2:45 
AnswerRe: need help for a simple basic program in mfc vc++ Pin
rajapp29-Apr-10 2:58
rajapp29-Apr-10 2:58 
GeneralRe: need help for a simple basic program in mfc vc++ Pin
David Crow29-Apr-10 3:22
David Crow29-Apr-10 3:22 
GeneralRe: need help for a simple basic program in mfc vc++ Pin
rajapp1-May-10 21:04
rajapp1-May-10 21:04 
QuestionWinSock2 / Threads Pin
Fareed Rizkalla28-Apr-10 17:07
Fareed Rizkalla28-Apr-10 17:07 
I have created a threaded function that downloads files!
However on some files the download finishes, but the thread dies after the recv loop without intervention by me.
do
{
	//wchar_t DebugDownload[100];
	//swprintf(DebugDownload, L"Bytes Received: %d / File - Size: %lld / Downloaded: %lld"
	//	, BytesReceived, Download->BytesToDownload, Download->BytesDownloaded);
	//Tu(DebugDownload);

	WriteFile(File, Data, (DWORD)BytesReceived, NULL, NULL);

	BytesReceived = recv(IPv4, Data, DEFAULT_BUFLEN, 0);

	//Tu(L"Still Here!");
}
while (Download->BytesDownloaded < Download->BytesToDownload
	&& Download->DownloadState == Download->ACTIVE);

Tu(L"Hello!");

CloseHandle(File);


http://i.microsoft.com/global/en/publishingimages/sitebrand/microsoft.gif
http://www.codeproject.com/App_Themes/Std/Img/logo225x90.gif
http://www.google.com.eg/images/nav_logo8.png

These are some of the files the loop finishes, but the thread doesn't continue after the while line.
Tu is just a function for MessageBox, it never emerges. WTF | :WTF:

Any clues appreciated!
AnswerRe: WinSock2 / Threads Pin
Moak28-Apr-10 21:05
Moak28-Apr-10 21:05 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 7:39
Fareed Rizkalla29-Apr-10 7:39 
GeneralRe: WinSock2 / Threads Pin
Moak29-Apr-10 8:27
Moak29-Apr-10 8:27 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 8:33
Fareed Rizkalla29-Apr-10 8:33 
JokeRe: WinSock2 / Threads Pin
Moak29-Apr-10 9:31
Moak29-Apr-10 9:31 
AnswerRe: WinSock2 / Threads Pin
«_Superman_»29-Apr-10 5:29
professional«_Superman_»29-Apr-10 5:29 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 7:42
Fareed Rizkalla29-Apr-10 7:42 
GeneralRe: WinSock2 / Threads Pin
«_Superman_»29-Apr-10 8:04
professional«_Superman_»29-Apr-10 8:04 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 8:15
Fareed Rizkalla29-Apr-10 8:15 
GeneralRe: WinSock2 / Threads Pin
«_Superman_»29-Apr-10 8:22
professional«_Superman_»29-Apr-10 8:22 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla29-Apr-10 8:45
Fareed Rizkalla29-Apr-10 8:45 
GeneralRe: WinSock2 / Threads Pin
Fareed Rizkalla30-Apr-10 12:56
Fareed Rizkalla30-Apr-10 12:56 
QuestionRe: WinSock2 / Threads Pin
«_Superman_»30-Apr-10 13:01
professional«_Superman_»30-Apr-10 13:01 
AnswerRe: WinSock2 / Threads Pin
Fareed Rizkalla30-Apr-10 13:10
Fareed Rizkalla30-Apr-10 13:10 
QuestionProblem implementing FIR code(nuhertz) [modified] Pin
browneyes8628-Apr-10 10:26
browneyes8628-Apr-10 10:26 
AnswerRe: Problem implementing FIR code(nuhertz) Pin
LittleYellowBird28-Apr-10 21:59
LittleYellowBird28-Apr-10 21:59 
GeneralRe: Problem implementing FIR code(nuhertz) Pin
browneyes8629-Apr-10 2:11
browneyes8629-Apr-10 2:11 

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.