Click here to Skip to main content
15,895,538 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Copy the data in List control using ctrl+C Pin
ThatsAlok5-Sep-07 23:31
ThatsAlok5-Sep-07 23:31 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 1:18
shir_k6-Sep-07 1:18 
GeneralRe: Copy the data in List control using ctrl+C Pin
Nishad S6-Sep-07 1:38
Nishad S6-Sep-07 1:38 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 2:27
shir_k6-Sep-07 2:27 
GeneralRe: Copy the data in List control using ctrl+C Pin
David Crow6-Sep-07 3:19
David Crow6-Sep-07 3:19 
GeneralRe: Copy the data in List control using ctrl+C Pin
ThatsAlok6-Sep-07 5:02
ThatsAlok6-Sep-07 5:02 
GeneralRe: Copy the data in List control using ctrl+C [modified] Pin
shir_k8-Sep-07 19:52
shir_k8-Sep-07 19:52 
QuestionUDP Server Pin
Andy2025-Sep-07 23:01
Andy2025-Sep-07 23:01 
I would like my UDP server to send the data when the client connects; say at a rate of 100 msec.
But I can only get it working when the Server does a receive first (so the client has to do a send) then the Server does the send.

Can this be done? The server fails if I do not do the Receive and the client fails if I dont run the server first.

See code below:-

	while(g_bUDP_Socket_Created && g_bUDPStatus)<br />
	{<br />
		bytesRead = recvfrom (conn_socket, (char *)&RxBuffer, sizeof(RxBuffer), 0, (struct sockaddr *)&from, &length);<br />
		// bytesRead = recv(conn_socket, BufferIn, sizeof(BufferIn), 0);<br />
		// Check for error and terminate the thread if any found<br />
		if (bytesRead == SOCKET_ERROR) <br />
		{<br />
			g_szFormatting.Format("Couldn't receive data, %d",WSAGetLastError());<br />
			::MessageBox((HWND)NULL,g_szFormatting, NULL,MB_ICONEXCLAMATION );<br />
			closesocket (conn_socket);<br />
			WSACleanup();<br />
			return -1;<br />
		}<br />
<br />
		retval = sendto (conn_socket, (char*)TxBuffer, sizeof(Tx_Data), 0, (struct sockaddr *)&from, fromlen);<br />
		if (retval == SOCKET_ERROR)<br />
		{	<br />
			g_szFormatting.Format("Couldn't send data, %d",WSAGetLastError());<br />
			::MessageBox((HWND)NULL,g_szFormatting, NULL,MB_ICONEXCLAMATION );<br />
			closesocket (conn_socket);<br />
			WSACleanup();<br />
		}<br />
	}

QuestionRe: UDP Server Pin
Mark Salsbery6-Sep-07 5:51
Mark Salsbery6-Sep-07 5:51 
AnswerRe: UDP Server Pin
Andy2026-Sep-07 10:58
Andy2026-Sep-07 10:58 
GeneralRe: UDP Server Pin
Mark Salsbery6-Sep-07 11:33
Mark Salsbery6-Sep-07 11:33 
GeneralRe: UDP Server Pin
Andy2027-Sep-07 4:48
Andy2027-Sep-07 4:48 
GeneralRe: UDP Server Pin
Mark Salsbery7-Sep-07 5:22
Mark Salsbery7-Sep-07 5:22 
GeneralRe: UDP Server Pin
Andy2027-Sep-07 9:13
Andy2027-Sep-07 9:13 
GeneralRe: UDP Server Pin
Moak8-Nov-07 12:37
Moak8-Nov-07 12:37 
Questionhow to establish usb communication in MFC? Pin
ashokbngr5-Sep-07 22:43
ashokbngr5-Sep-07 22:43 
AnswerRe: how to establish usb communication in MFC? Pin
Cedric Moonen5-Sep-07 23:16
Cedric Moonen5-Sep-07 23:16 
Questionnumerical methods Pin
mitsui585-Sep-07 22:00
mitsui585-Sep-07 22:00 
AnswerRe: numerical methods Pin
Russell'5-Sep-07 22:39
Russell'5-Sep-07 22:39 
GeneralRe: numerical methods Pin
mitsui585-Sep-07 22:53
mitsui585-Sep-07 22:53 
GeneralRe: numerical methods Pin
Russell'5-Sep-07 23:13
Russell'5-Sep-07 23:13 
GeneralRe: numerical methods Pin
mitsui587-Sep-07 4:35
mitsui587-Sep-07 4:35 
AnswerRe: numerical methods Pin
David Crow6-Sep-07 3:28
David Crow6-Sep-07 3:28 
AnswerRe: numerical methods Pin
ollydbg239-Sep-07 1:05
ollydbg239-Sep-07 1:05 
QuestionHow can I monitor the cts pin of serial port using dcb Pin
yaminisridaran5-Sep-07 20:06
yaminisridaran5-Sep-07 20:06 

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.