Click here to Skip to main content
15,904,655 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMemory Analysis Pin
RadioOpa28-Feb-06 22:56
RadioOpa28-Feb-06 22:56 
AnswerRe: Memory Analysis Pin
John R. Shaw28-Feb-06 23:42
John R. Shaw28-Feb-06 23:42 
GeneralRe: Memory Analysis Pin
RadioOpa28-Feb-06 23:56
RadioOpa28-Feb-06 23:56 
AnswerRe: Memory Analysis Pin
Ryan Binns1-Mar-06 3:07
Ryan Binns1-Mar-06 3:07 
AnswerRe: Memory Analysis Pin
David Crow1-Mar-06 3:15
David Crow1-Mar-06 3:15 
QuestionIP address of the computer using VC++ Pin
mailsafe28-Feb-06 22:51
mailsafe28-Feb-06 22:51 
AnswerRe: IP address of the computer using VC++ Pin
khan++1-Mar-06 0:36
khan++1-Mar-06 0:36 
AnswerRe: IP address of the computer using VC++ Pin
vivek.s.vivek1-Mar-06 0:43
vivek.s.vivek1-Mar-06 0:43 
go thru this one.

char szHostName[128];

if( gethostname(szHostName, 128) == 0 )
{
// Get host adresses
struct hostent * pHost;
int i;

pHost = gethostbyname(szHostName);

for( i = 0; pHost!= NULL && pHost->h_addr_list[i]!= NULL; i++ )
{
CString str;
int j;

for( j = 0; j < pHost->h_length; j++ )
{
CString addr;

if( j > 0 )
str += ".";

addr.Format("%u", (unsigned int)((unsigned
char*)pHost->h_addr_list[i])[j]);
str += addr;
}
// str now contains one local IP address - do whatever you want to do with it (probably add it to a list)
}
}



viveks
AnswerRe: IP address of the computer using VC++ Pin
ThatsAlok1-Mar-06 2:45
ThatsAlok1-Mar-06 2:45 
Questionto link MDI interface to a dialog Pin
mailsafe28-Feb-06 22:41
mailsafe28-Feb-06 22:41 
QuestionRe: to link MDI interface to a dialog Pin
Nibu babu thomas1-Mar-06 16:49
Nibu babu thomas1-Mar-06 16:49 
QuestionUsing Sockets in Win32 DLL Pin
castratroi28-Feb-06 21:03
castratroi28-Feb-06 21:03 
Questionvirtual function declarations Pin
lastgen28-Feb-06 20:45
lastgen28-Feb-06 20:45 
AnswerRe: virtual function declarations Pin
lastgen28-Feb-06 20:55
lastgen28-Feb-06 20:55 
GeneralRe: virtual function declarations Pin
Cedric Moonen28-Feb-06 20:58
Cedric Moonen28-Feb-06 20:58 
AnswerRe: virtual function declarations Pin
Cedric Moonen28-Feb-06 20:57
Cedric Moonen28-Feb-06 20:57 
AnswerRe: virtual function declarations Pin
Nibu babu thomas28-Feb-06 20:57
Nibu babu thomas28-Feb-06 20:57 
AnswerRe: virtual function declarations Pin
John R. Shaw28-Feb-06 23:03
John R. Shaw28-Feb-06 23:03 
QuestionC++ Pin
yaaqub28-Feb-06 20:04
yaaqub28-Feb-06 20:04 
AnswerRe: C++ Pin
Nibu babu thomas28-Feb-06 20:10
Nibu babu thomas28-Feb-06 20:10 
AnswerRe: C++ Pin
Ryan Binns28-Feb-06 20:11
Ryan Binns28-Feb-06 20:11 
AnswerRe: C++ Pin
_AnsHUMAN_ 28-Feb-06 21:25
_AnsHUMAN_ 28-Feb-06 21:25 
GeneralRe: C++ Pin
David Crow1-Mar-06 3:18
David Crow1-Mar-06 3:18 
GeneralRe: C++ Pin
_AnsHUMAN_ 1-Mar-06 5:03
_AnsHUMAN_ 1-Mar-06 5:03 
GeneralRe: C++ Pin
David Crow1-Mar-06 6:39
David Crow1-Mar-06 6:39 

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.