OpenSpbResource function

Opens a Simple Peripheral Bus (SPB) resource. All input parameters are supplied by the display miniport driver.

Syntax


NTSTATUS OpenSpbResource(
  _In_     HANDLE         DeviceHandle,
  _In_     LARGE_INTEGER  SpbReourceId,
  _In_opt_ UNICODE_STRING *SpbResourceSubName,
  _In_     ACCESS_MASK    DesiredAccess,
  _In_     ULONG          ShareAccess,
  _In_     ULONG          OpenOptions,
  _Out_    VOID           **SpbResource
);

Parameters

DeviceHandle [in]

A handle that represents a display adapter. The display miniport driver previously obtained this handle in the DeviceHandle member of the DXGKRNL_INTERFACE structure that was passed to the DxgkDdiStartDevice function.

SpbReourceId [in]

The resource ID of the SPB resource hub.

SpbResourceSubName [in, optional]

An optional pointer to the Unicode SPB resource subname.

DesiredAccess [in]

Specifies an ACCESS_MASK value that determines the requested access to the SPB resource. For more information, see the DesiredAccess parameter of the ZwCreateFile function.

ShareAccess [in]

Specifies the type of share access for the file. For more information, see the ShareAccess parameter of ZwCreateFile.

OpenOptions [in]

Specifies the options to apply when opening the SPB resource. For more information, see the CreateOptions parameter of ZwCreateFile.

SpbResource [out]

A pointer to a buffer that is used to return the handle to the SPB resource.

Return value

Returns one of the following values.

Return codeDescription
STATUS_SUCCESS

The DirectX graphics kernel subsystem (Dxgkrnl.sys) correctly opened the caller-specified SPB resource.

STATUS_INVALID_PARAMETER2

The caller-specified resource name does not belong to the current display adapter.

 

If the DirectX graphics kernel subsystem cannot open the specified SPB resource, it returns an NTSTATUS error code.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform

Desktop

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

See also

ACCESS_MASK
DxgkDdiStartDevice
DXGKRNL_INTERFACE
ZwCreateFile

 

 

Send comments about this topic to Microsoft

Show: