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

API, COM et SDKs Delphi Discussion :

dossier/fichier "affichés" (explorer.exe)


Sujet :

API, COM et SDKs Delphi

  1. #1
    Membre habitué

    Profil pro
    Inscrit en
    Février 2005
    Messages
    317
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 317
    Points : 183
    Points
    183
    Par défaut dossier/fichier "affichés" (explorer.exe)
    Bonjour, je voudrais savoir comment je peux obtenir le répertoire en cour d'utilisation d'explorer.exe, existe t-il un hook, une api???
    Merci de m'aider je sèche vraiment la.

  2. #2
    Rédacteur


    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    7 171
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 7 171
    Points : 15 060
    Points
    15 060
    Billets dans le blog
    1
    Par défaut
    Salut
    un point d'entrée sur MSDN.

    Bonne lecture.

  3. #3
    Membre habitué

    Profil pro
    Inscrit en
    Février 2005
    Messages
    317
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 317
    Points : 183
    Points
    183
    Par défaut
    J'ai rien trouvé la dedans je vais re-regarder ...
    Merci tout de même!

  4. #4
    Rédacteur


    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    7 171
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 7 171
    Points : 15 060
    Points
    15 060
    Billets dans le blog
    1
    Par défaut
    as-tu regardé ici
    Shell Callback Functions
    FMExtensionProc Function :
    ...
    FMEVENT_SELCHANGE
    Selection in the File Manager directory window or Search Results window has changed.
    ...
    Peut être une solution avec 3 élements:
    le Shell
    une extension du shell ( DLL )
    ton appli
    ??

    Au cas personne ne te proposerais de solution, poste à nouveau ( aprés avoir mis Résolu) dans le forum "Développement Windows".

  5. #5
    Rédacteur


    Profil pro
    Inscrit en
    Janvier 2003
    Messages
    7 171
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2003
    Messages : 7 171
    Points : 15 060
    Points
    15 060
    Billets dans le blog
    1
    Par défaut
    Une autre piste :
    ICurrentWorkingDirectory Interface

    --------------------------------------------------------------------------------

    The ICurrentWorkingDirectory interface allows a client to retrieve or set an object's current working directory.

    ICurrentWorkingDirectory Members

    GetDirectory Retrieves the current working directory.
    SetDirectory Sets the current working directory.

    Remarks

    Implement this interface if your object allows clients to retrieve or set the current working directory.

    Use this interface to retrieve or set the working directory of the object that exports it.

  6. #6
    Membre confirmé
    Avatar de lil_jam63
    Profil pro
    Inscrit en
    Janvier 2004
    Messages
    447
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Janvier 2004
    Messages : 447
    Points : 600
    Points
    600
    Par défaut
    Voilà, pour moi ça fonctionne, ça renvoie le path de la dernière fenêtre explorer utilisée
    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
     
    function GetCtrl(hCtrl: THandle;lParam: LPARAM):boolean; stdcall;
    begin
       Result:=true;
       if (GetDlgCtrlID(hCtrl)=$A205) then
       begin
           SendMessage(hCtrl,WM_GETTEXT,255,LParam);
           Result := not (PChar(LParam)='');
       end;
    end;
     
    function GetPath: String;
    var
      hExplorer, hCtrl: THandle;
      Buffer: Array[0..255] of Char;
      L: Integer;
    begin
       hExplorer:=FindWindow('CabinetWClass',nil);
       if hExplorer=0 then
       begin
        result := 'Aucune fenêtre ouverte';
        exit;
       end;
       hCtrl:=0;
       EnumChildWindows(hExplorer,@GetCtrl,Integer(@Buffer));
       Result:=StrPas(Buffer);
    end;
     
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      ShowMessage(GetPath);
    end;
    ----------------------------------------------------
    Avant de poster, pensez à utiliser les différents outils à votre disposition:
    Google, la FAQ et le moteur de recherche.

  7. #7
    Membre habitué

    Profil pro
    Inscrit en
    Février 2005
    Messages
    317
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2005
    Messages : 317
    Points : 183
    Points
    183
    Par défaut
    Merci a tous!

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

Discussions similaires

  1. Fichier locké par explorer.exe
    Par Glob dans le forum Windows XP
    Réponses: 6
    Dernier message: 31/08/2006, 09h05

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