ホーム › Devices.Tapi › RENDDATA
RENDDATA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| atyp | WORD | 2 | +0 | +0 | レンダリングするオブジェクトの種別を示す値。 |
| ulPosition | DWORD | 4 | +2 | +2 | ストリーム内でオブジェクトを描画する位置を示す。 |
| dxWidth | WORD | 2 | +6 | +6 | オブジェクトの幅を示す。 |
| dyHeight | WORD | 2 | +8 | +8 | オブジェクトの高さを示す。 |
| dwFlags | DWORD | 4 | +10 | +10 | レンダリング動作を制御するフラグ。 |
各言語での定義
#include <windows.h>
// RENDDATA (x64 14 / x86 14 バイト)
#pragma pack(push, 1)
typedef struct RENDDATA {
WORD atyp;
DWORD ulPosition;
WORD dxWidth;
WORD dyHeight;
DWORD dwFlags;
} RENDDATA;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct RENDDATA
{
public ushort atyp;
public uint ulPosition;
public ushort dxWidth;
public ushort dyHeight;
public uint dwFlags;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure RENDDATA
Public atyp As UShort
Public ulPosition As UInteger
Public dxWidth As UShort
Public dyHeight As UShort
Public dwFlags As UInteger
End Structureimport ctypes
from ctypes import wintypes
class RENDDATA(ctypes.Structure):
_pack_ = 1
_fields_ = [
("atyp", ctypes.c_ushort),
("ulPosition", wintypes.DWORD),
("dxWidth", ctypes.c_ushort),
("dyHeight", ctypes.c_ushort),
("dwFlags", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct RENDDATA {
pub atyp: u16,
pub ulPosition: u32,
pub dxWidth: u16,
pub dyHeight: u16,
pub dwFlags: u32,
}import "golang.org/x/sys/windows"
type RENDDATA struct {
atyp uint16
ulPosition uint32
dxWidth uint16
dyHeight uint16
dwFlags uint32
}type
RENDDATA = packed record
atyp: Word;
ulPosition: DWORD;
dxWidth: Word;
dyHeight: Word;
dwFlags: DWORD;
end;const RENDDATA = extern struct {
atyp: u16,
ulPosition: u32,
dxWidth: u16,
dyHeight: u16,
dwFlags: u32,
};type
RENDDATA {.packed.} = object
atyp: uint16
ulPosition: uint32
dxWidth: uint16
dyHeight: uint16
dwFlags: uint32align(1)
struct RENDDATA
{
ushort atyp;
uint ulPosition;
ushort dxWidth;
ushort dyHeight;
uint dwFlags;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RENDDATA サイズ: 14 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 14 / 4 切り上げ)
; atyp : WORD (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; ulPosition : DWORD (+2, 4byte) lpoke st,2,値 / 値 = lpeek(st,2)
; dxWidth : WORD (+6, 2byte) wpoke st,6,値 / 値 = wpeek(st,6)
; dyHeight : WORD (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; dwFlags : DWORD (+10, 4byte) lpoke st,10,値 / 値 = lpeek(st,10)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RENDDATA, pack=1
#field short atyp
#field int ulPosition
#field short dxWidth
#field short dyHeight
#field int dwFlags
#endstruct
stdim st, RENDDATA ; NSTRUCT 変数を確保
st->atyp = 100
mes "atyp=" + st->atyp