Condividi tramite


Funzione D3DKMTUnlock (d3dkmthk.h)

La funzione D3DKMTUnlock sblocca un elenco di allocazioni.

Sintassi

NTSTATUS D3DKMTUnlock(
  [in] const D3DKMT_UNLOCK *unnamedParam1
);

Parametri

[in] unnamedParam1

Puntatore a una struttura D3DKMT_UNLOCK che descrive un elenco di allocazioni da sbloccare.

Valore restituito

D3DKMTUnlock restituisce uno dei valori seguenti;

Codice restituito Descrizione
STATUS_SUCCESS Le allocazioni sono state sbloccate correttamente.
STATUS_INVALID_PARAMETER I parametri sono stati convalidati e determinati per essere non corretti.

Questa funzione potrebbe anche restituire altri valori NTSTATUS .

Commenti

Tutte le allocazioni sbloccate dalla funzione D3DKMTUnlock devono appartenere allo stesso dispositivo.

Esempio

Gli esempi di codice seguenti illustrano come un ICD OpenGL può usare D3DKMTUnlock per sbloccare tre allocazioni.

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;
}

Requisiti

Requisito Valore
Client minimo supportato Windows Vista
Piattaforma di destinazione Universale
Intestazione d3dkmthk.h (include D3dkmthk.h)
Libreria Gdi32.lib
DLL Gdi32.dll

Vedi anche

D3DKMT_UNLOCK