Click here to Skip to main content
16,019,740 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp! InternetConnect is broken! Pin
Anacreon6-Jan-06 5:01
Anacreon6-Jan-06 5:01 
QuestionLinear smooth Graph Pin
RockyJames6-Jan-06 3:40
RockyJames6-Jan-06 3:40 
AnswerRe: Linear smooth Graph Pin
Curtis Schlak.6-Jan-06 4:25
Curtis Schlak.6-Jan-06 4:25 
QuestionColumn Selection in MFC Pin
tayal1224366-Jan-06 3:22
tayal1224366-Jan-06 3:22 
AnswerRe: Column Selection in MFC Pin
BlackDice6-Jan-06 5:44
BlackDice6-Jan-06 5:44 
GeneralRe: Column Selection in MFC Pin
tayal1224366-Jan-06 17:45
tayal1224366-Jan-06 17:45 
GeneralRe: Column Selection in MFC Pin
ThatsAlok9-Jan-06 1:00
ThatsAlok9-Jan-06 1:00 
QuestionHow to indicate the buffer size before calling function recv, WSARecv in socket programming??? Pin
lvantin6-Jan-06 3:17
lvantin6-Jan-06 3:17 
Hi all,
I wrote client-server applicaion communicating via socket. I met a big problem that I did not know which function can be use to indicate the buffer size will be received before calling function recv() or WSARecv().
I want to know this information to allocate the buffer enough to receive the message coming.

For example:
int bufSize;
/*Do which thing here to indicate buffer size bufSize = ???*/
char*buffer = new char[bufSize];

recv(hSOCKET,buffer,bufSize,0);

If we dont know this information before calling receiving function, the problem is we won't know how big the buffer size should is.

Although, we can do: char buffer[100000]; but the size of coming message can be bigger or the coming message is too smaller than that.

Any boddy know this problem, Can you help me?

Thanks very much & best regards,
Tin Le





AnswerRe: How to indicate the buffer size before calling function recv, WSARecv in socket programming??? Pin
David Crow6-Jan-06 4:50
David Crow6-Jan-06 4:50 
AnswerRe: How to indicate the buffer size before calling function recv, WSARecv in socket programming??? Pin
John R. Shaw6-Jan-06 19:49
John R. Shaw6-Jan-06 19:49 
Questionhow can i print a file at client's printer Pin
sridhar vattam6-Jan-06 1:42
sridhar vattam6-Jan-06 1:42 
AnswerRe: how can i print a file at client's printer Pin
David Crow6-Jan-06 4:52
David Crow6-Jan-06 4:52 
QuestionHow to select Printer Tray or PaperSource in Visual Studio 2003 .NET? Pin
MSS-Software6-Jan-06 1:33
MSS-Software6-Jan-06 1:33 
AnswerRe: How to select Printer Tray or PaperSource in Visual Studio 2003 .NET? Pin
vipinasda6-Jan-06 4:30
vipinasda6-Jan-06 4:30 
GeneralRe: How to select Printer Tray or PaperSource in Visual Studio 2003 .NET? Pin
MSS-Software6-Jan-06 11:01
MSS-Software6-Jan-06 11:01 
GeneralRe: How to select Printer Tray or PaperSource in Visual Studio 2003 .NET? Pin
vipinasda7-Jan-06 9:10
vipinasda7-Jan-06 9:10 
QuestionHow can I do with CListView? Pin
runningfeng6-Jan-06 1:02
runningfeng6-Jan-06 1:02 
AnswerRe: How can I do with CListView? Pin
Owner drawn6-Jan-06 1:28
Owner drawn6-Jan-06 1:28 
GeneralRe: How can I do with CListView? Pin
runningfeng8-Jan-06 15:13
runningfeng8-Jan-06 15:13 
GeneralRe: How can I do with CListView? Pin
runningfeng8-Jan-06 15:28
runningfeng8-Jan-06 15:28 
QuestionCustomize a toolbar in win32 Pin
Ward6-Jan-06 0:07
Ward6-Jan-06 0:07 
AnswerRe: Customize a toolbar in win32 Pin
Owner drawn6-Jan-06 0:22
Owner drawn6-Jan-06 0:22 
GeneralRe: Customize a toolbar in win32 Pin
Ward6-Jan-06 0:41
Ward6-Jan-06 0:41 
GeneralRe: Customize a toolbar in win32 Pin
Owner drawn6-Jan-06 0:49
Owner drawn6-Jan-06 0:49 
GeneralRe: Customize a toolbar in win32 Pin
Ward6-Jan-06 1:07
Ward6-Jan-06 1:07 

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.