阅读:799回复:0
为什么我行成了VXD但不能调试呢?
请问我的驱动程序这样写的
.h文件 #ifndef USE_NDIS #define USE_NDIS #endif #include <vtoolsc.h> #define PACKET_Major 1 #define PACKET_Minor 0 #define PACKET_DeviceID UNDEFINED_DEVICE_ID #define PACKET_Init_Order UNDEFINED_INIT_ORDER VOID _cdecl dprintf( PCHAR pszfmt,...); .c文件 #define DEVICE_MAIN #include "packet.h" #undef DEVICE_MAIN Declare_Virtual_Device(PACKET) DefineControlHandler(DEVICE_INIT, OnDeviceInit); DefineControlHandler(W32_DEVICEIOCONTROL, OnW32Deviceiocontrol); DefineControlHandler(SYSTEM_EXIT, OnSystemExit); BOOL __cdecl ControlDispatcher( DWORD dwControlMessage, DWORD EBX, DWORD EDX, DWORD ESI, DWORD EDI, DWORD ECX) { START_CONTROL_DISPATCH ON_DEVICE_INIT(OnDeviceInit); ON_W32_DEVICEIOCONTROL(OnW32Deviceiocontrol); END_CONTROL_DISPATCH return TRUE; } VOID _cdecl dprintf( PCHAR pszfmt,...) { DbgPrint( pszfmt ); } NTSTATUS NDIS_API DriverEntry( PDRIVER_OBJECT aDriverObject, PUNICODE_STRING aRegistryPath ) { NTSTATUS nStatus = NDIS_STATUS_SUCCESS; dprintf(("DriverEntry...n")); 。。。 return( nStatus ); } BOOL OnDeviceInit(VMHANDLE hVM, PCHAR CommandTail) { DriverEntry(NULL, NULL); return TRUE; } DWORD OnW32Deviceiocontrol(PIOCTLPARAMS p) { return 0; } VOID OnSystemExit(VMHANDLE hVM) { } 这样写完编译后形成vxd 文件可是用Debug Monitor调试就是打不开一点go就出现错误请问怎么回事? |
|