Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2007 Jan : SHChangeNotifyRegister API
| Subject: | SHChangeNotifyRegister API |
| Posted by: | "Barry Morris" (nospam.barry_morris@btinternet.com) |
| Date: | Fri, 12 Jan 2007 13:38:41 |
Hello
I have been using SHChangeNotifyRegister etc thanks to a component written
by Elliott Shevin, but this seems to not work with SHCNE_CREATE on Windows
Vista, some other events work, e.g. SHCNE_DELETE and SHCNE_RENAMEITEM are
okay. Is there a work around or another way of getting notification of a
create file and where the item was created?
I am using SHChangeNotifyRegister to determine the drop target of a drag
drop operation onto explorer by creating a unique filename (GUID) and been
told by SHChangeNotifyRegister where it was dropped.
code snippet....
NotifyCount := 1;
with NotifyArray[1] do begin
pidlPath := nil;
bWatchSubtree := true;
end;
NotifyPtr := addr(NotifyArray);
NotifyHandle := SHChangeNotifyRegister(
(Owner as TWinControl).Handle,
SHCNF_ACCEPT_INTERRUPTS +
SHCNF_ACCEPT_NON_INTERRUPTS,
SHCNE_CREATE,
fMessageNo,
NotifyCount,
NotifyPtr);
TIA
Barry Morris