亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? giveio.c

?? SJF2440源碼, 燒錄SA2440板用
?? C
字號:
/*********************************************************************

Author:     Dale Roberts
Date:       8/30/95
Program:    GIVEIO.SYS
Compile:    Use DDK BUILD facility

Purpose:    Give direct port I/O access to a user mode process.

*********************************************************************/
#include <ntddk.h>

/*
 *  The name of our device driver.
 */
#define DEVICE_NAME_STRING	L"giveio"

/*
 *  This is the "structure" of the IOPM.  It is just a simple
 * character array of length 0x2000.
 *
 *  This holds 8K * 8 bits -> 64K bits of the IOPM, which maps the
 * entire 64K I/O space of the x86 processor.  Any 0 bits will give
 * access to the corresponding port for user mode processes.  Any 1
 * bits will disallow I/O access to the corresponding port.
 */
#define	IOPM_SIZE	0x2000
typedef UCHAR IOPM[IOPM_SIZE];

/*
 *  This will hold simply an array of 0's which will be copied
 * into our actual IOPM in the TSS by Ke386SetIoAccessMap().
 * The memory is allocated at driver load time.
 */
IOPM *IOPM_local = 0;

/*
 *  These are the two undocumented calls that we will use to give
 * the calling process I/O access.
 *
 *  Ke386IoSetAccessMap() copies the passed map to the TSS.
 *
 *  Ke386IoSetAccessProcess() adjusts the IOPM offset pointer so that
 * the newly copied map is actually used.  Otherwise, the IOPM offset
 * points beyond the end of the TSS segment limit, causing any I/O
 * access by the user mode process to generate an exception.
 */
void Ke386SetIoAccessMap(int, IOPM *);
void Ke386QueryIoAccessMap(int, IOPM *);
void Ke386IoSetAccessProcess(PEPROCESS, int);

/*********************************************************************
  Release any allocated objects.
*********************************************************************/
VOID GiveioUnload(IN PDRIVER_OBJECT DriverObject)
{
	WCHAR DOSNameBuffer[] = L"\\DosDevices\\" DEVICE_NAME_STRING;
	UNICODE_STRING uniDOSString;

	if(IOPM_local)
		MmFreeNonCachedMemory(IOPM_local, sizeof(IOPM));

	RtlInitUnicodeString(&uniDOSString, DOSNameBuffer);
	IoDeleteSymbolicLink (&uniDOSString);
	IoDeleteDevice(DriverObject->DeviceObject);
}

/*********************************************************************
  Set the IOPM (I/O permission map) of the calling process so that it
is given full I/O access.  Our IOPM_local[] array is all zeros, so
the IOPM will be all zeros.  If OnFlag is 1, the process is given I/O
access.  If it is 0, access is removed.
*********************************************************************/
VOID SetIOPermissionMap(int OnFlag)
{
	Ke386IoSetAccessProcess(PsGetCurrentProcess(), OnFlag);
	Ke386SetIoAccessMap(1, IOPM_local);
}

void GiveIO(void)
{
	SetIOPermissionMap(1);
}

/*********************************************************************
  Service handler for a CreateFile() user mode call.

  This routine is entered in the driver object function call table by
the DriverEntry() routine.  When the user mode application calls
CreateFile(), this routine gets called while still in the context of
the user mode application, but with the CPL (the processor's Current
Privelege Level) set to 0.  This allows us to do kernel mode
operations.  GiveIO() is called to give the calling process I/O
access.  All the user mode application needs do to obtain I/O access
is open this device with CreateFile().  No other operations are
required.
*********************************************************************/
NTSTATUS GiveioCreateDispatch(
    IN  PDEVICE_OBJECT  DeviceObject,
    IN  PIRP            Irp
    )
{
	GiveIO();			// give the calling process I/O access

    Irp->IoStatus.Information = 0;
    Irp->IoStatus.Status = STATUS_SUCCESS;
    IoCompleteRequest(Irp, IO_NO_INCREMENT);
    return STATUS_SUCCESS;
}

