Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to Display HTML strings in MFC ? Pin
Sharath Jagannath14-Feb-08 21:41
Sharath Jagannath14-Feb-08 21:41 
AnswerRe: How to Display HTML strings in MFC ? Pin
jjoshua16-Feb-08 17:31
jjoshua16-Feb-08 17:31 
GeneralOnKeyUp() not get invoked Pin
Anu_Bala14-Feb-08 19:07
Anu_Bala14-Feb-08 19:07 
GeneralRe: OnKeyUp() not get invoked Pin
Prasanth M V14-Feb-08 23:23
Prasanth M V14-Feb-08 23:23 
QuestionAbt changing the settings of default keys In Win CE 6.0 Pin
Pankaj Kothawade14-Feb-08 18:52
Pankaj Kothawade14-Feb-08 18:52 
Generalencryption in windows mobile [modified] Pin
guru moorthy.k14-Feb-08 18:51
guru moorthy.k14-Feb-08 18:51 
GeneralRe: encryption in windows mobile Pin
Rajesh R Subramanian14-Feb-08 20:27
professionalRajesh R Subramanian14-Feb-08 20:27 
QuestionThreads not working in network Pin
Wamuti14-Feb-08 18:22
Wamuti14-Feb-08 18:22 
Hi guys. I am trying to implement multithreading in a network oriented program. I had a problem when the server would crash when more than one client application connected to it. Thats why i decided to multithread. Now with the threads the client application keeps on saying that the server is not started when i try to connect after catching "WSAECONNREFUSED".

Before i put the threads the program was working just fine only the server crashing problem so i belive it is the server app that has a problem. Below is the code for the worker thread:

//My listening connection
void CServerSocketDlg::OnListen()
{

THREADVALS * pTv = new THREADVALS;// this structure is declared in my .h
AfxBeginThread(AcceptConnection,pTv);

}

UINT AcceptConnection(LPVOID pParam)
{
THREADVALS * pTv = new THREADVALS;
pTv->m_sServerSocket.Listen();
pTv->m_sServerSocket.Accept(pTv->m_sClientSocket);


return 0;
}

//The structure in my .h

typedef struct ACCEPT
{
CMySocket m_sServerSocket,m_sClientSocket;


}THREADVALS;
//Other necessary code in my .h
UINT AcceptConnection(LPVOID pParam);


void Listen();

I have no syntax error it is just refusing to work i dont know why. Please help.

Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.

GeneralRe: Threads not working in network Pin
Rajkumar R14-Feb-08 19:08
Rajkumar R14-Feb-08 19:08 
QuestionRe: Threads not working in network Pin
Wamuti14-Feb-08 19:52
Wamuti14-Feb-08 19:52 
GeneralRe: Threads not working in network Pin
Mark Salsbery15-Feb-08 6:49
Mark Salsbery15-Feb-08 6:49 
GeneralRe: Threads not working in network Pin
Wamuti17-Feb-08 20:07
Wamuti17-Feb-08 20:07 
GeneralRe: Threads not working in network Pin
Mark Salsbery18-Feb-08 6:19
Mark Salsbery18-Feb-08 6:19 
GeneralRe: Threads not working in network Pin
Wamuti18-Feb-08 19:23
Wamuti18-Feb-08 19:23 
Generalcom Pin
tarak Desai14-Feb-08 17:56
tarak Desai14-Feb-08 17:56 
GeneralRe: com Pin
Wamuti14-Feb-08 18:37
Wamuti14-Feb-08 18:37 
AnswerRe: com Pin
Wamuti14-Feb-08 18:43
Wamuti14-Feb-08 18:43 
GeneralRe: com Pin
ThatsAlok14-Feb-08 22:25
ThatsAlok14-Feb-08 22:25 
GeneralAlignment of Variables Whitin structure Pin
ForNow14-Feb-08 17:53
ForNow14-Feb-08 17:53 
GeneralRe: Alignment of Variables Whitin structure Pin
Maxwell Chen14-Feb-08 18:11
Maxwell Chen14-Feb-08 18:11 
GeneralRe: Alignment of Variables Whitin structure Pin
ForNow14-Feb-08 22:05
ForNow14-Feb-08 22:05 
GeneralRe: Alignment of Variables Whitin structure Pin
Iain Clarke, Warrior Programmer14-Feb-08 22:28
Iain Clarke, Warrior Programmer14-Feb-08 22:28 
GeneralRe: Alignment of Variables Whitin structure Pin
ForNow15-Feb-08 0:01
ForNow15-Feb-08 0:01 
GeneralHelp with OOP Pin
Lord Kixdemp14-Feb-08 17:22
Lord Kixdemp14-Feb-08 17:22 
GeneralRe: Help with OOP [modified] Pin
Rajkumar R14-Feb-08 17:34
Rajkumar R14-Feb-08 17:34 

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.