dolphin
驱动中牛
驱动中牛
  • 注册日期2001-04-30
  • 最后登录2013-03-08
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望23点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
阅读:1323回复:0

为什么,IRQ8也不能触发呢?我上辈子做错了什么!

楼主#
更多 发布于:2001-06-01 09:54
    代码如下:
   在这段代码里,俺除了钩挂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]
[b]弃我去者昨日之日不可留,乱我心者今日之日多烦忧。[/b]
游客

返回顶部