Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
Member 85340358-Nov-15 21:24
Member 85340358-Nov-15 21:24 
AnswerRe: MFC CListCtrl how to Display SubItem text with tabulator ? Pin
David Crow9-Nov-15 1:59
David Crow9-Nov-15 1:59 
QuestionHow to make a Windows service to manage SQLite DB Pin
intelstar venus1-Nov-15 11:41
intelstar venus1-Nov-15 11:41 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan1-Nov-15 22:07
mveRichard MacCutchan1-Nov-15 22:07 
GeneralMessage Closed Pin
2-Nov-15 4:53
intelstar venus2-Nov-15 4:53 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 5:01
mveRichard MacCutchan2-Nov-15 5:01 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 5:20
intelstar venus2-Nov-15 5:20 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 5:22
mveRichard MacCutchan2-Nov-15 5:22 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 5:41
intelstar venus2-Nov-15 5:41 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
Richard MacCutchan2-Nov-15 6:25
mveRichard MacCutchan2-Nov-15 6:25 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 6:44
intelstar venus2-Nov-15 6:44 
QuestionRe: How to make a Windows service to manage SQLite DB Pin
David Crow2-Nov-15 9:14
David Crow2-Nov-15 9:14 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus2-Nov-15 21:28
intelstar venus2-Nov-15 21:28 
AnswerRe: How to make a Windows service to manage SQLite DB Pin
jschell3-Nov-15 16:12
jschell3-Nov-15 16:12 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
intelstar venus4-Nov-15 1:05
intelstar venus4-Nov-15 1:05 
GeneralRe: How to make a Windows service to manage SQLite DB Pin
jschell7-Nov-15 4:58
jschell7-Nov-15 4:58 
Questionsocket:send integer Pin
Member 114755491-Nov-15 4:51
Member 114755491-Nov-15 4:51 
QuestionRe: socket:send integer Pin
Richard MacCutchan1-Nov-15 5:36
mveRichard MacCutchan1-Nov-15 5:36 
AnswerRe: socket:send integer Pin
Member 114755496-Nov-15 4:15
Member 114755496-Nov-15 4:15 
GeneralRe: socket:send integer Pin
Richard MacCutchan6-Nov-15 4:17
mveRichard MacCutchan6-Nov-15 4:17 
AnswerRe: socket:send integer Pin
Jochen Arndt1-Nov-15 21:07
professionalJochen Arndt1-Nov-15 21:07 
There are some errors in your. The first is the buffer size when sending an integer;
if  (( send(sock , (char * )& a , sizeof(&a) , 0) < 0)  )

The passed buffer size is wrong. It should be:
if  (( send(sock , (char * )& a , sizeof(a) , 0) < 0)  )


When reading replies, you probably want to read them into another buffer (as indicated by the size). So change
if( recv(sock , (char *)& a , 2000 , 0) < 0)

to
if( recv(sock , server_reply , sizeof(server_reply) , 0) < 0)


Similar for the server where you should first read an integer and then send the reply. So change this
if ( (read_size = recv(client_sock , (char *)&a , 2000 , 0)) > 0 )

to
if ( (read_size = recv(client_sock , (char *)&a , sizeof(a) , 0)) > 0 )

and send the reply afterwards.
GeneralRe: socket:send integer Pin
Member 114755496-Nov-15 4:16
Member 114755496-Nov-15 4:16 
Questionuint32_t result of uint16_t addition Pin
elelont230-Oct-15 3:44
elelont230-Oct-15 3:44 
AnswerRe: uint32_t result of uint16_t addition Pin
Jochen Arndt30-Oct-15 4:00
professionalJochen Arndt30-Oct-15 4:00 
AnswerRe: uint32_t result of uint16_t addition Pin
jeron130-Oct-15 4:08
jeron130-Oct-15 4:08 

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.