/*********************************************************************
  Driver Entry routine.

  This routine is called only once after the driver is initially
loaded into memory.  It allocates everything necessary for the
driver's operation.  In our case, it allocates memory for our IOPM
array, and creates a device which user mode applications can open.
It also creates a symbolic link to the device driver.  This allows
a user mode application to access our driver using the \\.\giveio
notation.
*********************************************************************/
NTSTATUS DriverEntry(
    IN PDRIVER_OBJECT DriverObject,
    IN PUNICODE_STRING RegistryPath
    )
{
	PDEVICE_OBJECT deviceObject;
	NTSTATUS status;
	WCHAR NameBuffer[] = L"\\Device\\" DEVICE_NAME_STRING;
	WCHAR DOSNameBuffer[] = L"\\DosDevices\\" DEVICE_NAME_STRING;
	UNICODE_STRING uniNameString, uniDOSString;

	//
	//  Allocate a buffer for the local IOPM and zero it.
	//
	IOPM_local = MmAllocateNonCachedMemory(sizeof(IOPM));
	if(IOPM_local == 0)
		return STATUS_INSUFFICIENT_RESOURCES;
	RtlZeroMemory(IOPM_local, sizeof(IOPM));

	//
	//  Set up device driver name and device object.
	//
	RtlInitUnicodeString(&uniNameString, NameBuffer);
	RtlInitUnicodeString(&uniDOSString, DOSNameBuffer);

	status = IoCreateDevice(DriverObject, 0,
					&uniNameString,
					FILE_DEVICE_UNKNOWN,
					0, FALSE, &deviceObject);

	if(!NT_SUCCESS(status))
		return status;

	status = IoCreateSymbolicLink (&uniDOSString, &uniNameString);

	if (!NT_SUCCESS(status))
		return status;

    //
    //  Initialize the Driver Object with driver's entry points.
	// All we require are the Create and Unload operations.
    //
    DriverObject->MajorFunction[IRP_MJ_CREATE] = GiveioCreateDispatch;
	DriverObject->DriverUnload = GiveioUnload;
    return STATUS_SUCCESS;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美国产综合一区| 日韩综合在线视频| 亚洲成人免费在线观看| 国产精品中文字幕欧美| 欧美网站一区二区| 国产精品理论在线观看| 麻豆国产欧美日韩综合精品二区 | 欧美精品xxxxbbbb| 亚洲国产精品t66y| 裸体在线国模精品偷拍| 欧美午夜电影网| 国产精品久久久一区麻豆最新章节| 日产国产欧美视频一区精品| 色一情一伦一子一伦一区| 久久影院视频免费| 免费久久99精品国产| 欧美艳星brazzers| 亚洲色图第一区| 国产aⅴ综合色| 久久五月婷婷丁香社区| 毛片av一区二区| 欧美巨大另类极品videosbest| 亚洲精品国产无套在线观| 国产99久久久国产精品潘金网站| 日韩写真欧美这视频| 婷婷开心久久网| 欧美在线观看一区二区| 亚洲天堂精品视频| 99精品偷自拍| 日韩美女啊v在线免费观看| 成人激情小说网站| 中文幕一区二区三区久久蜜桃| 国产精品一区久久久久| 久久久美女毛片| 国产福利视频一区二区三区| 久久综合给合久久狠狠狠97色69| 久久99在线观看| 精品国产sm最大网站| 在线国产亚洲欧美| 亚洲欧美国产毛片在线| 91香蕉视频黄| 亚洲一区二区视频| 欧美区在线观看| 老司机午夜精品| 久久综合av免费| 成人免费视频网站在线观看| 国产精品久久久久桃色tv| av资源站一区| 亚洲午夜免费福利视频| 欧美一级xxx| 国产一区二区按摩在线观看| 国产精品美女一区二区在线观看| 91亚洲大成网污www| 亚洲国产日韩a在线播放性色| 欧美美女直播网站| 国内精品嫩模私拍在线| 国产精品色婷婷| 在线亚洲精品福利网址导航| 日韩影院免费视频| 久久精品欧美一区二区三区不卡| av电影天堂一区二区在线观看| 一级女性全黄久久生活片免费| 91精品国产综合久久久久久久久久 | 亚洲少妇最新在线视频| 欧美日韩高清在线| 国产麻豆欧美日韩一区| 亚洲免费在线视频一区 二区| 欧美精品电影在线播放| 国产一区二区不卡| 亚洲一区二区三区中文字幕在线| 日韩视频一区二区在线观看| 高清免费成人av| 午夜国产精品影院在线观看| 久久毛片高清国产| 欧美主播一区二区三区| 国产精品2024| 亚洲成人免费看| 国产精品视频一二三| 欧美日韩国产小视频在线观看| 国产精品白丝jk白祙喷水网站| 亚洲精品视频免费看| 久久在线免费观看| 精品视频色一区| 成人丝袜视频网| 免费高清不卡av| 一区二区三区在线观看国产| 精品欧美一区二区三区精品久久| 色香蕉成人二区免费| 国产精品自在在线| 日韩制服丝袜av| 亚洲视频中文字幕| 国产偷国产偷精品高清尤物| 91精品国产欧美一区二区| 色哟哟精品一区| 成人的网站免费观看| 国产在线播精品第三| 视频在线观看一区| 亚洲精品第一国产综合野| 国产三级一区二区| 精品免费日韩av| 91麻豆精品91久久久久久清纯| 一本色道久久综合狠狠躁的推荐| 国产精品一区二区男女羞羞无遮挡 | 琪琪久久久久日韩精品| 一区二区三区在线不卡| 中文字幕在线一区| 中文字幕av一区二区三区免费看| 欧美成人一区二区三区| 欧美一区二区三区系列电影| 在线一区二区三区四区| 色婷婷国产精品综合在线观看| 成人精品电影在线观看| 国产盗摄精品一区二区三区在线| 久久er精品视频| 精品写真视频在线观看| 久久精品国产99国产精品| 蜜桃av一区二区三区| 免费亚洲电影在线| 久久国产精品免费| 久久99国内精品| 精品在线免费观看| 国产一区二区三区四区五区美女 | 欧美怡红院视频| 欧美午夜宅男影院| 欧美色图天堂网| 欧美群妇大交群的观看方式| 宅男在线国产精品| 日韩欧美视频在线| 久久久.com| 国产精品久久久久四虎| 亚洲激情在线激情| 亚洲福利视频一区二区| 日韩电影在线免费观看| 精品在线一区二区三区| 国产成人午夜视频| 91原创在线视频| 欧美男女性生活在线直播观看| 日韩三级伦理片妻子的秘密按摩| 欧美精品一区二区蜜臀亚洲| 国产精品污网站| 一区二区三区四区激情| 日日夜夜精品免费视频| 国产自产视频一区二区三区 | 久久精品国产精品亚洲精品| 国产精品影视在线| 91麻豆国产香蕉久久精品| 欧美日韩精品欧美日韩精品一| 日韩视频免费观看高清完整版在线观看 | 久久男人中文字幕资源站| 国产精品久久久99| 亚洲一区二区三区在线| 国内精品久久久久影院薰衣草| 成人午夜激情影院| 欧美精品免费视频| 日本一区二区电影| 视频一区视频二区中文| 国产高清成人在线| 欧美久久一二区| 日本一区二区三区视频视频| 亚洲国产精品影院| 国产成人午夜视频| 91精品在线麻豆| 国产精品乱人伦| 麻豆精品精品国产自在97香蕉| av一区二区不卡| 精品裸体舞一区二区三区| 亚洲美女视频在线| 国产精品99久久不卡二区| 欧美日韩国产另类不卡| 国产精品国产三级国产专播品爱网 | 97久久精品人人爽人人爽蜜臀| 777色狠狠一区二区三区| 国产亚洲精品bt天堂精选| 亚洲v日本v欧美v久久精品| 成人精品亚洲人成在线| 日韩欧美国产午夜精品| 亚洲黄色小视频| 丁香婷婷综合激情五月色| 91麻豆精品国产自产在线观看一区| 亚洲色图丝袜美腿| 精品一区二区三区在线观看国产 | 亚洲激情av在线| 91精品国产综合久久福利软件| 国产精品久久久久影视| 国产精品资源在线观看| 日韩精品一区二区三区三区免费| 亚洲在线观看免费| 91女神在线视频| 中文字幕一区二区三区av| 国产精品资源在线看| 2023国产一二三区日本精品2022| 日韩精品视频网站| 欧美日本高清视频在线观看| 亚洲码国产岛国毛片在线| voyeur盗摄精品| 国产精品久久久久桃色tv| 成人午夜精品在线| 中文字幕日韩一区二区| www.亚洲在线| 亚洲日本在线看|