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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? giveio.c

?? wince和linux的jtag通訊工具。
?? 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;
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精华国产精华精华液| 亚洲啪啪综合av一区二区三区| 天天射综合影视| 色婷婷av一区二区三区之一色屋| 自拍偷自拍亚洲精品播放| 91天堂素人约啪| 亚洲影院理伦片| 欧美一区二区三区免费大片| 久久99国产精品久久99果冻传媒| 久久久久久麻豆| 色婷婷av一区二区三区软件 | 欧美日韩在线观看一区二区 | 亚洲卡通动漫在线| 欧美日韩你懂的| 久久久亚洲欧洲日产国码αv| 欧美电视剧免费观看| 日韩一区二区在线观看视频播放| 国产日韩欧美激情| 久久精品理论片| 欧美日韩国产美| 一区二区三区免费在线观看| 国产91综合网| 久久影院视频免费| 国产高清久久久| 色琪琪一区二区三区亚洲区| 91精品中文字幕一区二区三区| 久久精品国产99国产精品| 日本一区二区视频在线观看| 在线观看免费亚洲| 韩国女主播成人在线观看| 中文字幕精品一区| 99精品视频一区二区| 欧美精品一区二区在线播放| www.欧美日韩| 美女看a上一区| 亚洲欧美另类在线| 亚洲精品一线二线三线无人区| av爱爱亚洲一区| 久久66热偷产精品| 亚洲一区二区三区四区在线观看 | 欧美日韩精品久久久| 日本91福利区| 亚洲欧美另类小说| 久久精品一区二区三区不卡牛牛| 在线精品国精品国产尤物884a| 国产精品资源站在线| 亚洲123区在线观看| 国产精品久久久久一区二区三区| 日韩写真欧美这视频| 色八戒一区二区三区| 国内久久婷婷综合| 午夜不卡在线视频| 亚洲免费资源在线播放| 国产亚洲人成网站| 91精品欧美久久久久久动漫| 92国产精品观看| 国产激情一区二区三区四区| 伦理电影国产精品| 亚洲国产中文字幕在线视频综合| 国产精品色哟哟网站| 2020国产精品久久精品美国| 欧美一区二区三区小说| 色网站国产精品| 99久精品国产| av一区二区三区| 成人亚洲一区二区一| 国模大尺度一区二区三区| 日本vs亚洲vs韩国一区三区| 亚洲成人在线网站| 亚洲午夜在线电影| 亚洲国产精品久久人人爱蜜臀| 亚洲婷婷综合久久一本伊一区| 国产欧美精品一区aⅴ影院 | 国产精品久久久久久一区二区三区| 日韩精品专区在线影院重磅| 6080日韩午夜伦伦午夜伦| 欧美日韩在线直播| 欧美久久免费观看| 欧美一区二区在线免费播放| 欧美浪妇xxxx高跟鞋交| 91麻豆精品91久久久久久清纯| 欧美日韩成人在线一区| 色婷婷久久综合| 在线视频亚洲一区| 欧美精品三级在线观看| 欧美日韩一级黄| 日韩一区二区免费高清| 欧美成人艳星乳罩| 欧美高清在线一区二区| 一区在线观看免费| 蜜臀精品一区二区三区在线观看| 免费在线看成人av| 久久国内精品自在自线400部| 久久精品国产在热久久| 国产成人免费高清| 91麻豆蜜桃一区二区三区| 欧洲激情一区二区| 日韩午夜激情视频| 国产精品热久久久久夜色精品三区 | 粉嫩久久99精品久久久久久夜| 国产福利一区二区| 色噜噜狠狠色综合中国| 欧美日韩黄视频| 精品国产免费人成电影在线观看四季| 久久免费精品国产久精品久久久久| 久久久亚洲综合| 一区二区三区高清不卡| 秋霞成人午夜伦在线观看| 国产成人综合在线| 欧洲一区二区av| 精品久久国产字幕高潮| 国产精品的网站| 三级在线观看一区二区| 国产传媒日韩欧美成人| 在线精品视频免费播放| 精品999久久久| 最新中文字幕一区二区三区| 婷婷久久综合九色国产成人| 国产福利91精品一区二区三区| 欧美中文字幕一区二区三区| 欧美精品一区二区三区蜜桃视频| 综合激情成人伊人| 黄色日韩网站视频| 欧美三级欧美一级| 中文字幕不卡三区| 免费看日韩精品| 日本黄色一区二区| 国产亚洲制服色| 五月综合激情网| 99久久婷婷国产综合精品 | 久久久久亚洲蜜桃| 夜夜亚洲天天久久| 国产成人精品三级麻豆| 欧美精三区欧美精三区| 中文字幕一区日韩精品欧美| 捆绑变态av一区二区三区| 91国偷自产一区二区三区成为亚洲经典| 日韩欧美黄色影院| 午夜精品一区二区三区电影天堂| 成人午夜视频在线| 精品福利二区三区| 午夜精品123| 7777精品伊人久久久大香线蕉超级流畅| 久久久精品免费网站| 美日韩黄色大片| 在线播放91灌醉迷j高跟美女 | 中文字幕av在线一区二区三区| 日韩专区一卡二卡| 在线亚洲高清视频| 亚洲精品欧美专区| 91视频在线观看免费| 国产精品欧美一区喷水| 国产成人精品免费在线| 久久色.com| 久久不见久久见免费视频1| 91精品国产乱| 日韩成人一区二区三区在线观看| 日本二三区不卡| 亚洲婷婷综合久久一本伊一区| 丰满少妇在线播放bd日韩电影| 久久久久久99久久久精品网站| 青青草97国产精品免费观看| 欧美巨大另类极品videosbest | 国产精品素人视频| 国产麻豆精品在线观看| 精品区一区二区| 卡一卡二国产精品 | 国产精品久久久久久久久免费樱桃| 国内精品嫩模私拍在线| 久久久亚洲精品石原莉奈| 国产一区视频导航| 欧美激情中文字幕| 成人app软件下载大全免费| 国产精品亲子伦对白| av电影在线观看不卡| 亚洲伦在线观看| 欧美在线不卡视频| 亚洲电影一级片| 欧美群妇大交群的观看方式| 免费成人你懂的| 国产午夜亚洲精品羞羞网站| 成人app下载| 樱桃国产成人精品视频| 欧美狂野另类xxxxoooo| 精品中文字幕一区二区| 国产欧美日韩三区| 色综合视频一区二区三区高清| 在线免费一区三区| 欧美不卡在线视频| 91精品国产欧美一区二区成人| 成人av在线电影| 怡红院av一区二区三区| 欧美色图天堂网| 麻豆精品在线观看| 中文字幕av资源一区| 日韩一区二区三区在线观看| 国内精品嫩模私拍在线| 国产精品视频在线看| 欧美日韩在线综合| 国产一区二区三区在线观看精品|