ホーム › System.Ole › PROPPAGEINFO
PROPPAGEINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cb | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で表す。 |
| pszTitle | LPWSTR | 8/4 | +8 | +4 | プロパティページのタブに表示するタイトル文字列である。 |
| size | SIZE | 8 | +16 | +8 | プロパティページの推奨サイズ(ピクセル)を表すSIZEである。 |
| pszDocString | LPWSTR | 8/4 | +24 | +16 | プロパティページの説明文字列である。NULL可。 |
| pszHelpFile | LPWSTR | 8/4 | +32 | +20 | ヘルプファイルのパス文字列である。NULL可。 |
| dwHelpContext | DWORD | 4 | +40 | +24 | ヘルプファイル内のコンテキストIDである。 |
各言語での定義
#include <windows.h>
// SIZE (x64 8 / x86 8 バイト)
typedef struct SIZE {
INT cx;
INT cy;
} SIZE;
// PROPPAGEINFO (x64 48 / x86 28 バイト)
typedef struct PROPPAGEINFO {
DWORD cb;
LPWSTR pszTitle;
SIZE size;
LPWSTR pszDocString;
LPWSTR pszHelpFile;
DWORD dwHelpContext;
} PROPPAGEINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIZE
{
public int cx;
public int cy;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PROPPAGEINFO
{
public uint cb;
public IntPtr pszTitle;
public SIZE size;
public IntPtr pszDocString;
public IntPtr pszHelpFile;
public uint dwHelpContext;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SIZE
Public cx As Integer
Public cy As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PROPPAGEINFO
Public cb As UInteger
Public pszTitle As IntPtr
Public size As SIZE
Public pszDocString As IntPtr
Public pszHelpFile As IntPtr
Public dwHelpContext As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SIZE(ctypes.Structure):
_fields_ = [
("cx", ctypes.c_int),
("cy", ctypes.c_int),
]
class PROPPAGEINFO(ctypes.Structure):
_fields_ = [
("cb", wintypes.DWORD),
("pszTitle", ctypes.c_void_p),
("size", SIZE),
("pszDocString", ctypes.c_void_p),
("pszHelpFile", ctypes.c_void_p),
("dwHelpContext", wintypes.DWORD),
]#[repr(C)]
pub struct SIZE {
pub cx: i32,
pub cy: i32,
}
#[repr(C)]
pub struct PROPPAGEINFO {
pub cb: u32,
pub pszTitle: *mut core::ffi::c_void,
pub size: SIZE,
pub pszDocString: *mut core::ffi::c_void,
pub pszHelpFile: *mut core::ffi::c_void,
pub dwHelpContext: u32,
}import "golang.org/x/sys/windows"
type SIZE struct {
cx int32
cy int32
}
type PROPPAGEINFO struct {
cb uint32
pszTitle uintptr
size SIZE
pszDocString uintptr
pszHelpFile uintptr
dwHelpContext uint32
}type
SIZE = record
cx: Integer;
cy: Integer;
end;
PROPPAGEINFO = record
cb: DWORD;
pszTitle: Pointer;
size: SIZE;
pszDocString: Pointer;
pszHelpFile: Pointer;
dwHelpContext: DWORD;
end;const SIZE = extern struct {
cx: i32,
cy: i32,
};
const PROPPAGEINFO = extern struct {
cb: u32,
pszTitle: ?*anyopaque,
size: SIZE,
pszDocString: ?*anyopaque,
pszHelpFile: ?*anyopaque,
dwHelpContext: u32,
};type
SIZE {.bycopy.} = object
cx: int32
cy: int32
PROPPAGEINFO {.bycopy.} = object
cb: uint32
pszTitle: pointer
size: SIZE
pszDocString: pointer
pszHelpFile: pointer
dwHelpContext: uint32struct SIZE
{
int cx;
int cy;
}
struct PROPPAGEINFO
{
uint cb;
void* pszTitle;
SIZE size;
void* pszDocString;
void* pszHelpFile;
uint dwHelpContext;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; PROPPAGEINFO サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; cb : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pszTitle : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; size : SIZE (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; pszDocString : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; pszHelpFile : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwHelpContext : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PROPPAGEINFO サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; cb : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pszTitle : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; size : SIZE (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; pszDocString : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pszHelpFile : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; dwHelpContext : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global SIZE
#field int cx
#field int cy
#endstruct
#defstruct global PROPPAGEINFO
#field int cb
#field intptr pszTitle
#field SIZE size
#field intptr pszDocString
#field intptr pszHelpFile
#field int dwHelpContext
#endstruct
stdim st, PROPPAGEINFO ; NSTRUCT 変数を確保
st->cb = 100
mes "cb=" + st->cb