Win32 API 日本語リファレンス
ホームDevices.Display › IFIEXTRA

IFIEXTRA

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

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

フィールド

フィールドサイズx64x86説明
ulIdentifierDWORD4+0+0拡張情報の識別子。
dpFontSigINT4+4+4フォントシグネチャ(対応文字集合/コードページ)へのオフセット。
cigDWORD4+8+8インデックスドグリフ数。
dpDesignVectorINT4+12+12デザインベクトル(多軸フォント)へのオフセット。
dpAxesInfoWINT4+16+16可変フォントの軸情報へのオフセット。
aulReservedDWORD4+20+20将来の拡張用に予約された配列。

各言語での定義

#include <windows.h>

// IFIEXTRA  (x64 24 / x86 24 バイト)
typedef struct IFIEXTRA {
    DWORD ulIdentifier;
    INT dpFontSig;
    DWORD cig;
    INT dpDesignVector;
    INT dpAxesInfoW;
    DWORD aulReserved[1];
} IFIEXTRA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IFIEXTRA
{
    public uint ulIdentifier;
    public int dpFontSig;
    public uint cig;
    public int dpDesignVector;
    public int dpAxesInfoW;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public uint[] aulReserved;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IFIEXTRA
    Public ulIdentifier As UInteger
    Public dpFontSig As Integer
    Public cig As UInteger
    Public dpDesignVector As Integer
    Public dpAxesInfoW As Integer
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public aulReserved() As UInteger
End Structure
import ctypes
from ctypes import wintypes

class IFIEXTRA(ctypes.Structure):
    _fields_ = [
        ("ulIdentifier", wintypes.DWORD),
        ("dpFontSig", ctypes.c_int),
        ("cig", wintypes.DWORD),
        ("dpDesignVector", ctypes.c_int),
        ("dpAxesInfoW", ctypes.c_int),
        ("aulReserved", wintypes.DWORD * 1),
    ]
#[repr(C)]
pub struct IFIEXTRA {
    pub ulIdentifier: u32,
    pub dpFontSig: i32,
    pub cig: u32,
    pub dpDesignVector: i32,
    pub dpAxesInfoW: i32,
    pub aulReserved: [u32; 1],
}
import "golang.org/x/sys/windows"

type IFIEXTRA struct {
	ulIdentifier uint32
	dpFontSig int32
	cig uint32
	dpDesignVector int32
	dpAxesInfoW int32
	aulReserved [1]uint32
}
type
  IFIEXTRA = record
    ulIdentifier: DWORD;
    dpFontSig: Integer;
    cig: DWORD;
    dpDesignVector: Integer;
    dpAxesInfoW: Integer;
    aulReserved: array[0..0] of DWORD;
  end;
const IFIEXTRA = extern struct {
    ulIdentifier: u32,
    dpFontSig: i32,
    cig: u32,
    dpDesignVector: i32,
    dpAxesInfoW: i32,
    aulReserved: [1]u32,
};
type
  IFIEXTRA {.bycopy.} = object
    ulIdentifier: uint32
    dpFontSig: int32
    cig: uint32
    dpDesignVector: int32
    dpAxesInfoW: int32
    aulReserved: array[1, uint32]
struct IFIEXTRA
{
    uint ulIdentifier;
    int dpFontSig;
    uint cig;
    int dpDesignVector;
    int dpAxesInfoW;
    uint[1] aulReserved;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IFIEXTRA サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; ulIdentifier : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; dpFontSig : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; cig : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dpDesignVector : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; dpAxesInfoW : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; aulReserved : DWORD (+20, 4byte)  varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IFIEXTRA
    #field int ulIdentifier
    #field int dpFontSig
    #field int cig
    #field int dpDesignVector
    #field int dpAxesInfoW
    #field int aulReserved 1
#endstruct

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