Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Fetching records in Bulk Pin
Hamid_RT13-Sep-06 8:10
Hamid_RT13-Sep-06 8:10 
Questionproblem with resource file Pin
sunil kumar verma12-Sep-06 0:06
sunil kumar verma12-Sep-06 0:06 
AnswerRe: problem with resource file Pin
Waldermort12-Sep-06 0:19
Waldermort12-Sep-06 0:19 
AnswerRe: problem with resource file Pin
Hamid_RT12-Sep-06 2:13
Hamid_RT12-Sep-06 2:13 
QuestionRe: problem with resource file Pin
David Crow12-Sep-06 7:27
David Crow12-Sep-06 7:27 
QuestionPocket & DialogBox? Pin
Divyang Mithaiwala11-Sep-06 23:41
Divyang Mithaiwala11-Sep-06 23:41 
QuestionRLE Compression Pin
Xolture11-Sep-06 23:31
Xolture11-Sep-06 23:31 
QuestionCSocket server + win32 console support MFC Asertion Error Pin
_tasleem11-Sep-06 23:09
_tasleem11-Sep-06 23:09 
i m creating a server which listens for incomming connection in thread but it did not work and gives assertion i m using win32 console application supporting MFC,i had included necessary header file and the libs,
The application is win32 application support MFC,that is why i m initialization the socket through wsadata etc,

here is the code.
DWORD WINAPI ServerThread(  LPVOID lpParameter)<br />
{<br />
 WORD wVersionRequested;<br />
  WSADATA wsaData;<br />
  wVersionRequested = MAKEWORD(2,0);<br />
  if (WSAStartup( wVersionRequested, &wsaData ) == 0 )<br />
  {<br />
  CSocket objServer;<br />
  CSocket objCon;<br />
  objServer.Create(8086);// here is gives the ASSertion<br />
  objServer.Listen();   //rest did not work.<br />
  objServer.Accept(objCon);<br />
	AfxMessageBox("Accepted");<br />
  char data[10];<br />
  if(objCon.Receive(&data,strlen(data))>0)<br />
	{<br />
		AfxMessageBox(data);<br />
		objCon.Close();<br />
		objServer.Close();<br />
	}<br />
	return 0;<br />
}


i m creathing this thread inside the main.
<br />
HANDLE thandle;<br />
thandle= CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)  ServerThread,NULL,0,NULL);<br />
   if (!thandle) <br />
   {<br />
     bRunService=false;<br />
     return false;<br />
   }



-- modified at 5:56 Tuesday 12th September, 2006

Tasleem Arif

QuestionRe: CSocket server + win32 console support MFC Asertion Error Pin
David Crow12-Sep-06 7:29
David Crow12-Sep-06 7:29 
AnswerRe: CSocket server + win32 console support MFC Asertion Error Pin
_tasleem12-Sep-06 18:42
_tasleem12-Sep-06 18:42 
GeneralRe: CSocket server + win32 console support MFC Asertion Error Pin
David Crow13-Sep-06 2:46
David Crow13-Sep-06 2:46 
QuestionLoadLibrary fails in 64 bit O.S. Pin
Sculp11-Sep-06 22:56
Sculp11-Sep-06 22:56 
AnswerRe: LoadLibrary fails in 64 bit O.S. Pin
prasad_som12-Sep-06 0:03
prasad_som12-Sep-06 0:03 
GeneralRe: LoadLibrary fails in 64 bit O.S. Pin
Sculp12-Sep-06 1:01
Sculp12-Sep-06 1:01 
GeneralRe: LoadLibrary fails in 64 bit O.S. Pin
prasad_som12-Sep-06 1:31
prasad_som12-Sep-06 1:31 
QuestionHow to install standard modem with MFC Pin
overfrost11-Sep-06 22:40
overfrost11-Sep-06 22:40 
Questionmaintaining consistant builds between app and plugin Pin
benjymous11-Sep-06 22:35
benjymous11-Sep-06 22:35 
AnswerRe: maintaining consistant builds between app and plugin Pin
Waldermort12-Sep-06 0:26
Waldermort12-Sep-06 0:26 
QuestionCSocket timeout Pin
mehrdadov11-Sep-06 22:20
mehrdadov11-Sep-06 22:20 
Questionhow to implement the "Scan for hardware change" function Pin
jiajiah344511-Sep-06 21:54
jiajiah344511-Sep-06 21:54 
QuestionHow to change Web Browser default printer Pin
ALeyner11-Sep-06 21:15
ALeyner11-Sep-06 21:15 
AnswerRe: How to change Web Browser default printer Pin
CoolCoder_New2-Mar-09 19:53
CoolCoder_New2-Mar-09 19:53 
QuestionCMenu - how to draw the popup arrow yourself? Pin
YaronNir11-Sep-06 21:13
YaronNir11-Sep-06 21:13 
AnswerRe: CMenu - how to draw the popup arrow yourself? Pin
Sarath C11-Sep-06 21:38
Sarath C11-Sep-06 21:38 
GeneralRe: CMenu - how to draw the popup arrow yourself? Pin
YaronNir11-Sep-06 21:55
YaronNir11-Sep-06 21:55 

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.