日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

1 《Undocumented Windows 2000 Secrets》翻譯 --- 第三章( 四 )

標志 。如果 w2k_wiz.ini 中的作者和公司名稱正確,那你自己的名字和相應(yīng)的公司名稱將會替代它們 。
// TestDrv.c
// 08-07-2000
// Copyright @2005
#define _TESTDRV_SYS_
#include
#include "TestDrv.h"
// =================================================================
// DISCLAIMER
// =================================================================
/*
This software is provided "as is" and any express or implied
warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed.
In no event shall the author be liable for any
direct, indirect, incidental, special, exemplary, or consequential
damages (including, but not limited to, procurement of substitute
goods or services; loss of use, data, or profits; or business
interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software,
even if advised of the possibility of such damage.
*/
// =================================================================
// REVISION HISTORY
// =================================================================
/*
08-07-2000 V1.00 Original version.
*/
// =================================================================
// GLOBAL DATA
// =================================================================
PRESET_UNICODE_STRING (usDeviceName, CSTRING (DRV_DEVICE));
PRESET_UNICODE_STRING (usSymbolicLinkName, CSTRING (DRV_LINK ));
PDEVICE_OBJECT gpDeviceObject = NULL;
PDEVICE_CONTEXT gpDeviceContext = NULL;
// =================================================================
// DISCARDABLE FUNCTIONS
// =================================================================
NTSTATUS DriverInitialize (PDRIVER_OBJECT pDriverObject,
PUNICODE_STRING pusRegistryPath);
NTSTATUS DriverEntry (PDRIVER_OBJECT pDriverObject,
PUNICODE_STRING pusRegistryPath);
// -----------------------------------------------------------------
#ifdef ALLOC_PRAGMA
#pragma alloc_text (INIT, DriverInitialize)
#pragma alloc_text (INIT, DriverEntry)
#endif
// =================================================================
// DEVICE REQUEST HANDLER
// =================================================================
NTSTATUS DeviceDispatcher (PDEVICE_CONTEXT pDeviceContext,
PIRP pIrp)
{
PIO_STACK_LOCATION pisl;
DWORD dInfo = 0;
NTSTATUS ns = STATUS_NOT_IMPLEMENTED;
pisl = IoGetCurrentIrpStackLocation (pIrp);
switch (pisl->MajorFunction)
{
case IRP_MJ_CREATE:
case IRP_MJ_CLEANUP:
case IRP_MJ_CLOSE:
{
ns = STATUS_SUCCESS;
break;
}
}
pIrp->IoStatus.Status = ns;
pIrp->IoStatus.Information = dInfo;
IoCompleteRequest (pIrp, IO_NO_INCREMENT);
return ns;
}
// =================================================================
// DRIVER REQUEST HANDLER
// =================================================================
NTSTATUS DriverDispatcher (PDEVICE_OBJECT pDeviceObject,
PIRP pIrp)
{
return (pDeviceObject == gpDeviceObject
? DeviceDispatcher (gpDeviceContext, pIrp)
: STATUS_INVALID_PARAMETER_1);
}
// -----------------------------------------------------------------
void DriverUnload (PDRIVER_OBJECT pDriverObject)
{
IoDeleteSymbolicLink (&usSymbolicLinkName);
IoDeleteDevice (gpDeviceObject);
return;
}
// =================================================================
// DRIVER INITIALIZATION

推薦閱讀