在删除.exe系统会发什么消息呢????

zhangchao_7622 2002-02-07 12:01:26
删除一个.exe文件是系统会发什么消息呢???
我如何知道删除的文件名称呢?
...全文
34 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
liu_feng_fly 2002-02-07
  • 打赏
  • 举报
回复
Monitoring Changes in a Directory or Directory Tree
The following example monitors the directory tree starting at C:\ for directory name changes. It also monitors the C:\WINDOWS directory for file name changes.

The example uses the FindFirstChangeNotification function to create two notification handles and the WaitForMultipleObjects function to wait on the handles. Whenever a directory is created or deleted in the tree starting at C:\ , the example updates the entire directory tree. Whenever a file is created or deleted in the C:\WINDOWS directory, the example refreshes the WINDOWS directory. The FindNextChangeNotification function restarts the change notification each time the example processes a change.

DWORD dwWaitStatus;
HANDLE dwChangeHandles[2];

// Watch the C:\WINDOWS directory for file creation and
// deletion.

dwChangeHandles[0] = FindFirstChangeNotification(
"C:\\WINDOWS", // directory to watch
FALSE, // do not watch the subtree
FILE_NOTIFY_CHANGE_FILE_NAME); // watch file name changes

if (dwChangeHandles[0] == INVALID_HANDLE_VALUE)
ExitProcess(GetLastError());

// Watch the C:\ subtree for directory creation and
// deletion.

dwChangeHandles[1] = FindFirstChangeNotification(
"C:\\", // directory to watch
TRUE, // watch the subtree
FILE_NOTIFY_CHANGE_DIR_NAME); // watch dir. name changes

if (dwChangeHandles[1] == INVALID_HANDLE_VALUE)
ExitProcess(GetLastError());

// Change notification is set. Now wait on both notification
// handles and refresh accordingly.

while (TRUE)
{

// Wait for notification.

dwWaitStatus = WaitForMultipleObjects(2, dwChangeHandles,
FALSE, INFINITE);

switch (dwWaitStatus)
{
case WAIT_OBJECT_0:

// A file was created or deleted in C:\WINDOWS.
// Refresh this directory and restart the
// change notification. RefreshDirectory is an
// application-defined function.

RefreshDirectory("C:\\WINDOWS")
if ( FindNextChangeNotification(
dwChangeHandles[0]) == FALSE )
ExitProcess(GetLastError());
break;

case WAIT_OBJECT_0 + 1:

// A directory was created or deleted in C:\.
// Refresh the directory tree and restart the
// change notification. RefreshTree is an
// application-defined function.

RefreshTree("C:\\");
if (FindNextChangeNotification(
dwChangeHandles[1]) == FALSE)
ExitProcess(GetLastError());
break;

default:
ExitProcess(GetLastError());
}
}
摘自msdn
_StarSoi_ 2002-02-07
  • 打赏
  • 举报
回复
API函数FindFirstChangeNotification可以用于对一目录创建文件系统更改通知句柄,并设置通知条,而该通知句柄可以被Windows的“Wait”类函数利用来监视该目录
mfcsdk 2002-02-07
  • 打赏
  • 举报
