|
-
May 17th, 1999, 12:38 AM
#1
How to get Domain Name ?
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
-
May 17th, 1999, 06:42 AM
#2
Re: How to get Domain Name ?
Is it right?
char lpBuffer[50];
GetEnvironmentVariable("userdomain",lpBuffer,50);
printf(lpBuffer);
-
May 17th, 1999, 07:50 AM
#3
Re: How to get Domain Name ?
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|