D3DKMTUnlock - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// d3dkmthk.h

NTSTATUS D3DKMTUnlock(
  [in] const D3DKMT_UNLOCK *unnamedParam1
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-d3dkmthk-d3dkmtunlock)

D3DKMTUnlock function

Description

The D3DKMTUnlock function unlocks a list of allocations.

Parameters

unnamedParam1 [in]

A pointer to a D3DKMT_UNLOCK structure that describes a list of allocations to unlock.

Return value

D3DKMTUnlock returns one of the following values;

Return code Description
STATUS_SUCCESS The allocations were successfully unlocked.
STATUS_INVALID_PARAMETER Parameters were validated and determined to be incorrect.

This function might also return other NTSTATUS values.

Remarks

All of the allocations that the D3DKMTUnlock function unlocks must belong to the same device.

Examples

The following code examples demonstrates how an OpenGL ICD can use D3DKMTUnlock to unlock three allocations.

HRESULT UnlockThree(D3DKMT_HANDLE hDevice,
                    D3DKMT_HANDLE hAllocation1,
                    D3DKMT_HANDLE hAllocation2,
                    D3DKMT_HANDLE hAllocation3)
{
    D3DKMT_HANDLE AllocationArray[3];
    D3DKMT_UNLOCK UnlockData;

    AllocationArray[0] = hAllocation1;
    AllocationArray[1] = hAllocation2;
    AllocationArray[2] = hAllocation3;

    UnlockData.hDevice = hDevice;
    UnlockData.NumAllocations = 3;
    UnlockData.phAllocations = AllocationArray;

    if (NT_SUCCESS((*pfnKTUnlock)(&UnlockData))) {
        return S_OK;
    }
    return E_FAIL;
}

See also

D3DKMT_UNLOCK