ZwOpenSection function (wdm.h)
The ZwOpenSection routine opens a handle for an existing section object.
NTSYSAPI NTSTATUS ZwOpenSection( [out] PHANDLE SectionHandle, [in] ACCESS_MASK DesiredAccess, [in] POBJECT_ATTRIBUTES ObjectAttributes );
Pointer to a HANDLE variable that receives a handle to the section object.
Pointer to an OBJECT_ATTRIBUTES structure that specifies the object name and other attributes. Use InitializeObjectAttributes to initialize this structure. If the caller is not running in a system thread context, it must set the OBJ_KERNEL_HANDLE attribute when it calls InitializeObjectAttributes.
ZwOpenSection returns STATUS_SUCCESS on success, or the appropriate error code on failure. Possible return values include:
If the section does not exist or the system did not grant the requested access, the operation fails.
Once the handle pointed to by SectionHandle is no longer in use, the driver must call ZwClose to close it.
If the caller is not running in a system thread context, it must ensure that any handles it creates are private handles. Otherwise, the handle can be accessed by the process in whose context the driver is running. For more information, see Object Handles.
|Minimum supported client||Available starting with Windows 2000.|
|Header||wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)|
|DDI compliance rules||HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)|
Submit and view feedback for