阅读:1549回复:1
驱动程序打开了一个对象句柄,应用程序如何使用?
我在MSDN上看到如下的描述:
Shared Object Handles A driver that shares object handles between kernel mode and user mode must be carefully written to avoid accidentally creating security holes. Here are some guidelines: Create handles in kernel mode and pass them to user mode, instead of the other way around. Handles created by a user-mode component and passed to the driver should not be trusted. 我找了许多资料,都感到有些不理解:驱动程序是怎样将Handle传递给用户程序的?应用程序如何得到驱动程序打开的Handle? 我是这样理解的:驱动程序在某个进程A的上下文环境中运行时,调用系统例程如ZwCreateFile()打开一个句柄,在调用时指定句柄属性为OBJ_INHERIT。 当A进程创建一个子进程时,操作系统自动将前述的句柄复制到子进程的Handle Table中。 请问高手,应用程序如何使用驱动程序打开的对象句柄(object handle)? |
|
沙发#
发布于:2003-06-04 12:06
ReadFile(),WriteFile(),DeviceIoControl()
|
|
|