How do I retrieve the Name of a domain on which my machine is running ( like .microsoft.com) ?
M.Anand
Development - Lead ,
Satyam Infoway Limited,
Chennai - 600034
India
Printable View
How do I retrieve the Name of a domain on which my machine is running ( like .microsoft.com) ?
M.Anand
Development - Lead ,
Satyam Infoway Limited,
Chennai - 600034
India
Is it right?
char lpBuffer[50];
GetEnvironmentVariable("userdomain",lpBuffer,50);
printf(lpBuffer);
Hi
Thanks for your response but I think "userdomain" is a crucial parameter. I know my Machine Name and nothing else. I got the solution anyway. I used gethostbyName which returns HOSTENT structure which has the Domain details
Anand
M.Anand
Development - Lead ,
Satyam Infoway Limited,
Chennai - 600034
India