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

📄 hwcap.cpp

📁 2个avstream类型驱动演示
💻 CPP
字号:
// Hwcap.cpp
//
// Generated by DriverWizard version DriverStudio 2.7.0 (Build 511)
// Requires Compuware's DriverWorks classes
//

// must be defined once (TODO: review!!)
#define KAVSTREAM_MAIN

#include	<vdw.h>
#include	<kavstream.h>

#include "Hwcap.h"

#pragma hdrstop("Hwcap.pch")

// Set a default 32-bit tag value to be stored with each heap block
// allocated by operator new. Use BoundsChecker to view the memory pool.
// This value can be overridden using the global function SetPoolTag().
POOLTAG DefaultPoolTag('pcwH');

/////////////////////////////////////////////////////////////////////
// Begin INIT section
#pragma code_seg("INIT")


/////////////////////////////////////////////////////////////////////
// Declare driver 
//
DECLARE_KSMINIDRIVER_CLASS(HwcapDriver)

/////////////////////////////////////////////////////////////////////
// Trace object
KDebugOnlyTrace g_Trace("HwcapDriver");

/////////////////////////////////////////////////////////////////////
//  HwcapDriver::DriverEntry
//
//	Routine Description:
//		This is the first entry point called by the system when the
//		driver is loaded.
// 
//	Parameters:
//		RegistryPath - String used to find driver parameters in the
//			registry.  To locate Hwcap look for:
//			HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Hwcap
//
//	Return Value:
//		NTSTATUS - Return STATUS_SUCCESS if no errors are encountered.
//			Any other indicates to the system that an error has occured.
//
//	Comments:
//

NTSTATUS HwcapDriver::DriverEntry(PUNICODE_STRING RegistryPath)
{
	g_Trace << "HwcapDriver::DriverEntry" << EOL;

	// Compile-time Design Check

	KsDesignRules<HwcapDevice,HwcapFilter,HwcapPin>::Check();

	// Describe elements

	static KsDeviceDescriptor<HwcapDevice>	Device;
	static KsFilterDescriptor<HwcapFilter>	Filter;
	static KsPinDescriptor<HwcapPin>		Pin;

	// Connect them into a hierarchy

	Device << (Filter << Pin);

#if DBG
	g_Trace << Device;		// dump the descriptor 
#endif

	// Finally, register the descriptrors with KS

	NTSTATUS status = ::KsInitializeDriver(*this, RegistryPath, Device);

	return status;
}

// 



// End INIT section
/////////////////////////////////////////////////////////////////////
#pragma code_seg()



⌨️ 快捷键说明

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