Posted on 2010-02-19 16:25
S.l.e!ep.¢% 阅读(599)
评论(0) 编辑 收藏 引用 所属分类:
Windows WDM
Windows Driver Kit: Kernel-Mode Driver Architecture
ExInitializeResourceLite
The ExInitializeResourceLite routine initializes a resource variable.
ExInitializeResourceLite 函数用于初始化资源变量
NTSTATUS
ExInitializeResourceLite(
IN PERESOURCE Resource
);
-
Parameters
-
Resource
- A pointer to the caller-supplied storage, which must be at least sizeof(ERESOURCE), for the resource variable being initialized. The storage must be 4-byte aligned on 32-bit platforms, and 8-byte aligned on 64-bit platforms.
Return Value
ExInitializeResourceLite returns STATUS_SUCCESS.
Comments
The storage for ERESOURCE must be allocated from nonpaged pool.
The resource variable can be used for synchronization by a set of threads. Although the caller provides the storage for the resource variable, the ERESOURCE structure is opaque: that is, its members are reserved for system use.
资源变量能用于一组线程的同步,尽管调用者提供了资源变量的储存?ERESOURCE结构是透明的。也就是说,它的成员保留给系统使用。
Call ExDeleteResourceLite before freeing the memory for the resource.
在释放资源之前调用 ExDeleteResourceLite
Requirements
IRQL: <=DISPATCH_LEVEL
Headers: Declared in Ntddk.h. Include Ntddk.h.