Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need a best possible alternative?? Pin
Nelek27-Sep-07 21:19
protectorNelek27-Sep-07 21:19 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish1-Oct-07 10:46
Kiran Satish1-Oct-07 10:46 
GeneralRe: Need a best possible alternative?? Pin
Nelek2-Oct-07 10:19
protectorNelek2-Oct-07 10:19 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery9-Oct-07 6:04
Mark Salsbery9-Oct-07 6:04 
GeneralRe: Need a best possible alternative?? Pin
Kiran Satish18-Jun-08 17:55
Kiran Satish18-Jun-08 17:55 
GeneralRe: Need a best possible alternative?? Pin
Mark Salsbery19-Jun-08 6:40
Mark Salsbery19-Jun-08 6:40 
QuestionCString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 6:41
Mike Borozdin27-Sep-07 6:41 
QuestionRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 7:20
David Crow27-Sep-07 7:20 
Since gethostbyname() expects a const char*, why are you using a char* instead? That in itself is not bad, but your use of GetBuffer() is unnecessary.

Mike Borozdin wrote:
hostent* host = gethostbyname(sHost);


What is the value of sHost at this point? If gethostbyname() is returning NULL, are you calling WSAGetLastError() to find out why?

Mike Borozdin wrote:
address.sin_addr.s_addr = (unsigned long) atoi(host->h_addr_list[0]); //this leads to an exception


Is host non-NULL at this point?


"A good athlete is the result of a good and worthy opponent." - David Crow

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


AnswerRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 7:47
Mike Borozdin27-Sep-07 7:47 
QuestionRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 7:51
David Crow27-Sep-07 7:51 
AnswerRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 8:09
Mike Borozdin27-Sep-07 8:09 
QuestionRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 8:14
David Crow27-Sep-07 8:14 
AnswerRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 8:43
Mike Borozdin27-Sep-07 8:43 
QuestionRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 8:46
David Crow27-Sep-07 8:46 
AnswerRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 9:10
Mike Borozdin27-Sep-07 9:10 
GeneralRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 9:16
David Crow27-Sep-07 9:16 
GeneralRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 9:30
Mike Borozdin27-Sep-07 9:30 
GeneralRe: CString to char* leads to an exception Pin
David Crow27-Sep-07 9:34
David Crow27-Sep-07 9:34 
GeneralRe: CString to char* leads to an exception Pin
Mark Salsbery27-Sep-07 8:38
Mark Salsbery27-Sep-07 8:38 
GeneralRe: CString to char* leads to an exception Pin
Mike Borozdin27-Sep-07 8:44
Mike Borozdin27-Sep-07 8:44 
QuestionDDE Question Pin
__DanC__27-Sep-07 6:18
__DanC__27-Sep-07 6:18 
Questionextend the "Save As..." dialog Pin
carabutnicolae123427-Sep-07 5:39
carabutnicolae123427-Sep-07 5:39 
AnswerRe: extend the "Save As..." dialog Pin
Nelek28-Sep-07 0:37
protectorNelek28-Sep-07 0:37 
GeneralRe: extend the "Save As..." dialog Pin
carabutnicolae123428-Sep-07 3:52
carabutnicolae123428-Sep-07 3:52 
GeneralRe: extend the "Save As..." dialog Pin
Nelek30-Sep-07 22:09
protectorNelek30-Sep-07 22:09 

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.