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

📄 vcap.cpp

📁 2个avstream类型驱动演示
💻 CPP
字号:
// Vcap.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 "Vcap.h"

#pragma hdrstop("Vcap.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('pacV');

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

/////////////////////////////////////////////////////////////////////
// Declare driver 
//
DECLARE_KSMINIDRIVER_CLASS(VcapDriver)

////////////////////////////////////////////////////////////////////
// Tracer
KDebugOnlyTrace g_Trace("VcapDriver");

/////////////////////////////////////////////////////////////////////
//  VcapDriver::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 Vcap look for:
//			HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vcap
//
//	Return Value:
//		NTSTATUS - Return STATUS_SUCCESS if no errors are encountered.
//			Any other indicates to the system that an error has occured.
//
//	Comments:
//
NTSTATUS VcapDriver::DriverEntry(PUNICODE_STRING RegistryPath)
{
	UNREFERENCED_PARAMETER(RegistryPath);

	g_Trace << "VcapDriver::DriverEntry" << EOL;

	// Compile-time Design Check

	KsDesignRules<VcapDevice,VcapFilter,VcapPin>::Check();


	// Describe entities

	static KsDeviceDescriptor<VcapDevice>	Device;
	static KsFilterDescriptor<VcapFilter>	Filter;
	static KsPinDescriptor<VcapPin>			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 + -