CloseSpbResource function

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

Syntax


NTSTATUS CloseSpbResource(
  _In_  HANDLE DeviceHandle,
  _In_  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.

SpbResource [in]

A pointer to an SPB resource that the display miniport driver opened using the OpenSpbResource function.

Return value

This function returns STATUS_SUCCESS if it succeeds. Otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

Closing an open object handle causes that handle to become invalid. The system also decrements the handle count for the object and checks whether the object can be deleted. The system does not actually delete the object until all of the object's handles are closed and no referenced pointers remain.

The driver must call CloseSpbResource to close every handle that it has opened with OpenSpbResource as soon as the handle is no longer required.

Callers of CloseSpbResource should not assume that this function automatically waits for all I/O to complete prior to returning.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Header

Dispmprt.h (include Dispmprt.h)

IRQL

PASSIVE_LEVEL

 

 

Send comments about this topic to Microsoft

Mostra:
© 2014 Microsoft