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

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

?? giveio.c

?? 有關(guān)LINUX系統(tǒng)移植的工具
?? C
字號(hào):
/*********************************************************************

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;
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区免费播放| 美女网站在线免费欧美精品| 久久综合九色综合97婷婷| 欧美日韩国产小视频| 欧美中文字幕一区二区三区 | 日韩视频一区二区三区在线播放| 91黄色激情网站| 欧美日韩精品是欧美日韩精品| 欧美日韩久久一区二区| 4438x亚洲最大成人网| 欧美sm美女调教| 国产日韩三级在线| 亚洲欧美日韩国产成人精品影院| 亚洲男人天堂一区| 日韩黄色小视频| 国产精品一区免费在线观看| 成人高清av在线| 在线精品视频一区二区三四| 这里只有精品视频在线观看| 精品99一区二区| 亚洲色图第一区| 午夜精品成人在线| 国产一区二区导航在线播放| jvid福利写真一区二区三区| 色婷婷国产精品久久包臀 | 韩国三级中文字幕hd久久精品| 国产乱码精品一区二区三区av| 99在线精品一区二区三区| 欧美综合一区二区| 国产亚洲女人久久久久毛片| 亚洲一区二区三区影院| 韩日精品视频一区| 色婷婷激情综合| 精品不卡在线视频| 亚洲福利视频一区二区| 国产一区二区三区av电影| 色综合天天综合给合国产| 宅男在线国产精品| 一色桃子久久精品亚洲| 老司机精品视频线观看86| 不卡视频在线观看| 欧美大度的电影原声| 亚洲免费三区一区二区| 狠狠色丁香婷婷综合久久片| 欧美亚洲一区二区在线| 中文文精品字幕一区二区| 日本aⅴ免费视频一区二区三区 | 欧美精品一级二级三级| 国产精品久久久久久久久晋中 | 99久久精品免费看| 精品日产卡一卡二卡麻豆| 亚洲制服欧美中文字幕中文字幕| 国产在线精品一区二区夜色| 欧美三日本三级三级在线播放| 国产精品热久久久久夜色精品三区 | 亚洲国产色一区| 91在线一区二区| 中文字幕精品—区二区四季| 国产综合久久久久久鬼色 | 亚洲精品乱码久久久久久日本蜜臀| 久久99精品一区二区三区三区| 欧美日韩国产美| 一区二区在线免费观看| 日本韩国一区二区| 亚洲精品国产品国语在线app| 国产69精品久久久久毛片| 2021久久国产精品不只是精品| 日韩精品欧美精品| 欧美日韩一区二区三区视频| 亚洲视频香蕉人妖| 99精品偷自拍| 亚洲欧洲日韩av| av毛片久久久久**hd| 国产欧美一区二区精品婷婷 | av高清久久久| 亚洲欧洲美洲综合色网| 99视频一区二区三区| 国产精品久久久久久户外露出| 成人深夜福利app| 国产精品亲子伦对白| 99国产精品久久| 亚洲乱码中文字幕| 欧美日韩国产123区| 日本网站在线观看一区二区三区 | 久久精品国产成人一区二区三区| 欧美大片在线观看| 大白屁股一区二区视频| 国产精品乱子久久久久| 91浏览器在线视频| 日韩av不卡在线观看| 精品播放一区二区| 99精品黄色片免费大全| 亚洲不卡在线观看| 精品精品国产高清一毛片一天堂| 国产激情偷乱视频一区二区三区| 国产精品麻豆视频| 欧美日韩一二区| 狠狠网亚洲精品| 17c精品麻豆一区二区免费| 91在线porny国产在线看| 午夜精品一区二区三区电影天堂| 日韩精品一区二区三区中文精品| 成人免费毛片片v| 视频一区视频二区中文| 久久色在线视频| 色欧美乱欧美15图片| 日韩黄色一级片| 自拍偷拍国产精品| 日韩一区二区三区电影在线观看| 国产精品一品二品| 亚洲高清视频中文字幕| 中文字幕av资源一区| 欧美精品在线一区二区三区| 成人综合激情网| 亚洲v中文字幕| 中文字幕一区二区三| 91.成人天堂一区| 不卡区在线中文字幕| 日韩精品视频网站| 一区二区在线免费| 国产欧美视频一区二区| 91精品婷婷国产综合久久竹菊| av影院午夜一区| 国产一区二区三区不卡在线观看| 性做久久久久久免费观看| 中文字幕一区二区三区四区不卡| 精品国产麻豆免费人成网站| 91亚洲国产成人精品一区二区三| 久久国产精品99精品国产| 亚洲va韩国va欧美va| 亚洲日本在线看| 国产精品拍天天在线| 国产亚洲一区字幕| 精品国产自在久精品国产| 91精品啪在线观看国产60岁| 在线观看日韩精品| 91在线观看美女| 97se狠狠狠综合亚洲狠狠| 成人久久视频在线观看| 国产成人精品一区二区三区网站观看| 日韩av电影免费观看高清完整版 | 精品一区精品二区高清| 午夜久久电影网| 天堂成人国产精品一区| 亚洲va韩国va欧美va| 一区二区三区日韩欧美| 亚洲女人的天堂| 一区二区视频在线| 亚洲免费资源在线播放| 一区二区三区四区视频精品免费| 亚洲天堂精品视频| 一区二区三区在线视频观看58| 国产精品超碰97尤物18| 亚洲视频1区2区| 一区二区三区四区在线播放| 亚洲最大的成人av| 亚洲www啪成人一区二区麻豆| 亚洲6080在线| 久久99精品久久久| 国产一区二区视频在线| 国产成人精品一区二| www.日韩在线| 欧美天堂一区二区三区| 欧美日韩国产影片| 精品国产91洋老外米糕| 欧美国产日韩a欧美在线观看 | 日韩不卡一区二区三区| 奇米精品一区二区三区在线观看| 毛片一区二区三区| 国产精品123区| 一本色道久久综合亚洲91| 在线观看视频一区二区欧美日韩| 欧美无乱码久久久免费午夜一区| 91精品国产免费| 国产欧美日韩精品a在线观看| 中文字幕一区日韩精品欧美| 亚洲成a人片综合在线| 韩国av一区二区三区在线观看| 成人一区在线观看| 欧美日韩综合不卡| 538prom精品视频线放| 中文字幕精品—区二区四季| 午夜成人免费电影| 国产成人亚洲综合a∨婷婷| 色综合夜色一区| 精品国产成人在线影院| 亚洲色图制服丝袜| 久久精品国产亚洲一区二区三区| 国产91精品欧美| 日韩一区二区在线免费观看| 中文字幕一区二区三区乱码在线 | 69久久夜色精品国产69蝌蚪网| 精品国产凹凸成av人导航| 亚洲精品中文字幕乱码三区| 免费亚洲电影在线| 色哟哟精品一区| 国产欧美一区二区精品久导航 | 91福利在线播放| 久久久久久久久久电影| 午夜欧美大尺度福利影院在线看|