|
-
March 1st, 2000, 10:33 AM
#1
Domain
Can someone tell me how I can retrieve the domain name a machine belongs to???
Is there a specfic NET API that I could use
I really need this badly so if someone has any suggestions it would be greatly appreciated...
Thanks
tcompe
-
March 1st, 2000, 10:48 AM
#2
Re: Domain
What's your platform? NT has API functions available to do this, but Win9x does not.
-
March 1st, 2000, 10:52 AM
#3
Re: Domain
Sorry...forgot to mention that
NT
-
March 1st, 2000, 11:33 AM
#4
Re: Domain
NetAPI32.dll has a function called NetWkstaUserGetInfo which, when called with the parameter "level" set to 1101 return a space seperated list of domains accessed by the workstation. This may work for you. I've never used it in VB, so maybe someone who has can help you with the call.
-
March 1st, 2000, 11:38 AM
#5
Re: Domain
Almost forgot...
take a look at HKEY_LOCAL_MACHINE\Security\Provider
-
March 1st, 2000, 12:05 PM
#6
Re: Domain
i'm running Win NT workstation 4 (sp3). i don't have a provider hive under the security hive. In fact, my security folder is empty. could it be permissions? I'm not sure how that could be, I am in the admin group on the local machine.
oh well.
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
-
March 1st, 2000, 12:14 PM
#7
Re: Domain
Maybe do an Edit...Find on your registry for the name of your domain?
-
March 1st, 2000, 12:30 PM
#8
Re: Domain
I found it in these two places:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CachePrimaryDomain
Just FYI.
Thanks,
john
John Pirkey
MCSD
www.ShallowWaterSystems.com
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
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
|