Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4250832
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:34:50+00:00 2026-05-21T04:34:50+00:00

I have an administrative application that I would like to be able to discover

  • 0

I have an administrative application that I would like to be able to “discover” Windows hosts on the same, or user-specified, subnet. What do you believe is the best way to quickly discover if a range of hosts are online, using Delphi?

I considered pinging the hosts (possibly using WMI and Delphi), but I believe there may be a more reliable way. I am concerned that clients may be configured to not respond to ping requests. Using nbtscan, I can very quickly get a list of Windows hosts on my subnet:

nbtscan 192.168.1.0/24

I’d like to be able to replicate this functionality, but I am not sure where to begin. Currently I am using the ICS component created by François Piette for Delphi 2010.

I welcome any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:34:51+00:00Added an answer on May 21, 2026 at 4:34 am

    After some digging, I found this project on Sourceforge that demonstrates how to perform a NetBios lookup on a single host using Indy components. I tested and this project works well with Delphi 2010. This could, of course, be modified to perform NetBios queries on a range of addresses.

    NBLookup

    unit uNbLookup;
    
    interface
    
    (************************************************************
    
      06-02-2007 - Petricca Antonio (antonio.petricca@gmail.com)
    
      Free for any purpose...
    
      Thanks to:
    
        Jim Halfpenny
        http://directory.fsf.org/security/misc/nbtstat.pl.html
    
    ************************************************************)
    
    uses
    
      IdGlobal,
      IdUDPClient,
      SysUtils,
      Windows;
    
    function NetBiosLookup(AAddress: PChar; AHostName: PChar; ATimeOut: Integer): BOOL; stdcall;
    
    implementation
    
    const
      NB_REQUEST = #$A2#$48#$00#$00#$00#$01#$00#$00 +
                   #$00#$00#$00#$00#$20#$43#$4b#$41 +
                   #$41#$41#$41#$41#$41#$41#$41#$41 +
                   #$41#$41#$41#$41#$41#$41#$41#$41 +
                   #$41#$41#$41#$41#$41#$41#$41#$41 +
                   #$41#$41#$41#$41#$41#$00#$00#$21 +
                   #$00#$01;
    
      NB_PORT    = 137;
      NB_BUFSIZE = 8192;
    
    function NetBiosLookup(AAddress: PChar; AHostName: PChar; ATimeOut: Integer): BOOL; stdcall;
    var
      Buffer    : TIdBytes;
      I         : Integer;
      RepName   : String;
      UDPClient : TIdUDPClient;
    begin
      RepName   := '';
      Result    := False;
      UDPClient := nil;
    
      if not Assigned(AHostName) then
        Exit;
    
      try
        UDPClient := TIdUDPClient.Create(nil);
        with UDPClient do begin
          Host := Trim(AAddress);
          Port := NB_PORT;
    
          Send(NB_REQUEST);
        end;
    
        SetLength(Buffer, NB_BUFSIZE);
        if (0 < UDPClient.ReceiveBuffer(Buffer, ATimeOut)) then begin
    
          for I := 1 to 15 do
            RepName := RepName + Chr(Buffer[56 + I]);
    
          RepName := Trim(RepName);
          StrPCopy(AHostName, RepName);
    
          Result := True;
        end;
    
      except
        Result := False;
      end;
    
      if Assigned(UDPClient) then
        FreeAndNil(UDPClient);
    end;
    
    end.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to authenticate username and passwords for my application on a windows
I have a huge table that is mainly used for backup and administrative purposes.
We have a requirement, wherein the administrative user needs to proxy in as a
I have what the UAC Development Guides refer to as a Administrative Choice Application.
I have an application that uses MSMQ for asynchronous processing of certain things. I
I have built a custom administration panel into a Rails application that allows content
Scenario: I have an administration-application which manages the user accounts for another application. Now
I my Java EE application I have articles administration. There is url like http://localhost:8080/articles/detail.xhtml?article=70
I have a data-mining application that accesses a web-site to retrieve records on an
I have a custom application that was built to send opt-in newsletters and marketing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.