Win32 API 日本語リファレンス
ホームUI.Shell › QCMINFO_IDMAP

QCMINFO_IDMAP

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

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

フィールド

フィールドサイズx64x86説明
nMaxIdsDWORD4+0+0pIdList 配列に含まれる要素数の最大値。
pIdListQCMINFO_IDMAP_PLACEMENT8+4+4コマンドID配置情報(QCMINFO_IDMAP_PLACEMENT)の配列。

各言語での定義

#include <windows.h>

// QCMINFO_IDMAP_PLACEMENT  (x64 8 / x86 8 バイト)
typedef struct QCMINFO_IDMAP_PLACEMENT {
    DWORD id;
    DWORD fFlags;
} QCMINFO_IDMAP_PLACEMENT;

// QCMINFO_IDMAP  (x64 12 / x86 12 バイト)
typedef struct QCMINFO_IDMAP {
    DWORD nMaxIds;
    QCMINFO_IDMAP_PLACEMENT pIdList[1];
} QCMINFO_IDMAP;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct QCMINFO_IDMAP_PLACEMENT
{
    public uint id;
    public uint fFlags;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct QCMINFO_IDMAP
{
    public uint nMaxIds;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public QCMINFO_IDMAP_PLACEMENT[] pIdList;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure QCMINFO_IDMAP_PLACEMENT
    Public id As UInteger
    Public fFlags As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure QCMINFO_IDMAP
    Public nMaxIds As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public pIdList() As QCMINFO_IDMAP_PLACEMENT
End Structure
import ctypes
from ctypes import wintypes

class QCMINFO_IDMAP_PLACEMENT(ctypes.Structure):
    _fields_ = [
        ("id", wintypes.DWORD),
        ("fFlags", wintypes.DWORD),
    ]

class QCMINFO_IDMAP(ctypes.Structure):
    _fields_ = [
        ("nMaxIds", wintypes.DWORD),
        ("pIdList", QCMINFO_IDMAP_PLACEMENT * 1),
    ]
#[repr(C)]
pub struct QCMINFO_IDMAP_PLACEMENT {
    pub id: u32,
    pub fFlags: u32,
}

#[repr(C)]
pub struct QCMINFO_IDMAP {
    pub nMaxIds: u32,
    pub pIdList: [QCMINFO_IDMAP_PLACEMENT; 1],
}
import "golang.org/x/sys/windows"

type QCMINFO_IDMAP_PLACEMENT struct {
	id uint32
	fFlags uint32
}

type QCMINFO_IDMAP struct {
	nMaxIds uint32
	pIdList [1]QCMINFO_IDMAP_PLACEMENT
}
type
  QCMINFO_IDMAP_PLACEMENT = record
    id: DWORD;
    fFlags: DWORD;
  end;

  QCMINFO_IDMAP = record
    nMaxIds: DWORD;
    pIdList: array[0..0] of QCMINFO_IDMAP_PLACEMENT;
  end;
const QCMINFO_IDMAP_PLACEMENT = extern struct {
    id: u32,
    fFlags: u32,
};

const QCMINFO_IDMAP = extern struct {
    nMaxIds: u32,
    pIdList: [1]QCMINFO_IDMAP_PLACEMENT,
};
type
  QCMINFO_IDMAP_PLACEMENT {.bycopy.} = object
    id: uint32
    fFlags: uint32

  QCMINFO_IDMAP {.bycopy.} = object
    nMaxIds: uint32
    pIdList: array[1, QCMINFO_IDMAP_PLACEMENT]
struct QCMINFO_IDMAP_PLACEMENT
{
    uint id;
    uint fFlags;
}

struct QCMINFO_IDMAP
{
    uint nMaxIds;
    QCMINFO_IDMAP_PLACEMENT[1] pIdList;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; QCMINFO_IDMAP サイズ: 12 バイト(x64)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; nMaxIds : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; pIdList : QCMINFO_IDMAP_PLACEMENT (+4, 8byte)  varptr(st)+4 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global QCMINFO_IDMAP_PLACEMENT
    #field int id
    #field int fFlags
#endstruct

#defstruct global QCMINFO_IDMAP
    #field int nMaxIds
    #field QCMINFO_IDMAP_PLACEMENT pIdList 1
#endstruct

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