Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegSetValueEx crashing Pin
monsieur_jj7-Sep-08 19:28
monsieur_jj7-Sep-08 19:28 
AnswerRe: RegSetValueEx crashing Pin
Rane7-Sep-08 20:04
Rane7-Sep-08 20:04 
GeneralRe: RegSetValueEx crashing Pin
monsieur_jj7-Sep-08 20:22
monsieur_jj7-Sep-08 20:22 
GeneralRe: RegSetValueEx crashing Pin
Rane8-Sep-08 0:07
Rane8-Sep-08 0:07 
QuestionRe: RegSetValueEx crashing Pin
CPallini7-Sep-08 23:45
mveCPallini7-Sep-08 23:45 
QuestionRe: RegSetValueEx crashing Pin
David Crow8-Sep-08 4:02
David Crow8-Sep-08 4:02 
QuestionGetting the IP adress of the computer Pin
Deepu Antony7-Sep-08 19:02
Deepu Antony7-Sep-08 19:02 
AnswerRe: Getting the IP adress of the computer Pin
_AnsHUMAN_ 7-Sep-08 19:12
_AnsHUMAN_ 7-Sep-08 19:12 
 void GetHostIP()
{
    char *Ip;
    WSADATA wsaData;
    struct hostent *pHostEnt; 
    struct sockaddr_in tmpSockAddr; //placeholder for the ip address

    // Not needed if it is already taken care by some other part of the application
    WSAStartup(MAKEWORD(2,0),&wsaData); 

    char hostname[25];
    strcpy(hostname,"Test Computer Name")
    //This will retrieve the ip details and put it into pHostEnt structure
    pHostEnt = gethostbyname(hostname);

    if(pHostEnt == NULL)
    {
        printf("Error occured: %s\n",GetLastError());
        return;
    }

    memcpy(&tmpSockAddr.sin_addr,pHostEnt->h_addr,pHostEnt->h_length);

    Ip = NULL;
    Ip = new char[17];
    strcpy(Ip,inet_ntoa(tmpSockAddr.sin_addr));
    printf("Ip Address of the machine %s is %s\n",Ip);

    // Not needed if it is already taken care by some other part of the application
    WSACleanup();
    delete [] Ip;
}


Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:35
Deepu Antony7-Sep-08 21:35 
AnswerRe: Getting the IP adress of the computer Pin
Rane7-Sep-08 19:13
Rane7-Sep-08 19:13 
GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:33
Deepu Antony7-Sep-08 21:33 
GeneralRe: Getting the IP adress of the computer Pin
SandipG 7-Sep-08 21:40
SandipG 7-Sep-08 21:40 
QuestionRun as Service Pin
cpvc++7-Sep-08 18:55
cpvc++7-Sep-08 18:55 
AnswerRe: Run as Service Pin
Rane7-Sep-08 19:00
Rane7-Sep-08 19:00 
AnswerRe: Run as Service Pin
Mark Salsbery8-Sep-08 6:25
Mark Salsbery8-Sep-08 6:25 
QuestionSingle Row Selection in CListCtrl ! Pin
Le@rner7-Sep-08 18:49
Le@rner7-Sep-08 18:49 
AnswerRe: Single Row Selection in CListCtrl ! Pin
_AnsHUMAN_ 7-Sep-08 19:00
_AnsHUMAN_ 7-Sep-08 19:00 
AnswerRe: Single Row Selection in CListCtrl ! Pin
Naveen7-Sep-08 19:01
Naveen7-Sep-08 19:01 
GeneralRe: Single Row Selection in CListCtrl ! Pin
Le@rner7-Sep-08 19:42
Le@rner7-Sep-08 19:42 
QuestionDrive name Pin
MsmVc7-Sep-08 18:41
MsmVc7-Sep-08 18:41 
AnswerRe: Drive name Pin
_AnsHUMAN_ 7-Sep-08 18:46
_AnsHUMAN_ 7-Sep-08 18:46 
GeneralRe: Drive name Pin
MsmVc7-Sep-08 19:31
MsmVc7-Sep-08 19:31 
GeneralRe: Drive name Pin
MsmVc7-Sep-08 19:36
MsmVc7-Sep-08 19:36 
GeneralRe: Drive name Pin
_AnsHUMAN_ 7-Sep-08 19:53
_AnsHUMAN_ 7-Sep-08 19:53 
AnswerRe: Drive name Pin
Naveen7-Sep-08 18:59
Naveen7-Sep-08 18:59 

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.