Win32 API 日本語リファレンス
ホームGraphics.Dxgi › DXGI_INFO_QUEUE_MESSAGE

DXGI_INFO_QUEUE_MESSAGE

構造体
サイズx64: 48 バイト / x86: 36 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
ProducerGUID16+0+0メッセージの発生元を識別するGUID。
CategoryDXGI_INFO_QUEUE_MESSAGE_CATEGORY4+16+16メッセージのカテゴリを示す列挙値。
SeverityDXGI_INFO_QUEUE_MESSAGE_SEVERITY4+20+20メッセージの深刻度(エラー/警告/情報など)を示す列挙値。
IDINT4+24+24メッセージを識別する整数ID。
pDescriptionBYTE*8/4+32+28メッセージ本文を格納したバイト列へのポインタ。
DescriptionByteLengthUINT_PTR8/4+40+32メッセージ本文のバイト数(NULL終端を含む)。

各言語での定義

#include <windows.h>

// DXGI_INFO_QUEUE_MESSAGE  (x64 48 / x86 36 バイト)
typedef struct DXGI_INFO_QUEUE_MESSAGE {
    GUID Producer;
    DXGI_INFO_QUEUE_MESSAGE_CATEGORY Category;
    DXGI_INFO_QUEUE_MESSAGE_SEVERITY Severity;
    INT ID;
    BYTE* pDescription;
    UINT_PTR DescriptionByteLength;
} DXGI_INFO_QUEUE_MESSAGE;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXGI_INFO_QUEUE_MESSAGE
{
    public Guid Producer;
    public int Category;
    public int Severity;
    public int ID;
    public IntPtr pDescription;
    public UIntPtr DescriptionByteLength;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXGI_INFO_QUEUE_MESSAGE
    Public Producer As Guid
    Public Category As Integer
    Public Severity As Integer
    Public ID As Integer
    Public pDescription As IntPtr
    Public DescriptionByteLength As UIntPtr
End Structure
import ctypes
from ctypes import wintypes

class DXGI_INFO_QUEUE_MESSAGE(ctypes.Structure):
    _fields_ = [
        ("Producer", GUID),
        ("Category", ctypes.c_int),
        ("Severity", ctypes.c_int),
        ("ID", ctypes.c_int),
        ("pDescription", ctypes.c_void_p),
        ("DescriptionByteLength", ctypes.c_size_t),
    ]
#[repr(C)]
pub struct DXGI_INFO_QUEUE_MESSAGE {
    pub Producer: GUID,
    pub Category: i32,
    pub Severity: i32,
    pub ID: i32,
    pub pDescription: *mut core::ffi::c_void,
    pub DescriptionByteLength: usize,
}
import "golang.org/x/sys/windows"

type DXGI_INFO_QUEUE_MESSAGE struct {
	Producer windows.GUID
	Category int32
	Severity int32
	ID int32
	pDescription uintptr
	DescriptionByteLength uintptr
}
type
  DXGI_INFO_QUEUE_MESSAGE = record
    Producer: TGUID;
    Category: Integer;
    Severity: Integer;
    ID: Integer;
    pDescription: Pointer;
    DescriptionByteLength: NativeUInt;
  end;
const DXGI_INFO_QUEUE_MESSAGE = extern struct {
    Producer: GUID,
    Category: i32,
    Severity: i32,
    ID: i32,
    pDescription: ?*anyopaque,
    DescriptionByteLength: usize,
};
type
  DXGI_INFO_QUEUE_MESSAGE {.bycopy.} = object
    Producer: GUID
    Category: int32
    Severity: int32
    ID: int32
    pDescription: pointer
    DescriptionByteLength: uint
struct DXGI_INFO_QUEUE_MESSAGE
{
    GUID Producer;
    int Category;
    int Severity;
    int ID;
    void* pDescription;
    size_t DescriptionByteLength;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXGI_INFO_QUEUE_MESSAGE サイズ: 36 バイト(x86)
dim st, 9    ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; Producer : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; Category : DXGI_INFO_QUEUE_MESSAGE_CATEGORY (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Severity : DXGI_INFO_QUEUE_MESSAGE_SEVERITY (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ID : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; pDescription : BYTE* (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; DescriptionByteLength : UINT_PTR (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXGI_INFO_QUEUE_MESSAGE サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; Producer : GUID (+0, 16byte)  varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; Category : DXGI_INFO_QUEUE_MESSAGE_CATEGORY (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; Severity : DXGI_INFO_QUEUE_MESSAGE_SEVERITY (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ID : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; pDescription : BYTE* (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; DescriptionByteLength : UINT_PTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
    #field int Data1
    #field short Data2
    #field short Data3
    #field byte Data4 8
#endstruct

#defstruct global DXGI_INFO_QUEUE_MESSAGE
    #field GUID Producer
    #field int Category
    #field int Severity
    #field int ID
    #field intptr pDescription
    #field intptr DescriptionByteLength
#endstruct

stdim st, DXGI_INFO_QUEUE_MESSAGE        ; NSTRUCT 変数を確保
st->Category = 100
mes "Category=" + st->Category