Fonction D3DKMTUnlock (d3dkmthk.h)

La fonction D3DKMTUnlock déverrouille une liste d’allocations.

Syntaxe

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

Paramètres

[in] unnamedParam1

Pointeur vers une structure D3DKMT_UNLOCK qui décrit une liste d’allocations à déverrouiller.

Valeur retournée

D3DKMTUnlock retourne l’une des valeurs suivantes :

Code de retour Description
STATUS_SUCCESS Les allocations ont été déverrouillées avec succès.
STATUS_INVALID_PARAMETER Les paramètres ont été validés et déterminés comme incorrects.

Cette fonction peut également retourner d’autres valeurs NTSTATUS .

Remarques

Toutes les allocations que la fonction D3DKMTUnlock déverrouille doivent appartenir au même appareil.

Exemples

Les exemples de code suivants montrent comment un ICD OpenGL peut utiliser D3DKMTUnlock pour déverrouiller trois 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;
}

Configuration requise

Condition requise Valeur
Client minimal pris en charge Windows Vista
Plateforme cible Universal
En-tête d3dkmthk.h (inclure D3dkmthk.h)
Bibliothèque Gdi32.lib
DLL Gdi32.dll

Voir aussi

D3DKMT_UNLOCK