unit TestNotify;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ShlObj, ShellAPI;
const
WM_SHNOTIFY = WM_USER + 10;
type
TFormTestNotify = class(TForm)
MemoNotifyLog: TMemo;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
FNotifyHandle: THandle;
procedure WMSHNOTIFY(var Msg: TMessage); message WM_SHNOTIFY;
public
{ Public declarations }
end;
var
FormTestNotify: TFormTestNotify;
implementation
{$R *.dfm}
type
NOTIFYREGISTER = packed record
pidlPath: PItemIDList;
bWatchSubtree: BOOL;
end;
PNotifyRegister = ^NOTIFYREGISTER;
{$WARNINGS OFF}
function SHChangeNotifyRegister(hWnd: HWND; dwFlags: Integer;
wEve