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 394193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:19:55+00:00 2026-05-12T16:19:55+00:00

In my Delphi (on Windows Xp) program I’d like to check available WiFi networks.

  • 0

In my Delphi (on Windows Xp) program I’d like to check available WiFi networks. Do you have any idea how to do it? Best is probably to use MS WlanScan API function but I did not found an example. Can someone help me?

  • 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-12T16:19:55+00:00Added an answer on May 12, 2026 at 4:19 pm

    You can use the Native Wifi API, available since Windows Vista and Windows XP. Older versions of Windows are not supported.

    In this link you can find a very nice translation of the headers.

    I wrote this code using these headers. Tested in Delphi 2007 and Windows Vista.

    program DetectWifiUsingDelphi;
    
    {$APPTYPE CONSOLE}
    
    uses
      Windows,
      SysUtils,
      //TypInfo,
      nduWlanAPI   in 'nduWlanAPI.pas',
      nduWlanTypes in 'nduWlanTypes.pas';
    
    
    function DOT11_AUTH_ALGORITHM_To_String( Dummy :Tndu_DOT11_AUTH_ALGORITHM):String;
    begin
        Result:='';
        case Dummy of
            DOT11_AUTH_ALGO_80211_OPEN          : Result:= '80211_OPEN';
            DOT11_AUTH_ALGO_80211_SHARED_KEY    : Result:= '80211_SHARED_KEY';
            DOT11_AUTH_ALGO_WPA                 : Result:= 'WPA';
            DOT11_AUTH_ALGO_WPA_PSK             : Result:= 'WPA_PSK';
            DOT11_AUTH_ALGO_WPA_NONE            : Result:= 'WPA_NONE';
            DOT11_AUTH_ALGO_RSNA                : Result:= 'RSNA';
            DOT11_AUTH_ALGO_RSNA_PSK            : Result:= 'RSNA_PSK';
            DOT11_AUTH_ALGO_IHV_START           : Result:= 'IHV_START';
            DOT11_AUTH_ALGO_IHV_END             : Result:= 'IHV_END';
        end;
    End;
    
    function DOT11_CIPHER_ALGORITHM_To_String( Dummy :Tndu_DOT11_CIPHER_ALGORITHM):String;
    Begin
        Result:='';
        case Dummy of
        DOT11_CIPHER_ALGO_NONE      : Result:= 'NONE';
        DOT11_CIPHER_ALGO_WEP40     : Result:= 'WEP40';
        DOT11_CIPHER_ALGO_TKIP      : Result:= 'TKIP';
        DOT11_CIPHER_ALGO_CCMP      : Result:= 'CCMP';
        DOT11_CIPHER_ALGO_WEP104    : Result:= 'WEP104';
        DOT11_CIPHER_ALGO_WPA_USE_GROUP : Result:= 'WPA_USE_GROUP OR RSN_USE_GROUP';
        //DOT11_CIPHER_ALGO_RSN_USE_GROUP : Result:= 'RSN_USE_GROUP';
        DOT11_CIPHER_ALGO_WEP           : Result:= 'WEP';
        DOT11_CIPHER_ALGO_IHV_START     : Result:= 'IHV_START';
        DOT11_CIPHER_ALGO_IHV_END       : Result:= 'IHV_END';
        end;
    End;
    
    procedure Scan();
    const
    WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_ADHOC_PROFILES =$00000001;
    var
      hClient              : THandle;
      dwVersion            : DWORD;
      ResultInt            : DWORD;
      pInterface           : Pndu_WLAN_INTERFACE_INFO_LIST;
      i                    : Integer;
      j                    : Integer;
      pAvailableNetworkList: Pndu_WLAN_AVAILABLE_NETWORK_LIST;
      pInterfaceGuid       : PGUID;
      SDummy               : string;
    begin
      ResultInt:=WlanOpenHandle(1, nil, @dwVersion, @hClient);
      if  ResultInt<> ERROR_SUCCESS then
      begin
         WriteLn('Error Open CLient'+IntToStr(ResultInt));
         Exit;
      end;
    
      ResultInt:=WlanEnumInterfaces(hClient, nil, @pInterface);
      if  ResultInt<> ERROR_SUCCESS then
      begin
         WriteLn('Error Enum Interfaces '+IntToStr(ResultInt));
         exit;
      end;
    
      for i := 0 to pInterface^.dwNumberOfItems - 1 do
      begin
       Writeln('Interface       ' + pInterface^.InterfaceInfo[i].strInterfaceDescription);
       WriteLn('GUID            ' + GUIDToString(pInterface^.InterfaceInfo[i].InterfaceGuid));
       Writeln('');
       pInterfaceGuid:= @pInterface^.InterfaceInfo[pInterface^.dwIndex].InterfaceGuid;
    
          ResultInt:=WlanGetAvailableNetworkList(hClient,pInterfaceGuid,WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_ADHOC_PROFILES,nil,pAvailableNetworkList);
          if  ResultInt<> ERROR_SUCCESS then
          begin
             WriteLn('Error WlanGetAvailableNetworkList '+IntToStr(ResultInt));
             Exit;
          end;
    
            for j := 0 to pAvailableNetworkList^.dwNumberOfItems - 1 do
            Begin
               WriteLn(Format('Profile         %s',[WideCharToString(pAvailableNetworkList^.Network[j].strProfileName)]));
               SDummy:=PChar(@pAvailableNetworkList^.Network[j].dot11Ssid.ucSSID);
               WriteLn(Format('NetworkName     %s',[SDummy]));
               WriteLn(Format('Signal Quality  %d ',[pAvailableNetworkList^.Network[j].wlanSignalQuality])+'%');
               //SDummy := GetEnumName(TypeInfo(Tndu_DOT11_AUTH_ALGORITHM),integer(pAvailableNetworkList^.Network[j].dot11DefaultAuthAlgorithm)) ;
               SDummy:=DOT11_AUTH_ALGORITHM_To_String(pAvailableNetworkList^.Network[j].dot11DefaultAuthAlgorithm);
               WriteLn(Format('Auth Algorithm  %s ',[SDummy]));
               SDummy:=DOT11_CIPHER_ALGORITHM_To_String(pAvailableNetworkList^.Network[j].dot11DefaultCipherAlgorithm);
               WriteLn(Format('Auth Algorithm  %s ',[SDummy]));
               Writeln('');
            End;
      end;
    
      WlanCloseHandle(hClient, nil);
    
    end;
    begin
      try
        Scan();
        Readln;
      except
        on E:Exception do
          Writeln(E.Classname, ': ', E.Message);
      end;
    end.
    

    alt text http://i33.tinypic.com/2z83ubt.jpg

    Bye.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows Service written in Delphi which runs a number of programs.
What is the normal way people writing network code in Delphi use Windows-style overlapped
I have tested all my systems developed in Delphi (in Windows XP) on Wine
I would like to create a Delphi application for Windows XP which allows dropping
I have a Windows CGI created with Delphi 2007 using CGIExpert that I need
I have the service name for a windows service in delphi, and I know
When stepping a program in Delphi 7, the CPU window sometimes pops up and
I'm writing a screen recording app for Windows in Delphi 7 and wish to
I'm using Delphi and need to get the current Windows DNS server IP address
Is there anyway to get the THotkey component in delphi to support the windows

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.