監視資源管理器的文件變化
2008-04-09 04:19:59来源:互联网 阅读 ()
我的主页:http://www.tommstudio.com/
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, shlobj, activex, StdCtrls, FileCtrl,strUtils;
const
shcne_renameitem = $1;
shcne_create = $2;
shcne_delete = $4;
shcne_mkdir = $8;
shcne_rmdir = $10;
shcne_mediainserted = $20;
shcne_mediaremoved = $40;
shcne_driveremoved = $80;
shcne_driveadd = $100;
shcne_netshare = $200;
shcne_netunshare = $400;
shcne_attributes = $800;
shcne_updatedir = $1000;
shcne_updateitem = $2000;
shcne_serverdisconnect = $4000;
shcne_updateimage = $8000;
shcne_driveaddgui = $10000;
shcne_renamefolder = $20000;
shcne_freespace = $40000;
shcne_assocchanged = $8000000;
shcne_diskevents = $2381F;
shcne_globalevents = $C0581E0;
shcne_allevents = $7FFFFFFF;
shcne_interrupt = $80000000;
shcnf_idlist = 0; // lpitemidlist
shcnf_patha = $1; // path name
shcnf_printera = $2; // printer friendly name
shcnf_dword = $3; // dword
shcnf_pathw = $5; // path name
shcnf_printerw = $6; // printer friendly name
shcnf_type = $FF;
shcnf_flush = $1000;
shcnf_flushnowait = $2000;
shcnf_path = shcnf_pathw;
shcnf_printer = shcnf_printerw;
wm_shnotify = $401;
noerror = 0;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
DirectoryListBox1: TDirectoryListBox;
DriveComboBox1: TDriveComboBox;
Label1: TLabel;
Button2: TButton;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
procedure wmshellreg(var message: tmessage); message wm_shnotify;
public
{ Public declarations }
end;
type pshnotifystruct = ^shnotifystruct;
shnotifystruct = record
dwitem1: pitemidlist;
dwitem2: pitemidlist;
end;
type pshfileinfobyte = ^shfileinfobyte;
_shfileinfobyte = record
hicon: integer;
iicon: integer;
dwattributes: integer;
szdisplayname: array[0..259] of char;
sztypename: array[0..79] of char;
end;
shfileinfobyte = _shfileinfobyte;
type pidlstruct = ^idlstruct;
_idlstruct = record
pidl: pitemidlist;
bwatchsubfolders: integer;
end;
idlstruct = _idlstruct;
function shnotify_register(hwnd: integer): bool;
function shnotify_unregister: bool;
function sheventname(strpath1, strpath2: string; lparam: integer): string;
function shchangenotifyderegister(hnotify: integer): integer; stdcall;
external ''''shell32.dll'''' index 4;
function shchangenotifyregister(hwnd, uflags, dweventid, umsg, citems: longword;
lpps: pidlstruct): integer; stdcall; external ''''shell32.dll'''' index 2;
function shgetfileinfopidl(pidl: pitemidlist;
dwfileattributes: integer;
psfib: pshfileinfobyte;
cbfileinfo: integer;
uflags: integer): integer; stdcall;
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
相关文章
IDC资讯:
主机资讯
注册资讯
托管资讯
vps资讯
网站建设
网站运营:
建站经验
策划盈利
搜索优化
网站推广
免费资源
网络编程:
Asp.Net编程
Asp编程
Php编程
Xml编程
Access
Mssql
Mysql
其它
服务器技术:
Web服务器
Ftp服务器
Mail服务器
Dns服务器
安全防护
软件技巧:
其它软件
Word
Excel
Powerpoint
Ghost
Vista
QQ空间
QQ
FlashGet
迅雷
网页制作:
FrontPages
Dreamweaver
Javascript
css
photoshop
fireworks
Flash
热门词条
最新资讯
热门关注
热门标签