次の方法で共有


D3DKMTSetAllocationPriority 関数 (d3dkmthk.h)

D3DKMTSetAllocationPriority 関数は、リソースまたは割り当ての一覧の優先度レベルを設定します。

構文

NTSTATUS D3DKMTSetAllocationPriority(
  [in] const D3DKMT_SETALLOCATIONPRIORITY *unnamedParam1
);

パラメーター

[in] unnamedParam1

リソースまたは割り当てのリストの優先度レベルを設定するための情報を含む D3DKMT_SETALLOCATIONPRIORITY 構造体へのポインター。

戻り値

D3DKMTSetAllocationPriority は、次のいずれかの値を返します。

リターン コード 形容
STATUS_SUCCESS 割り当ての優先度レベルが正常に設定されました。
STATUS_DEVICE_REMOVED グラフィックス アダプターが停止したか、ディスプレイ デバイスがリセットされました。
STATUS_INVALID_PARAMETER パラメーターが検証され、正しくないと判断されました。

この関数は、NTSTATUS 他の値を返す場合もあります。

備考

次のコード例は、OpenGL ICD が D3DKMTSetAllocationPriority を使用して、リソースの優先度レベル (したがって、リソースに関連付けられているすべての割り当て) を設定する方法を示しています。

VOID SetResourcePriority(D3DKMT_HANDLE hDevice, D3DKMT_HANDLE hResource, UINT uiPriority)
{
    D3DKMT_SETALLOCATIONPRIORITY SetAllocationPriorityData;

    SetAllocationPriorityData.hDevice = hDevice;
    SetAllocationPriorityData.hResource = hResource;
    SetAllocationPriorityData.phAllocationList = NULL;
    SetAllocationPriorityData.AllocationCount = 0;
    SetAllocationPriorityData.Priorities = &uiPriority;

    (*pfnKTSetAllocationPriority)(&SetAllocationPriorityData);
}

必要条件

要件 価値
サポートされる最小クライアント Windows Vista
ターゲット プラットフォーム 万国
ヘッダー d3dkmthk.h (D3dkmthk.h を含む)
ライブラリ Gdi32.lib
DLL Gdi32.dll

関連項目

D3DKMT_SETALLOCATIONPRIORITY