Solved

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

Posted on 2003-10-30
4
188 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 250 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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