Click here to Skip to main content
15,909,325 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionVisual C++ 2005 Pin
MoustafaS28-Feb-07 21:00
MoustafaS28-Feb-07 21:00 
AnswerRe: Visual C++ 2005 Pin
Michael Dunn1-Mar-07 5:50
sitebuilderMichael Dunn1-Mar-07 5:50 
GeneralRe: Visual C++ 2005 Pin
MoustafaS1-Mar-07 6:01
MoustafaS1-Mar-07 6:01 
Questionsizeof Operator anomaly Pin
Bulky Fellow28-Feb-07 19:35
Bulky Fellow28-Feb-07 19:35 
AnswerRe: sizeof Operator anomaly Pin
prasad_som1-Mar-07 2:39
prasad_som1-Mar-07 2:39 
GeneralOT Pin
prasad_som1-Mar-07 19:08
prasad_som1-Mar-07 19:08 
QuestionGetting IP Address [modified] Pin
Vichitram25-Feb-07 22:42
Vichitram25-Feb-07 22:42 
AnswerRe: Getting IP Address Pin
prasad_som25-Feb-07 23:10
prasad_som25-Feb-07 23:10 
Use gethostbyname name.
MSDN has this example given,
#include <windows.h>
   #include <winsock.h>
   #include <stdio.h>

   void main()
   {
      WSADATA  wsaData;
      char     szHostname[100];
      HOSTENT *pHostEnt;
      int      nAdapter = 0;
      struct   sockaddr_in sAddr;

      if (WSAStartup(0x0101, &wsaData))
      {
         printf("WSAStartup failed %s\n", WSAGetLastError());
         return;
      }

      gethostname( szHostname, sizeof( szHostname ));
      pHostEnt = gethostbyname( szHostname );

      while ( pHostEnt->h_addr_list[nAdapter] )
      {
       // pHostEnt->h_addr_list[nAdapter] is the current address in host
       // order.

       // Copy the address information from the pHostEnt to a sockaddr_in
       // structure.
         memcpy ( &sAddr.sin_addr.s_addr, pHostEnt->h_addr_list[nAdapter],
                  pHostEnt->h_length);

         // Output the machines IP Address.
         printf("Name:    %s\nAddress: %s\n", pHostEnt->h_name,
                inet_ntoa(sAddr.sin_addr));

         nAdapter++;
      }
      WSACleanup();
      return;

   } 


Vichitram wrote:
I am using VC++ 6.0


You should have asked this question in VC++ forum.


AnswerRe: Getting IP Address Pin
Christian Graus25-Feb-07 23:17
protectorChristian Graus25-Feb-07 23:17 
AnswerRe: Getting IP Address Pin
Hamid_RT1-Mar-07 6:49
Hamid_RT1-Mar-07 6:49 
QuestionPut value on Form from FolderBrowserDialog Pin
Girkers24-Feb-07 21:54
Girkers24-Feb-07 21:54 
AnswerRe: Put value on Form from FolderBrowserDialog Pin
Girkers2-Mar-07 17:25
Girkers2-Mar-07 17:25 
Question[C] Multithreading in windows Pin
venetus24-Feb-07 16:05
venetus24-Feb-07 16:05 
AnswerRe: [C] Multithreading in windows Pin
Christian Graus24-Feb-07 16:25
protectorChristian Graus24-Feb-07 16:25 
QuestionRe: [C] Multithreading in windows Pin
Newbie0025-Feb-07 0:03
Newbie0025-Feb-07 0:03 
AnswerRe: [C] Multithreading in windows Pin
venetus25-Feb-07 2:47
venetus25-Feb-07 2:47 
AnswerRe: [C] Multithreading in windows Pin
venetus25-Feb-07 2:54
venetus25-Feb-07 2:54 
QuestionRe: [C] Multithreading in windows Pin
Newbie0025-Feb-07 3:41
Newbie0025-Feb-07 3:41 
AnswerRe: [C] Multithreading in windows Pin
venetus25-Feb-07 3:43
venetus25-Feb-07 3:43 
GeneralRe: [C] Multithreading in windows Pin
Newbie0025-Feb-07 3:50
Newbie0025-Feb-07 3:50 
GeneralRe: [C] Multithreading in windows Pin
Christian Graus25-Feb-07 9:11
protectorChristian Graus25-Feb-07 9:11 
Question[API] Add a dll Pin
abbd24-Feb-07 4:55
abbd24-Feb-07 4:55 
AnswerRe: [API] Add a dll Pin
Christian Graus24-Feb-07 16:26
protectorChristian Graus24-Feb-07 16:26 
QuestionCopy constructor Pin
Karismatic23-Feb-07 17:09
Karismatic23-Feb-07 17:09 
AnswerRe: Copy constructor Pin
prasad_som24-Feb-07 5:25
prasad_som24-Feb-07 5:25 

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.