阅读:1648回复:5
VXD 调试求助 !!!!
诸位大哥
小弟初学 VC++应用程序example 调试没有问题 在编写生成clock.VXD时出现俩个错误 1.\\example.h(12) : fatal error C1189: #error : include \'stdafx.h\' before including this file for PCH 2 NMAKE : fatal error U1077: \'D:\\APPLY\\VISUAL~1\\VC98\\bin\\CL.exe\' : return code \'0x2\' 小弟我不知什么意思 求救大侠 谢了先 |
|
沙发#
发布于:2002-01-20 10:47
第一个问题,应该是你的example.h包含了stdafx.h,但在驱动程序中不能用stdafx.h,一般,驱动程序与应用程序公用的头文件,主要用来定义命令码,不要定义其他的东西!
|
|
板凳#
发布于:2002-01-20 11:32
大哥
我得exmple是VC++向导自动生成的单文档工程,example。h的开头是这样的 // example.h : main header file for the EXAMPLE application // #if !defined(AFX_EXAMPLE_H__1341C165_0D8B_11D6_847D_0000E8D31C5D__INCLUDED_) #define AFX_EXAMPLE_H__1341C165_0D8B_11D6_847D_0000E8D31C5D__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifndef __AFXWIN_H__ #error include \'stdafx.h\' before including this file for PCH #endif #define ADDRPASS CTL_CODE ~~~~~~~~~~~~~~~~~~~~~~~~~~ (FILE_DEVICE_UNKNOWN,1,METHOD_NEITHER,FILE_ANY_ACCESS) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #include \"resource.h\" // main symbols ///////////////////////////////////////////////////////////////////////////// // CExampleApp: // See example.cpp for the implementation of this class // ..... 其中划波浪型的那句是我定义来两者通讯的,其他地方没有任何改变 难道者有问题么 |
|
地板#
发布于:2002-01-20 15:00
我的vxd 程序是这样写的
// CLOCK.cpp - main module for VxD CLOCK #define DEVICE_MAIN #include \"clock.h\" Declare_Virtual_Device(CLOCK) #undef DEVICE_MAIN #include \"example.h\" ~~~~~~~~~~~~~~~~~~~ //#include <vsd.h> MyHwInt * pMyIRQ; PVOID CallBackApc=0; THREADHANDLE TheThread=0; ..... 有什么问题呀? |
|
地下室#
发布于:2002-01-22 05:43
你在VxD中用MFC吗?不是的吧?!
VxD用DDK来写,这么可以用MFC! |
|
5楼#
发布于:2002-01-24 20:31
懂了
谢谢各位了 |
|