Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCArray inside CMap Pin
Eugene Pustovoyt19-Jun-03 21:25
Eugene Pustovoyt19-Jun-03 21:25 
GeneralRe: CArray inside CMap Pin
Ryan Binns19-Jun-03 22:58
Ryan Binns19-Jun-03 22:58 
GeneralRe: CArray inside CMap Pin
Eugene Pustovoyt19-Jun-03 23:41
Eugene Pustovoyt19-Jun-03 23:41 
GeneralRe: CArray inside CMap Pin
Ryan Binns19-Jun-03 23:44
Ryan Binns19-Jun-03 23:44 
GeneralRe: CArray inside CMap Pin
basementman20-Jun-03 4:35
basementman20-Jun-03 4:35 
GeneralRe: CArray inside CMap Pin
Ryan Binns20-Jun-03 4:42
Ryan Binns20-Jun-03 4:42 
GeneralGetting IP and Language Pin
xxhimanshu19-Jun-03 19:59
xxhimanshu19-Jun-03 19:59 
GeneralRe: Getting IP and Language Pin
Will Beattie19-Jun-03 23:48
Will Beattie19-Jun-03 23:48 
Here is a code snippet that may be called more than once. The first time will return how many NET I/O addresses are available, a second call may nominate which of the available IP addresses to return. Hope this helps...
cheers
WillB


//*****************************************************************
//** **
//** **
//** **
//** G E T H O S T N A M E **
//** **
//** **
//** **
//*****************************************************************
int MNF_GetHostIPAddress( CString & rszHostName,
CString &rszHostIPAddress,
int nIPSelection)
{
int nIPCount = 0;
in_addr **papIPAddressList;
HOSTENT *ptHostEnt = NULL;

rszHostIPAddress = "";

// ---> ----------------------- <---
// ---> Discover IP address(es) <---
// ---> ----------------------- <---
ptHostEnt = gethostbyname( rszHostName );

if ( ptHostEnt != NULL )
{
papIPAddressList = (in_addr **)&ptHostEnt->h_addr_list[ 0 ];
// ---> ----------------------- <---
// ---> Count the IP Addressess <---
// ---> ----------------------- <---
while ( papIPAddressList[ nIPCount ] != NULL )
{
nIPCount++;
}
if ( nIPSelection < nIPCount )
{
rszHostIPAddress = inet_ntoa( *papIPAddressList[ IPSelection ] );
}
}
return nIPCount;
}
GeneralRe: Getting IP and Language Pin
xxhimanshu20-Jun-03 0:23
xxhimanshu20-Jun-03 0:23 
GeneralRe: Getting IP and Language Pin
Baris Kurtlutepe20-Jun-03 3:46
Baris Kurtlutepe20-Jun-03 3:46 
GeneralRe: Getting IP and Language Pin
xxhimanshu20-Jun-03 18:25
xxhimanshu20-Jun-03 18:25 
GeneralRe: Getting IP and Language Pin
Baris Kurtlutepe20-Jun-03 22:10
Baris Kurtlutepe20-Jun-03 22:10 
GeneralRe: Getting IP and Language Pin
xxhimanshu20-Jun-03 22:27
xxhimanshu20-Jun-03 22:27 
GeneralRe: Getting IP and Language Pin
Baris Kurtlutepe20-Jun-03 23:21
Baris Kurtlutepe20-Jun-03 23:21 
GeneralUnhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Will Beattie19-Jun-03 19:32
Will Beattie19-Jun-03 19:32 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Ryan Binns19-Jun-03 21:16
Ryan Binns19-Jun-03 21:16 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Will Beattie19-Jun-03 22:37
Will Beattie19-Jun-03 22:37 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Ryan Binns19-Jun-03 22:44
Ryan Binns19-Jun-03 22:44 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Will Beattie19-Jun-03 23:29
Will Beattie19-Jun-03 23:29 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Ryan Binns19-Jun-03 23:37
Ryan Binns19-Jun-03 23:37 
GeneralRe: Unhandled Exception Using MFC Sockets in Visual C++ 6.0 Pin
Baris Kurtlutepe20-Jun-03 23:13
Baris Kurtlutepe20-Jun-03 23:13 
GeneralBitmap on a Button Pin
San19-Jun-03 19:19
San19-Jun-03 19:19 
GeneralRe: Bitmap on a Button Pin
valikac19-Jun-03 19:23
valikac19-Jun-03 19:23 
GeneralRe: Bitmap on a Button Pin
Rick York19-Jun-03 19:40
mveRick York19-Jun-03 19:40 
Questionhow can i use CString format the string like &quot;12,123.23&quot; thanks Pin
nodream19-Jun-03 18:33
nodream19-Jun-03 18:33 

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.