Expand Minimize

ExInitializeResourceLite routine

The ExInitializeResourceLite routine initializes a resource variable.

Syntax


NTSTATUS ExInitializeResourceLite(
  _Out_ PERESOURCE Resource
);

Parameters

Resource [out]

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.

Remarks

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.

Call ExDeleteResourceLite before freeing the memory for the resource.

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

HwStorPortProhibitedDDIs

See also

ExAcquireResourceExclusiveLite
ExAcquireResourceSharedLite
ExAcquireSharedStarveExclusive
ExAcquireSharedWaitForExclusive
ExConvertExclusiveToSharedLite
ExDeleteResourceLite
ExIsResourceAcquiredExclusiveLite
ExIsResourceAcquiredSharedLite
ExReinitializeResourceLite
ExReleaseResourceForThreadLite

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft