⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intrdemo.cpp

📁 Windows 2000/XP WDM設備驅動程式開發 使用 Numega 公司出版的軟體快速建置驅動程式
💻 CPP
字号:
// intrdemo.cpp - implementation of interrupt class demo
//=============================================================================
//
// Compuware Corporation
// NuMega Lab
// 9 Townsend West
// Nashua, NH 03060  USA
//
// Copyright (c) 1998 Compuware Corporation. All Rights Reserved.
// Unpublished - rights reserved under the Copyright laws of the
// United States.
//
//=============================================================================

// This is a very simple driver that demonstrates the basic aspects
// of handling interrupts in kernel mode drivers. This driver shares
// IRQ 6, which is the floppy interrupt on Intel platforms.
//
// There is a simple test application that works in conjunction with
// this driver. See ..\exe.
//

#define VDW_MAIN
#include <vdw.h>
#include "common.h"
#include "intrdev.h"
#include "intrdemo.h"

/////////////////////////////////////////////////////////////////
// Begin INIT section code

#pragma code_seg("INIT")

DECLARE_DRIVER_CLASS(InterruptDemoDriver, NULL)

/////////////////////////////////////////////////////////////////
// DriverEntry
// 

NTSTATUS InterruptDemoDriver::DriverEntry(PUNICODE_STRING RegistryPath)
{

// Just create the device object

	InterruptDemoDevice* pDevice;

	pDevice = new (NonPagedPool) InterruptDemoDevice();

	if (pDevice)
	{
		NTSTATUS status = pDevice->ConstructorStatus();
		if ( !NT_SUCCESS(status) )
			delete pDevice;

		return status;
	}
	else
		return STATUS_INSUFFICIENT_RESOURCES;
}

#pragma code_seg()

// End INIT section code
/////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -