Win32 API 日本語リファレンス
ホームMedia.Multimedia › ICDRAWSUGGEST

ICDRAWSUGGEST

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

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

フィールド

フィールドサイズx64x86説明
lpbiInBITMAPINFOHEADER*8/4+0+0入力画像のBITMAPINFOHEADERへのポインタ。
lpbiSuggestBITMAPINFOHEADER*8/4+8+4提案された出力フォーマットのBITMAPINFOHEADERを受け取るポインタ。
dxSrcINT4+16+8ソース矩形の幅。
dySrcINT4+20+12ソース矩形の高さ。
dxDstINT4+24+16描画先矩形の幅。
dyDstINT4+28+20描画先矩形の高さ。
hicDecompressorHIC8/4+32+24展開に使用するコーデックのハンドル(HIC)。

各言語での定義

#include <windows.h>

// ICDRAWSUGGEST  (x64 40 / x86 28 バイト)
typedef struct ICDRAWSUGGEST {
    BITMAPINFOHEADER* lpbiIn;
    BITMAPINFOHEADER* lpbiSuggest;
    INT dxSrc;
    INT dySrc;
    INT dxDst;
    INT dyDst;
    HIC hicDecompressor;
} ICDRAWSUGGEST;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ICDRAWSUGGEST
{
    public IntPtr lpbiIn;
    public IntPtr lpbiSuggest;
    public int dxSrc;
    public int dySrc;
    public int dxDst;
    public int dyDst;
    public IntPtr hicDecompressor;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ICDRAWSUGGEST
    Public lpbiIn As IntPtr
    Public lpbiSuggest As IntPtr
    Public dxSrc As Integer
    Public dySrc As Integer
    Public dxDst As Integer
    Public dyDst As Integer
    Public hicDecompressor As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class ICDRAWSUGGEST(ctypes.Structure):
    _fields_ = [
        ("lpbiIn", ctypes.c_void_p),
        ("lpbiSuggest", ctypes.c_void_p),
        ("dxSrc", ctypes.c_int),
        ("dySrc", ctypes.c_int),
        ("dxDst", ctypes.c_int),
        ("dyDst", ctypes.c_int),
        ("hicDecompressor", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct ICDRAWSUGGEST {
    pub lpbiIn: *mut core::ffi::c_void,
    pub lpbiSuggest: *mut core::ffi::c_void,
    pub dxSrc: i32,
    pub dySrc: i32,
    pub dxDst: i32,
    pub dyDst: i32,
    pub hicDecompressor: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type ICDRAWSUGGEST struct {
	lpbiIn uintptr
	lpbiSuggest uintptr
	dxSrc int32
	dySrc int32
	dxDst int32
	dyDst int32
	hicDecompressor uintptr
}
type
  ICDRAWSUGGEST = record
    lpbiIn: Pointer;
    lpbiSuggest: Pointer;
    dxSrc: Integer;
    dySrc: Integer;
    dxDst: Integer;
    dyDst: Integer;
    hicDecompressor: Pointer;
  end;
const ICDRAWSUGGEST = extern struct {
    lpbiIn: ?*anyopaque,
    lpbiSuggest: ?*anyopaque,
    dxSrc: i32,
    dySrc: i32,
    dxDst: i32,
    dyDst: i32,
    hicDecompressor: ?*anyopaque,
};
type
  ICDRAWSUGGEST {.bycopy.} = object
    lpbiIn: pointer
    lpbiSuggest: pointer
    dxSrc: int32
    dySrc: int32
    dxDst: int32
    dyDst: int32
    hicDecompressor: pointer
struct ICDRAWSUGGEST
{
    void* lpbiIn;
    void* lpbiSuggest;
    int dxSrc;
    int dySrc;
    int dxDst;
    int dyDst;
    void* hicDecompressor;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ICDRAWSUGGEST サイズ: 28 バイト(x86)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; lpbiIn : BITMAPINFOHEADER* (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; lpbiSuggest : BITMAPINFOHEADER* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; dxSrc : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dySrc : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; dxDst : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; dyDst : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; hicDecompressor : HIC (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ICDRAWSUGGEST サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; lpbiIn : BITMAPINFOHEADER* (+0, 8byte)  varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; lpbiSuggest : BITMAPINFOHEADER* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; dxSrc : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; dySrc : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; dxDst : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; dyDst : INT (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; hicDecompressor : HIC (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ICDRAWSUGGEST
    #field intptr lpbiIn
    #field intptr lpbiSuggest
    #field int dxSrc
    #field int dySrc
    #field int dxDst
    #field int dyDst
    #field intptr hicDecompressor
#endstruct

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