Click here to Skip to main content
15,888,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How can I run an MFC Application as a Console Application Pin
Luc Pattyn15-Feb-10 14:23
sitebuilderLuc Pattyn15-Feb-10 14:23 
GeneralRe: How can I run an MFC Application as a Console Application Pin
«_Superman_»15-Feb-10 17:08
professional«_Superman_»15-Feb-10 17:08 
AnswerRe: How can I run an MFC Application as a Console Application Pin
Emilio Garavaglia15-Feb-10 22:44
Emilio Garavaglia15-Feb-10 22:44 
QuestionHow to get DLL's path? Pin
John578815-Feb-10 12:24
John578815-Feb-10 12:24 
AnswerRe: How to get DLL's path? Pin
Chris Losinger15-Feb-10 14:13
professionalChris Losinger15-Feb-10 14:13 
QuestionCan someone help with a TRIVIAL database problem Pin
DaveHitchman15-Feb-10 9:32
DaveHitchman15-Feb-10 9:32 
AnswerRe: Can someone help with a TRIVIAL database problem Pin
CPallini15-Feb-10 20:54
mveCPallini15-Feb-10 20:54 
Questionh_addr_list of gethostbyname returns negative values for google.com or other servers like example.com [modified] Pin
Jayapal Chandran15-Feb-10 9:18
Jayapal Chandran15-Feb-10 9:18 
struct hostent *pHost;
int ip,i,j;
string str;
char ipc[6];
str="";
char ctrl[3] = {'\r','\n','\0'};

pHost = gethostbyname("google.com");
for( i = 0; pHost!= NULL && pHost->h_addr_list[i]!= NULL; i++ )
{
    for(j=0; j<pHost->h_length; j++)
    {
        ip = pHost->h_addr_list[i][j];
        str += itoa(ip,ipc,10);
        str += ".";
    }
    str+=ctrl;
}

alert(str);// msgbox wrapper


I get an alert with four addresses one after the other. i get negative values. for example
-47.85.-103.103
-47.85.-103.104
-47.85.-103.109
-47.85.-103.99

when i tried ip-adress.com i got 74.125.43.104 for google
mine is a shared hosting and the values are less than 128 and i get only one address entry.
i have other alternates to find ip adress of an host and i want to try this too...

is it ok to get negative values... i haven't seen that...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
modified on Monday, February 15, 2010 3:34 PM

AnswerRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Graham Breach15-Feb-10 10:04
Graham Breach15-Feb-10 10:04 
AnswerRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Richard MacCutchan15-Feb-10 11:19
mveRichard MacCutchan15-Feb-10 11:19 
AnswerRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow16-Feb-10 4:14
David Crow16-Feb-10 4:14 
QuestionRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran16-Feb-10 7:12
Jayapal Chandran16-Feb-10 7:12 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow16-Feb-10 7:28
David Crow16-Feb-10 7:28 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran16-Feb-10 10:17
Jayapal Chandran16-Feb-10 10:17 
QuestionRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow16-Feb-10 10:19
David Crow16-Feb-10 10:19 
AnswerRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran16-Feb-10 10:44
Jayapal Chandran16-Feb-10 10:44 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran16-Feb-10 11:43
Jayapal Chandran16-Feb-10 11:43 
QuestionRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow17-Feb-10 3:03
David Crow17-Feb-10 3:03 
AnswerRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran17-Feb-10 5:51
Jayapal Chandran17-Feb-10 5:51 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow17-Feb-10 5:58
David Crow17-Feb-10 5:58 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran17-Feb-10 6:15
Jayapal Chandran17-Feb-10 6:15 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow17-Feb-10 6:23
David Crow17-Feb-10 6:23 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran17-Feb-10 7:07
Jayapal Chandran17-Feb-10 7:07 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
David Crow17-Feb-10 7:14
David Crow17-Feb-10 7:14 
GeneralRe: h_addr_list of gethostbyname returns negative values for google.com or other servers like example.com Pin
Jayapal Chandran17-Feb-10 7:23
Jayapal Chandran17-Feb-10 7:23 

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.