IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

 Delphi Discussion :

Module pour recherche réseau Wifi !


Sujet :

Delphi

  1. #1
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut Module pour recherche réseau Wifi !
    Bonjour à toutes et à tous,

    Pour mon système de surveillance par caméra, le logiciel fourni ne semble faire une recherche sur le réseau Wifi dont la clé de sécurité est en TKIP.

    La BBox2 de Belgacom utilise cette clé et donc trouve mon Wifi, les caméras fonctionnent correctement (photo en attache).

    La new BBox3 de Belgacom (Belgique) utilise une clé de sécurité en AES donc la recherche ne trouve pas mon Wifi et forcément plus de caméras.

    Je pensais faire un petit module qui permettrait d'indiquer le nom du réseau et quelle clé de sécurité Aes ou Tkip.

    Avez vous une idée.

    Merci d'avance.

    @+,

    Cincap
    Images attachées Images attachées  

  2. #2
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    Bonjour à toutes et à tous,

    J'avais une petite idée sur la question mais je suppose en D7 alors que j'ai D6 et donc il me manque certainement un composant car j'obtiens une exception sur :

    "nduWlanAPI in 'nduWlanAPI.pas',
    nduWlanTypes in 'nduWlanTypes.pas';"


    A toutes fin, voici le code d'une ancienne source.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
     
    uses
      Windows,
      SysUtils,
      nduWlanAPI   in 'nduWlanAPI.pas',
      nduWlanTypes in 'nduWlanTypes.pas';
     
    function DOT11_AUTH_ALGORITHM_To_String( Dummy :Tndu_DOT11_AUTH_ALGORITHM):AnsiString;
    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):AnsiString;
    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               : AnsiString;
    begin
      ResultInt:=WlanOpenHandle(1, nil, @dwVersion, @hClient);
       try
        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:=PAnsiChar(@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;
       finally
        WlanCloseHandle(hClient, nil);
       end;
    end;
    begin
      try
        Scan();
        Readln;
      except
        on E:Exception do
          Writeln(E.Classname, ': ', E.Message);
      end;
    end.
    @+,

    Cincap

  3. #3
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 043
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 043
    Points : 40 957
    Points
    40 957
    Billets dans le blog
    62
    Par défaut
    Bonjour,

    J'allais te proposer l'utilisation des WMI et de l'excellent WMI Delphi Code Creator,
    mais ce dernier ne génère que du code D7 et +

    je ne sais pas si c'est la bonne mais voilà un exemple de sortie sur NetworkConnectionInfo à tester
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
     
    //-----------------------------------------------------------------------------------------------------
    //     This code was generated by the Wmi Delphi Code Creator (WDCC) Version 1.8.5.0
    //     http://code.google.com/p/wmi-delphi-code-creator/
    //     Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/
    //     Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 
    //----------------------------------------------------------------------------------------------------- 
    //
    //     LIABILITY DISCLAIMER
    //     THIS GENERATED CODE IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
    //     YOU USE IT AT YOUR OWN RISK. THE AUTHOR NOT WILL BE LIABLE FOR DATA LOSS,
    //     DAMAGES AND LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS CODE.
    //
    //----------------------------------------------------------------------------------------------------
    program GetWMI_Info;
     
    {$APPTYPE CONSOLE}
     
    uses
      SysUtils,
      ActiveX,
      ComObj,
      Variants;
     
     
     
    // La classe Win32_NetworkConnection représente une connexion réseau active dans 
    // un environnement Win32.
     
    procedure  GetWin32_NetworkConnectionInfo;
    const
      WbemUser            ='';
      WbemPassword        ='';
      WbemComputer        ='localhost';
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator : OLEVariant;
      FWMIService   : OLEVariant;
      FWbemObjectSet: OLEVariant;
      FWbemObject   : OLEVariant;
      oEnum         : IEnumvariant;
      iValue        : LongWord;
    begin;
      FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
      FWMIService   := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
      FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_NetworkConnection','WQL',wbemFlagForwardOnly);
      oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
      while oEnum.Next(1, FWbemObject, iValue) = 0 do
      begin
        Writeln(Format('AccessMask         %d',[Integer(FWbemObject.AccessMask)]));// Uint32
        Writeln(Format('Caption            %s',[String(FWbemObject.Caption)]));// String
        Writeln(Format('Comment            %s',[String(FWbemObject.Comment)]));// String
        Writeln(Format('ConnectionState    %s',[String(FWbemObject.ConnectionState)]));// String
        Writeln(Format('ConnectionType     %s',[String(FWbemObject.ConnectionType)]));// String
        Writeln(Format('Description        %s',[String(FWbemObject.Description)]));// String
        Writeln(Format('DisplayType        %s',[String(FWbemObject.DisplayType)]));// String
        Writeln(Format('InstallDate        %s',[String(FWbemObject.InstallDate)]));// Datetime
        Writeln(Format('LocalName          %s',[String(FWbemObject.LocalName)]));// String
        Writeln(Format('Name               %s',[String(FWbemObject.Name)]));// String
        Writeln(Format('Persistent         %s',[String(FWbemObject.Persistent)]));// Boolean
        Writeln(Format('ProviderName       %s',[String(FWbemObject.ProviderName)]));// String
        Writeln(Format('RemoteName         %s',[String(FWbemObject.RemoteName)]));// String
        Writeln(Format('RemotePath         %s',[String(FWbemObject.RemotePath)]));// String
        Writeln(Format('ResourceType       %s',[String(FWbemObject.ResourceType)]));// String
        Writeln(Format('Status             %s',[String(FWbemObject.Status)]));// String
        Writeln(Format('UserName           %s',[String(FWbemObject.UserName)]));// String
     
        Writeln('');
        FWbemObject:=Unassigned;
      end;
    end;
     
     
    begin
     try
        CoInitialize(nil);
        try
          GetWin32_NetworkConnectionInfo;
        finally
          CoUninitialize;
        end;
     except
        on E:EOleException do
            Writeln(Format('EOleException %s %x', [E.Message,E.ErrorCode])); 
        on E:Exception do
            Writeln(E.Classname, ':', E.Message);
     end;
     Writeln('Press Enter to exit');
     Readln;      
    end.
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  4. #4
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    @ SergioMaster ,

    Merci de ta réponse, mais je ne sais pas l'appliquer sur mon TForm en D6, à mon avis je dois effacer ce qui correspond à l'unité Form1.

    Pas l'habitude de programmer "{$APPTYPE CONSOLE}"

    Je vais quand même chercher.

    @+,

    Cincap

  5. #5
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 043
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 043
    Points : 40 957
    Points
    40 957
    Billets dans le blog
    62
    Par défaut
    Citation Envoyé par cincap Voir le message
    Pas l'habitude de programmer "{$APPTYPE CONSOLE}"
    moi non plus , et d'ailleurs ce n'est que le code produit par WMI Delphi Code Creator , mais tu as le code nécessaire
    remplacer les writeln par des memo1.lines.add
    par exemple :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    memo1.lines.add(Format('AccessMask         %d',[Integer(FWbemObject.AccessMask)]))
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  6. #6
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    @ Sergio Master,

    Voici le contenu de ma fiche et naturellement cela ne se compile pas.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
     
    //-----------------------------------------------------------------------------------------------------
    //     This code was generated by the Wmi Delphi Code Creator (WDCC) Version 1.8.5.0
    //     http://code.google.com/p/wmi-delphi-code-creator/
    //     Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/
    //     Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014
    //-----------------------------------------------------------------------------------------------------
    //
    //     LIABILITY DISCLAIMER
    //     THIS GENERATED CODE IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
    //     YOU USE IT AT YOUR OWN RISK. THE AUTHOR NOT WILL BE LIABLE FOR DATA LOSS,
    //     DAMAGES AND LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS CODE.
    //
    //----------------------------------------------------------------------------------------------------
    program GetWMI_Info;
     
    {$APPTYPE CONSOLE}
     
    uses
      SysUtils,
      ActiveX,
      ComObj,
      Variants, Classes, Controls, StdCtrls;
     
    type
      TForm1 = class(TForm)
        Memo1: TMemo;
      private
        { Déclarations privées }
      public
        { Déclarations publiques }
      end;
     
    var
      Form1: TForm1;
     
     
     
    implementation
     
    {$R *.dfm} 
     
    // La classe Win32_NetworkConnection représente une connexion réseau active dans
    // un environnement Win32.
     
    procedure  GetWin32_NetworkConnectionInfo;
    const
      WbemUser            ='';
      WbemPassword        ='';
      WbemComputer        ='localhost';
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator : OLEVariant;
      FWMIService   : OLEVariant;
      FWbemObjectSet: OLEVariant;
      FWbemObject   : OLEVariant;
      oEnum         : IEnumvariant;
      iValue        : LongWord;
    begin;
      FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
      FWMIService   := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
      FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_NetworkConnection','WQL',wbemFlagForwardOnly);
      oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
      while oEnum.Next(1, FWbemObject, iValue) = 0 do
      begin
        memo1.lines.add(Format('AccessMask         %d',[Integer(FWbemObject.AccessMask)]));// Uint32
        memo1.lines.add(Format('Caption            %s',[String(FWbemObject.Caption)]));// String
        memo1.lines.add(Format('Comment            %s',[String(FWbemObject.Comment)]));// String
        memo1.lines.add(Format('ConnectionState    %s',[String(FWbemObject.ConnectionState)]));// String
        memo1.lines.add(Format('ConnectionType     %s',[String(FWbemObject.ConnectionType)]));// String
        memo1.lines.add(Format('Description        %s',[String(FWbemObject.Description)]));// String
        memo1.lines.add(Format('DisplayType        %s',[String(FWbemObject.DisplayType)]));// String
        memo1.lines.add(Format('InstallDate        %s',[String(FWbemObject.InstallDate)]));// Datetime
        memo1.lines.add(Format('LocalName          %s',[String(FWbemObject.LocalName)]));// String
        memo1.lines.add(Format('Name               %s',[String(FWbemObject.Name)]));// String
        memo1.lines.add(Format('Persistent         %s',[String(FWbemObject.Persistent)]));// Boolean
        memo1.lines.add(Format('ProviderName       %s',[String(FWbemObject.ProviderName)]));// String
        memo1.lines.add(Format('RemoteName         %s',[String(FWbemObject.RemoteName)]));// String
        memo1.lines.add(Format('RemotePath         %s',[String(FWbemObject.RemotePath)]));// String
        memo1.lines.add(Format('ResourceType       %s',[String(FWbemObject.ResourceType)]));// String
        memo1.lines.add(Format('Status             %s',[String(FWbemObject.Status)]));// String
        memo1.lines.add(Format('UserName           %s',[String(FWbemObject.UserName)]));// String
     
        memo1.lines.add('');
        FWbemObject:=Unassigned;
      end;
    end;
     
     
    begin
     try
        CoInitialize(nil);
        try
          GetWin32_NetworkConnectionInfo;
        finally
          CoUninitialize;
        end;
     except
        on E:EOleException do
            memo1.lines.add(Format('EOleException %s %x', [E.Message,E.ErrorCode])); 
        on E:Exception do
            memo1.lines.add(E.Classname, ':', E.Message);
     end;
     memo1.lines.add('Press Enter to exit');
     Readln;      
    end.
     
    end.
    Le problème vient du renseignement "Form1" me semble t'il.

    @+,

    Cincap

  7. #7
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    Bonjour à toutes et à tous,

    En ouvrant Delphi, j'ai regardé comment créer une application "Console" avec le Wizard.

    Avec ce code, j'obtiens un résultat.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
     
    program Scan_Wifi;
    {$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.
    Si quelqu'un peut le modifier pour une clé de sécurité "Aes" ce serait bien.

    @+,

    Cincap

  8. #8
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 043
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 043
    Points : 40 957
    Points
    40 957
    Billets dans le blog
    62
    Par défaut
    Bonjour,

    ton travail de modification de console vers Form n'a simplement pas été tout à fait assez loin
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
     
    unit Unit1;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ActiveX, Comobj;
     
    type
      TForm1 = class(TForm)
        Memo1: TMemo;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Déclarations privées }
        procedure GetWin32_NetworkConnectionInfo;
      public
        { Déclarations publiques }
      end;
     
    var
      Form1: TForm1;
     
    implementation
     
    {$R *.dfm}
     
    //-----------------------------------------------------------------------------------------------------
    //     This code was generated by the Wmi Delphi Code Creator (WDCC) Version 1.8.5.0
    //     <a href="http://code.google.com/p/wmi-delphi-code-creator/" target="_blank">http://code.google.com/p/wmi-delphi-code-creator/</a>
    //     Blog <a href="http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/" target="_blank">http://theroadtodelphi.wordpress.com...-code-creator/</a>
    //     Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014
    //-----------------------------------------------------------------------------------------------------
    //
    //     LIABILITY DISCLAIMER
    //     THIS GENERATED CODE IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
    //     YOU USE IT AT YOUR OWN RISK. THE AUTHOR NOT WILL BE LIABLE FOR DATA LOSS,
    //     DAMAGES AND LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS CODE.
    //
    //----------------------------------------------------------------------------------------------------
     
    // La classe Win32_NetworkConnection représente une connexion réseau active dans
    // un environnement Win32.
     
    procedure  TForm1.GetWin32_NetworkConnectionInfo;
    const
      WbemUser            ='';
      WbemPassword        ='';
      WbemComputer        ='localhost';
      wbemFlagForwardOnly = $00000020;
    var
      FSWbemLocator : OLEVariant;
      FWMIService   : OLEVariant;
      FWbemObjectSet: OLEVariant;
      FWbemObject   : OLEVariant;
      oEnum         : IEnumvariant;
      iValue        : LongWord;
    begin;
      FSWbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
      FWMIService   := FSWbemLocator.ConnectServer(WbemComputer, 'root\CIMV2', WbemUser, WbemPassword);
      FWbemObjectSet:= FWMIService.ExecQuery('SELECT * FROM Win32_NetworkConnection','WQL',wbemFlagForwardOnly);
      oEnum         := IUnknown(FWbemObjectSet._NewEnum) as IEnumVariant;
      while oEnum.Next(1, FWbemObject, iValue) = 0 do
      begin
        memo1.lines.add(Format('AccessMask         %d',[Integer(FWbemObject.AccessMask)]));// Uint32
        memo1.lines.add(Format('Caption            %s',[String(FWbemObject.Caption)]));// String
        memo1.lines.add(Format('Comment            %s',[String(FWbemObject.Comment)]));// String
        memo1.lines.add(Format('ConnectionState    %s',[String(FWbemObject.ConnectionState)]));// String
        memo1.lines.add(Format('ConnectionType     %s',[String(FWbemObject.ConnectionType)]));// String
        memo1.lines.add(Format('Description        %s',[String(FWbemObject.Description)]));// String
        memo1.lines.add(Format('DisplayType        %s',[String(FWbemObject.DisplayType)]));// String
        memo1.lines.add(Format('InstallDate        %s',[String(FWbemObject.InstallDate)]));// Datetime
        memo1.lines.add(Format('LocalName          %s',[String(FWbemObject.LocalName)]));// String
        memo1.lines.add(Format('Name               %s',[String(FWbemObject.Name)]));// String
        memo1.lines.add(Format('Persistent         %s',[String(FWbemObject.Persistent)]));// Boolean
        memo1.lines.add(Format('ProviderName       %s',[String(FWbemObject.ProviderName)]));// String
        memo1.lines.add(Format('RemoteName         %s',[String(FWbemObject.RemoteName)]));// String
        memo1.lines.add(Format('RemotePath         %s',[String(FWbemObject.RemotePath)]));// String
        memo1.lines.add(Format('ResourceType       %s',[String(FWbemObject.ResourceType)]));// String
        memo1.lines.add(Format('Status             %s',[String(FWbemObject.Status)]));// String
        memo1.lines.add(Format('UserName           %s',[String(FWbemObject.UserName)]));// String
     
        memo1.lines.add('');
        FWbemObject:=Unassigned;
      end;
    end;
     
     
    procedure TForm1.Button1Click(Sender: TObject);
    begin
     GetWin32_NetworkConnectionInfo;
    end;
     
    end.
    ce qui compile en D7 , mais ne donne rien sur mon poste (mais c'est peut être normal )

    je pense que je me suis trompé de Query , en fait c'est pour cela que je te conseillais d'utiliser WMI Delphi code creator qui te permets de tester tout ça en 'live' (option WSQL)


    Bon , entre temps tu as posté ton nouveau code
    Si quelqu'un peut le modifier pour une clé de sécurité "Aes" ce serait bien.
    ce doit certainement être déclaré dans ces unités nduWlanAPI.pas,nduWlanTypes.pas , que je n'ai pas
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  9. #9
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    @ SergioMaster,

    Merci de ta réponse, je suis sous D6 et l'exemple que j'ai placé plus haut fonctionne très bien chez moi, il détecte ma Bbox2 et mon amplificateur Netgear.

    En attache, les fichiers qui te manquent à placer dans le même dossier.

    Cordialement,

    Cincap
    Fichiers attachés Fichiers attachés

  10. #10
    Rédacteur/Modérateur

    Avatar de SergioMaster
    Homme Profil pro
    Développeur informatique retraité
    Inscrit en
    Janvier 2007
    Messages
    15 043
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 67
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Développeur informatique retraité
    Secteur : Industrie

    Informations forums :
    Inscription : Janvier 2007
    Messages : 15 043
    Points : 40 957
    Points
    40 957
    Billets dans le blog
    62
    Par défaut
    AES est aussi connu comme CCMP (de fait je devrai dire l'inverse)

    donc si tu changes la ligne 33
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    DOT11_CIPHER_ALGO_CCMP      : Result:= 'AES';
    je pense que tu as ta réponse
    MVP Embarcadero
    Delphi installés : D3,D7,D2010,XE4,XE7,D10 (Rio, Sidney), D11 (Alexandria), D12 (Athènes)
    SGBD : Firebird 2.5, 3, SQLite
    générateurs États : FastReport, Rave, QuickReport
    OS : Window Vista, Windows 10, Windows 11, Ubuntu, Androïd

  11. #11
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    @ SergioMaster, je l'avais fait et j'avais obtenu une erreur de type "Etiquette de case dupliquée" c'est pourquoi ma demande.

    A moins de placer AES avec CCMP en le séparant d'une virgule, je testerai.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    DOT11_CIPHER_ALGO_CCMP      : Result:= 'CCMP, AES';
    Au fait avec ton code, j'ai compilé sous D6 et je n'obtiens pas de scan comme chez toi, par contre tu ne m'as pas dit si avec le mien tu retrouvais tes réseaux.

    @+,

    Cincap

  12. #12
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    Bonjour à toutes et à tous,

    Je vais fermer le topic même si je n'ai pas eu l'information pour la clé de sécurité en AES.

    Ce que j'avais pensé ne fonctionne pas car les deux clés s'affichent en même temps même si c'est en CCMP.

    DOT11_CIPHER_ALGO_CCMP : Result:= 'CCMP, AES';
    Encore merci pour l'aide.

    @+,

    Cincap

  13. #13
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    Désolé, je reviens vers vous, avec cette source sous D6, j'obtiens une erreur "RLINK32 out of memory !"

    Je pense que sous D7 il n'y a pas de problème.

    Il s'agit certainement du fichier *.dfm ?

    Y a t'il une solution pour D6.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
     
    unit uWifiScanner;
    //This delphi source code was downloaded from www.delphibasics.info
    //Author: RRUZ & Arhitect
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls, ExtCtrls, ComCtrls,  nduWlanAPI,
      nduWlanTypes;
     
    type
      TForm1 = class(TForm)
        ListView1: TListView;
        Panel1: TPanel;
        ComboBox1: TComboBox;
        Label1: TLabel;
        Edit1: TEdit;
        Label2: TLabel;
        procedure Scan();
        procedure FormCreate(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
     
    var
      Form1: TForm1;
     
    implementation
     
    {$R *.dfm}
     
    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 TFORM1.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;
      l:tlistItem;
    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
       COMBOBOX1.Items.Add('Interface       ' + pInterface^.InterfaceInfo[i].strInterfaceDescription);
       edit1.Text:=('GUID            ' + GUIDToString(pInterface^.InterfaceInfo[i].InterfaceGuid));
     
       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
            l:=listview1.Items.Add;
     
               SDummy:=PChar(@pAvailableNetworkList^.Network[j].dot11Ssid.ucSSID);
               l.Caption:=(SDummy);
               l.SubItems.Add(Format('%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);
               l.SubItems.Add(SDummy);
               SDummy:=DOT11_CIPHER_ALGORITHM_To_String(pAvailableNetworkList^.Network[j].dot11DefaultCipherAlgorithm);
               l.SubItems.Add(SDummy);
     
            End;
      end;
     
      WlanCloseHandle(hClient, nil);
     
    end;
     
    procedure TForm1.FormCreate(Sender: TObject);
    begin
    Scan();
    end;
     
    end.
    Merci de l'éventuelle aide.

    @+,

    Cincap

  14. #14
    Modérateur
    Avatar de tourlourou
    Homme Profil pro
    Biologiste ; Progr(amateur)
    Inscrit en
    Mars 2005
    Messages
    3 858
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 61
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Biologiste ; Progr(amateur)

    Informations forums :
    Inscription : Mars 2005
    Messages : 3 858
    Points : 11 301
    Points
    11 301
    Billets dans le blog
    6
    Par défaut
    Si le dfm n'était pas bon, as-tu essayé de repartir d'un projet et d'une fiche vierges, d'ajouter les composants puis le code pour voir si OK ?

    Parmi les solutions efficaces proposées sur internet, l'une était dans un cas de changer l'icône... Facile à essayer, au moins !
    Delphi 5 Pro - Delphi 11.3 Alexandria Community Edition - CodeTyphon 6.90 sous Windows 10 ; CT 6.40 sous Ubuntu 18.04 (VM)
    . Ignorer la FAQ Delphi et les Cours et Tutoriels Delphi nuit gravement à notre code !

  15. #15
    Membre expérimenté
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 426
    Détails du profil
    Informations personnelles :
    Âge : 71
    Localisation : Belgique

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 426
    Points : 1 326
    Points
    1 326
    Par défaut
    @ tourlourou, merci de ta réponse et bravo, te voila modérateur.

    J'avais lu sur le net, qu'il fallait voir au niveau de l'icône de l'application, j'ai testé avec un fichier Ico que j'utilise dans mes applications D6 et même message.

    J'avais aussi testé en remplaçant l'unité et en compilant, même message.

    Par contre en ayant fait cette manipulation, j'avais remarqué que l'icône d'origine était toujours repris dans l'application.

    Edit : Je viens de recommencer la manipulation mais en renommant l'unité et le projet, miracle cela fonctionne.

    Conclusion en gardant le même nom du projet on garde son icône.

    Merci pour l'aide.

    @+,

    Cincap

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Carte PCI ou dongle USB pour un réseau Wifi?
    Par virgul dans le forum Hardware
    Réponses: 14
    Dernier message: 18/07/2006, 17h01
  2. Que faut il ajouter pour un Réseau WiFi pour 2 PC
    Par zakuli dans le forum Hardware
    Réponses: 7
    Dernier message: 18/12/2005, 10h43
  3. recherche de module pour faire des graphiques
    Par Ickou dans le forum Modules
    Réponses: 1
    Dernier message: 01/11/2005, 22h20
  4. [RECHERCHE] un module pour developer une interface graphique
    Par romtrash dans le forum Eclipse Java
    Réponses: 5
    Dernier message: 10/03/2005, 15h46

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo