Board index » delphi » How do I get a list of computer names on an NT network

How do I get a list of computer names on an NT network

I have a peer to peer NT Workstation network.

I would like to get a list of the names of all the active machines on the
network.

Can anyone help?

thanks

 

Re:How do I get a list of computer names on an NT network


On 08 Nov 1999 15:47:28 GMT, r2...@aol.com (R2jel) wrote:

Quote
>>I have a peer to peer NT Workstation network.

>>I would like to get a list of the names of all the active machines on the
>>network.

You bet! Try a set of components called TJam...

www.jam-software.com/

The "-" in the url drives my version of Netscape nuts but it retreives
it anyway.

Holler if you cannot access it and I can attach a zip to an email it
is shareware but costs only $29 to register. Pretty awesomne stuff.

If you want to do it yourself check SHBrowseForFolder in the Win API
help section. Then you will see that $29 is cheap. <vbg>

--

Grumpy, the Third Dwarf
(Dave Johnson)

*****************************************
If I were taller, I wouldn't be so short!
      Dyslexics of the world, untie
*****************************************

Re:How do I get a list of computer names on an NT network


Quote
R2jel <r2...@aol.com> wrote in message

news:19991108104728.10770.00002083@ng-ck1.aol.com...

Quote
> I have a peer to peer NT Workstation network.

> I would like to get a list of the names of all the active machines on the
> network.

I haven't tried this on NT, but it works OK on W98....

uses ShlObj;

var
  BrowseInfo: TBrowseInfo;
  IDRoot: PItemIDList;
  Path: array[0..MAX_PATH] of Char;
  DisplayName: array[0..MAX_PATH] of Char;
begin
  SHGetSpecialFolderLocation(Handle, CSIDL_NETWORK, IDRoot);
  FillMemory(@BrowseInfo, SizeOf(TBrowseInfo), 0);
  with BrowseInfo do
  begin
    hwndOwner := Handle;
    pidlRoot := IDRoot;
    pszDisplayName := DisplayName;
    ulFlags := BIF_BROWSEFORCOMPUTER;
  end;
  SHBrowseForFolder(BrowseInfo);
  if DisplayName <> '' then ShowMessage(DisplayName);
end;

--
Stephen Brown

Other Threads