By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,078 Members | 2,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,078 IT Pros & Developers. It's quick & easy.

Retrieve Domain Name

P: n/a
Hello Friends

I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language. I'm very appreciate if anyone
give me an example how can I solve this.
Im new on this language and and perhaps this is very easy for all of you :)

Thanks for help

Bruno R.
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Bruno" <Br***@discussions.microsoft.com> schrieb:
I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language.


Can you describe the scenario in more detail? What do you mean with
"retrieving a domain name"?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
Hello

I need to create a simple application that returns the domain name where the
user name logs in. For example, if I acccess in a computer with the domain
user Contoso\bruno, my application should return the value "CONTOSO".
Basically, my application when executed in a pc that belongs to a domain,
must return the CONTOSO.COM (domain name). All this in Visual Basic.net.

Thank you for help

"Herfried K. Wagner [MVP]" wrote:
"Bruno" <Br***@discussions.microsoft.com> schrieb:
I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language.


Can you describe the scenario in more detail? What do you mean with
"retrieving a domain name"?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

P: n/a
On Tue, 26 Apr 2005 11:27:02 -0700, "Bruno" <Br***@discussions.microsoft.com> wrote:

Hello Friends

I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language. I'm very appreciate if anyone
give me an example how can I solve this.
Im new on this language and and perhaps this is very easy for all of you :)

Try the following:

Dim SystemInfo As Object

SystemInfo = CreateObject("ADSystemInfo")
MsgBox(SystemInfo.ForestDNSName)
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.