回复
文件通知
Thinkpad Z61T 驱动下载及安装方法 for windows XP 驱动下载方法:把下面的链接复制到浏览器地址栏后按回车 --> 鼠标左键单击页面中.exe结尾的连接 --> 在新弹出的窗口中选择“FTP”或“HTTP” --> 鼠标左键单击“I agree”后选择保存。 几点提醒: 1、请不要使用迅雷、快车等第三方下载工具下载驱动,会造成下载不完整无法安装。 2、请尽量按照下列驱动的排列的先后顺序安装。 3、设备管理中常见的未知设备一般为ACPI电源管理器和TPM安全芯片,如果出现未知设备,请首先尝试安装其驱动。 4、GHOST安装的系统有可能存在驱动无法安装的情况,建议不要使用GHOST安装系统。 5、使用GHOST安装系统后如出现小红帽不可用的情况,请在设备管理器中删除“鼠标和其它指针设备”下面有感叹号的设备,然后重启系统,小红帽即可使用。 1,主板(SM 总线控制器) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62939 默认解压路径 C:\DRIVERS\WIN\INTELINF\INFINST_AUTOL.EXE 2,显卡(视频控制器) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-67838 默认解压路径 C:\DRIVERS\WIN\DISPLAY\SETUP.EXE 3,以太网网卡(以太网控制器) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-58618 默认解压路径 C:\DRIVERS\WIN\ETHERNET\WINXP\IA32 ,在设备管理器中以太网控制器上点右键选择更新驱动程序->指定位置安装,指定到此目录搜索安装。 或C:\DRIVERS\WIN\ETHERNET\TOOLS\DRVINST\IA32\SETUP.EXE 4,无线网卡(网络控制器) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62875 默认解压路径 C:\DRIVERS\WIN\WLANINT2\XP\Apps\x32\iProInst.EXE 5,声卡KB888111补丁(PCI-DEVICE,KB888111) http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=MIGR-65456 默认释放路径:打开下载页面选择第五个简体中文版下载kb888111xp2chs.exe(如您安装的是其他语言版本的WINDOWS系统,请选择相应语言版本下载安装),下载完后直接 双击安装。注意:只有先安装KB888111补丁,才能安装声卡和调制解调器驱动。 6,声卡(High Definition Audio总线上的音频设备) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-62855 默认解压路径 C:\DRIVERS\WIN\AUDIO\SETUP.EXE 7,MODEM(High Definition Audio总线上的调制解调器设备) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-61454 默认解压路径 C:\DRIVERS\HDAMODEM\Setup.exe 8,未知设备(ACPI电源管理器驱动) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-4gxpeg 默认解压路径 C:\DRIVERS\WIN\IBMPM\SETUP.EXE 9,未知设备(TPM安全芯片) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-58054 默认释放路径C:\Drivers\Win\TPM\INSTALLE.EXE 安装过后系统设备中可能会有两个ATMEL TPM设备,其中一个上有感叹号,点右键卸载即可,是系统识别错误,如重启后仍存在,亦不会影响使用。 10,SATA驱动(设备管理器里IDE ATA控制器下的PCI DEVICE) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=migr-62909 默认释放路径C:\DRIVERS\WIN\IMSM,先打开C:\DRIVERS\WIN\IMSM\PREPARE目录, 双击install.cmd,然后重启计算机并按F1进入BIOS,在Config?D>Select Serial ATA (SATA)中把选项改为AHCI,按F10保存退出,进入系统后在设备管理器中IDE ATA控制器下面的PCI DEVICE上点右键选择更新驱动程序,选择指定位置安装,并指定到C:\DRIVERS\WIN\IMSM目录搜索安装即可。 11,指纹识别器(Biometric Coprocessor) http://www-307.ibm.com/pc/support/site.wss/document.do?sitestyle=lenovo&lndocid=TVAN-EAPFPR 默认解压路径:下载11MB的版本,下载后直接双击安装 12,摄像头(部分Z61T没有配置摄像头,不需要安装此驱动程序,请继续安装其他驱动程序) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-64406 默认释放路径C:\DRIVERS\WIN\CAMERA\SETUP.EXE(部分操作系统安装过摄像头驱动后可能会发生关机、待机或休眠时死机的现象,这是由WINDOWS系统缺少一个补丁造成的, 请到微软网站搜索909667编号获得请多信息,LENOVO预装系统中已包含此补丁,因微软不提供此补丁的单独下载,所以LENOVO亦无法提供此补丁的下载,如您使用非预装系统 ,请联系微软获取Q909667补丁。) 13,蓝牙() http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-61425 默认解压路径 C:\DRIVERS\WIN\TPBTOOTH\SETUP.EXE 14,读卡器(大容量存储控制器) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-64419 默认解压路径 C:\DRIVERS\WIN\MULCARD\SETUP.EXE 15,电源管理软件(Power Manager) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-61583 默认解压路径 C:\DRIVERS\W2K\PWRMGR\SETUP.EXE 16,热键管理软件(HOTKEY) http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-68000 默认解压路径 C:\DRIVERS\WIN\HOTKEY\SETUP.EXE

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