S.l.e!ep.¢%

像打了激速一样,以四倍的速度运转,开心的工作
简单、开放、平等的公司文化;尊重个性、自由与个人价值;
posts - 1098, comments - 335, trackbacks - 0, articles - 1
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

ExInitializeResourceLite()

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.


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理