// dispmprt.h
DXGKCB_WRITE_DEVICE_SPACE DxgkcbWriteDeviceSpace;
NTSTATUS DxgkcbWriteDeviceSpace(
[in] HANDLE DeviceHandle,
[in] ULONG DataType,
[in] PVOID Buffer,
[in] ULONG Offset,
[in] ULONG Length,
[out] PULONG BytesWritten
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The DxgkCbWriteDeviceSpace function writes to a device configuration space or the expansion ROM of a display adapter.
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 DxgkDdiStartDevice.
DataType [in]The type of write transaction to be performed. This parameter must be one of the following values, which are defined in Dispmprt.h:
Write to the parent bus device's configuration space.
Write to the display adapter's configuration space.
Write to the configuration space of a memory controller hub that is a peer to the adapter's parent bus.
Write to the display adapter's expansion ROM.
Buffer [in]A pointer to a buffer that supplies the data to be written to the configuration space.
Offset [in]The offset, in bytes, into the configuration space, at which the write transaction begins.
Length [in]The number of bytes to be written.
BytesWritten [out]A pointer to a ULONG-typed variable that receives the number of bytes actually written.
DxgkCbWriteDeviceSpace returns one of the following values:
| Return code | Description |
|---|---|
| STATUS_SUCCESS | The function succeeded. |
| STATUS_INVALID_PARAMETER | The DeviceHandle, DataType, or Buffer parameter is invalid. |
| STATUS_UNSUCCESSFUL | The function was unable to write the data. |