Posted on 2010-02-19 16:25
S.l.e!ep.¢% 閱讀(614)
評論(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.