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

ICDECOMPRESSEX

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

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

フィールド

フィールドサイズx64x86説明
dwFlagsDWORD4+0+0

適用するフラグです。次の値が定義されています。

名前 説明
ICDECOMPRESS_HURRYUP
より高速に伸張することを試みます。アプリケーションがこのフラグを使用した場合、ドライバーは伸張したデータをバッファーに格納するだけで、画像を描画しません。
ICDECOMPRESS_NOTKEYFRAME
現在のフレームはキーフレームではありません。
ICDECOMPRESS_NULLFRAME
現在のフレームにはデータが含まれておらず、伸張された画像はそのままにしておく必要があります。
ICDECOMPRESS_PREROLL
現在のフレームは動画の再生開始位置より前にあるため、描画されません。
ICDECOMPRESS_UPDATE
画面が更新または再描画されています。
lpbiSrcBITMAPINFOHEADER*8/4+8+4入力形式を格納した BITMAPINFOHEADER 構造体へのポインターです。
lpSrcvoid*8/4+16+8入力データを格納したバッファーへのポインターです。
lpbiDstBITMAPINFOHEADER*8/4+24+12出力形式を格納した BITMAPINFOHEADER 構造体へのポインターです。
lpDstvoid*8/4+32+16ドライバーが伸張した画像を書き込むバッファーへのポインターです。
xDstINT4+40+20lpbiDst で指定された DIB 内における、コピー先の四角形の x 座標です。
yDstINT4+44+24lpbiDst で指定された DIB 内における、コピー先の四角形の y 座標です。
dxDstINT4+48+28コピー先の四角形の幅です。
dyDstINT4+52+32コピー先の四角形の高さです。
xSrcINT4+56+36lpbiSrc で指定された DIB 内における、コピー元の四角形の x 座標です。
ySrcINT4+60+40lpbiSrc で指定された DIB 内における、コピー元の四角形の y 座標です。
dxSrcINT4+64+44コピー元の四角形の幅です。
dySrcINT4+68+48コピー元の四角形の高さです。

公式ドキュメント

ICDECOMPRESSEX 構造体は、ICM_DECOMPRESSEX メッセージで使用する伸張パラメーターを格納します。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// ICDECOMPRESSEX  (x64 72 / x86 52 バイト)
typedef struct ICDECOMPRESSEX {
    DWORD dwFlags;
    BITMAPINFOHEADER* lpbiSrc;
    void* lpSrc;
    BITMAPINFOHEADER* lpbiDst;
    void* lpDst;
    INT xDst;
    INT yDst;
    INT dxDst;
    INT dyDst;
    INT xSrc;
    INT ySrc;
    INT dxSrc;
    INT dySrc;
} ICDECOMPRESSEX;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ICDECOMPRESSEX
{
    public uint dwFlags;
    public IntPtr lpbiSrc;
    public IntPtr lpSrc;
    public IntPtr lpbiDst;
    public IntPtr lpDst;
    public int xDst;
    public int yDst;
    public int dxDst;
    public int dyDst;
    public int xSrc;
    public int ySrc;
    public int dxSrc;
    public int dySrc;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ICDECOMPRESSEX
    Public dwFlags As UInteger
    Public lpbiSrc As IntPtr
    Public lpSrc As IntPtr
    Public lpbiDst As IntPtr
    Public lpDst As IntPtr
    Public xDst As Integer
    Public yDst As Integer
    Public dxDst As Integer
    Public dyDst As Integer
    Public xSrc As Integer
    Public ySrc As Integer
    Public dxSrc As Integer
    Public dySrc As Integer
End Structure
import ctypes
from ctypes import wintypes

class ICDECOMPRESSEX(ctypes.Structure):
    _fields_ = [
        ("dwFlags", wintypes.DWORD),
        ("lpbiSrc", ctypes.c_void_p),
        ("lpSrc", ctypes.c_void_p),
        ("lpbiDst", ctypes.c_void_p),
        ("lpDst", ctypes.c_void_p),
        ("xDst", ctypes.c_int),
        ("yDst", ctypes.c_int),
        ("dxDst", ctypes.c_int),
        ("dyDst", ctypes.c_int),
        ("xSrc", ctypes.c_int),
        ("ySrc", ctypes.c_int),
        ("dxSrc", ctypes.c_int),
        ("dySrc", ctypes.c_int),
    ]
#[repr(C)]
pub struct ICDECOMPRESSEX {
    pub dwFlags: u32,
    pub lpbiSrc: *mut core::ffi::c_void,
    pub lpSrc: *mut core::ffi::c_void,
    pub lpbiDst: *mut core::ffi::c_void,
    pub lpDst: *mut core::ffi::c_void,
    pub xDst: i32,
    pub yDst: i32,
    pub dxDst: i32,
    pub dyDst: i32,
    pub xSrc: i32,
    pub ySrc: i32,
    pub dxSrc: i32,
    pub dySrc: i32,
}
import "golang.org/x/sys/windows"

type ICDECOMPRESSEX struct {
	dwFlags uint32
	lpbiSrc uintptr
	lpSrc uintptr
	lpbiDst uintptr
	lpDst uintptr
	xDst int32
	yDst int32
	dxDst int32
	dyDst int32
	xSrc int32
	ySrc int32
	dxSrc int32
	dySrc int32
}
type
  ICDECOMPRESSEX = record
    dwFlags: DWORD;
    lpbiSrc: Pointer;
    lpSrc: Pointer;
    lpbiDst: Pointer;
    lpDst: Pointer;
    xDst: Integer;
    yDst: Integer;
    dxDst: Integer;
    dyDst: Integer;
    xSrc: Integer;
    ySrc: Integer;
    dxSrc: Integer;
    dySrc: Integer;
  end;
const ICDECOMPRESSEX = extern struct {
    dwFlags: u32,
    lpbiSrc: ?*anyopaque,
    lpSrc: ?*anyopaque,
    lpbiDst: ?*anyopaque,
    lpDst: ?*anyopaque,
    xDst: i32,
    yDst: i32,
    dxDst: i32,
    dyDst: i32,
    xSrc: i32,
    ySrc: i32,
    dxSrc: i32,
    dySrc: i32,
};
type
  ICDECOMPRESSEX {.bycopy.} = object
    dwFlags: uint32
    lpbiSrc: pointer
    lpSrc: pointer
    lpbiDst: pointer
    lpDst: pointer
    xDst: int32
    yDst: int32
    dxDst: int32
    dyDst: int32
    xSrc: int32
    ySrc: int32
    dxSrc: int32
    dySrc: int32
struct ICDECOMPRESSEX
{
    uint dwFlags;
    void* lpbiSrc;
    void* lpSrc;
    void* lpbiDst;
    void* lpDst;
    int xDst;
    int yDst;
    int dxDst;
    int dyDst;
    int xSrc;
    int ySrc;
    int dxSrc;
    int dySrc;
}

HSP用 定義

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

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

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