Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

[Windows NT/2000/XP] Enumerating all domains where user can logon

Posted on 2003-10-30
4
Medium Priority
?
191 Views
Last Modified: 2010-04-05
 Some of you may use Windows 2000, and you may know that, in Windows 2000, when logging in, you must to inform login, password and for some cases, also to inform the domain where you will log in. A pretty Combobox is shown, listing all domains where you can log from that machine.
  My question is: how to discover all domains where you can log from your local machine, to populate that combobox?
  (I discovered the function LSAEnumerateTrustedDomain, but I don't know where can I find the API headers to make it work.)
0
Comment
Question by:knightmad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
Bijith earned 1000 total points
ID: 9650431
please
 
look at http://endimus.com/oldcontent/files/index_en.php

Download the file, This contain all you need

cheers
0
 
LVL 3

Expert Comment

by:Bijith
ID: 9650452
In the above link
Sorry to say

DownLoads -->  NetworkUnits

cheers
0
 
LVL 7

Author Comment

by:knightmad
ID: 9655131
Thank you, I am evaluating the answer and will return soon : )
0
 

Expert Comment

by:stewartbash
ID: 21077578
Funny... I have been trying to duplicate what I did in Delphi using c# .NET and I have not gotten what I would expect. The delphi code looks like this:

{you can Ignore the invokation below this was a multi-threaded object in addition you can remove the TDomainObjectClass instanciation of coures... that is my own}

{AND this DOES NOT WORK IIN .NET}

procedure TDomainsObjectClass.GetDomains;
var
  dn: DirectoryEntry;
  en: IEnumerator;
begin
  FStatusDisplay.Panels[1].Text := 'Domain Acquisition In Progress...';
  dn:= DirectoryEntry.Create('WinNT:');
  en := dn.Children.GetEnumerator;
  if en<>nil
    then while en.MoveNext do
           try
             FDomainList.Add( TDomainObjectClass.Create(DirectoryEntry(en.Current).Name.Trim, FComputerDisplay));
             FDomainCount := FDomainList.Count;
           except
           end;
  en := nil;
  dn.Free;
  FDomainDisplay.Invoke(System.Delegate(@FDelegate));
  if FDomainDisplay.Items.Count>0
    then FDomainDisplay.Enabled := True;
end;
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question