我使用SetTimer API,我看到很多这样的代码:
case WM_DESTROY:
// Destroy the timer.
KillTimer(hwnd, IDT_TIMER);
PostQuitMessage(0);
break;
Run Code Online (Sandbox Code Playgroud)
我是否必须调用KillTimer,否则系统会自动释放进程退出的资源?忘记拨打KillTimer会导致资源泄漏吗?
我知道如果不需要计时器,它可以被KillTimer破坏.但它必须手动销毁吗?
有没有办法在Windows NT平台(XP-W7)上从内核模式创建用户模式进程?
编辑:我必须只安装驱动程序.这是该项目的具体内容.
我尝试使用 Visual Studio 6 SP6 编译一个项目并得到以下结果:
usbcore.h(18) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1794)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Run Code Online (Sandbox Code Playgroud)
usbcore.h 的第 18 行包含 include 指令:
18: #include "usbiface.h"
Run Code Online (Sandbox Code Playgroud)
空的或不存在的 usbiface.h 会产生同样的错误。我评论了这一行并得到了相同的错误,但对于下一个包含文件。
总结一下:每个#include引用公共项目标头的指令都会发生编译器错误。