阅读:1323回复:0
为什么,IRQ8也不能触发呢?我上辈子做错了什么!
代码如下:
在这段代码里,俺除了钩挂IRQ8以外可什么都没干,你们可都看到的。可为不行,\VtoolsD\example\cpp\hwint 却可以,Why? //IRQ8.h----- #define DEVICE_CLASS IRQ8Device #define IRQ8_DeviceID UNDEFINED_DEVICE_ID #define IRQ8_Init_Order UNDEFINED_INIT_ORDER #define IRQ8_Major 1 #define IRQ8_Minor 0 #define MY_IRQ 8 class MyHwInt : public VHardwareInt { public: MyHwInt():VHardwareInt(MY_IRQ,0,0,0){}; virtual VOID OnHardwareInt(VMHANDLE); }; class IRQ8Device : public VDevice { public: virtual BOOL OnSysDynamicDeviceInit(); virtual BOOL OnSysDynamicDeviceExit(); MyHwInt* pMyIRQ; }; class IRQ8VM : public VVirtualMachine { public: IRQ8VM(VMHANDLE hVM); }; class IRQ8Thread : public VThread { public: IRQ8Thread(THREADHANDLE hThread); }; // IRQ8.cpp - main module for VxD IRQ8 #define DEVICE_MAIN #include "IRQ8.h" Declare_Virtual_Device(IRQ8) #undef DEVICE_MAIN IRQ8VM::IRQ8VM(VMHANDLE hVM) : VVirtualMachine(hVM) {} IRQ8Thread::IRQ8Thread(THREADHANDLE hThread) : VThread(hThread) {} BOOL IRQ8Device::OnSysDynamicDeviceInit() { pMyIRQ = new MyHwInt(); if(pMyIRQ&&pMyIRQ->hook()) { pMyIRQ->physicalUnmask(); return TRUE; } else return FALSE; } BOOL IRQ8Device::OnSysDynamicDeviceExit() { if(pMyIRQ) delete pMyIRQ; return TRUE; } VOID MyHwInt::OnHardwareInt(VMHANDLE hVM) { dprintf("I am waiting for you…………"); sendPhysicalEOI(); } [dolphin 编辑于 2001-06-01 10:00] |
|
|