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.
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.
Salut
un point d'entrée sur MSDN.
Bonne lecture.
Tutoriels Delphi Win32/Delphi .NET/Oracle/PowerShell - FAQ Delphi - FAQ Delphi .NET
Beatus, qui prodest, quibus potest.
J'ai rien trouvé la dedansje vais re-regarder ...
Merci tout de même!
as-tu regardé ici
Shell Callback Functions
Peut être une solution avec 3 élements:FMExtensionProc Function :
...
FMEVENT_SELCHANGE
Selection in the File Manager directory window or Search Results window has changed.
...
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".
Tutoriels Delphi Win32/Delphi .NET/Oracle/PowerShell - FAQ Delphi - FAQ Delphi .NET
Beatus, qui prodest, quibus potest.
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.
Tutoriels Delphi Win32/Delphi .NET/Oracle/PowerShell - FAQ Delphi - FAQ Delphi .NET
Beatus, qui prodest, quibus potest.
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;
Partager