CloseSpbResource function

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


NTSTATUS CloseSpbResource(
  _In_ HANDLE DeviceHandle,
  _In_ VOID   *SpbResource


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.


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.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform



Dispmprt.h (include Dispmprt.h)





Send comments about this topic to Microsoft