ホーム › System.Ole › OCPFIPARAMS
OCPFIPARAMS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbStructSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で表す。 |
| hWndOwner | HWND | 8/4 | +8 | +4 | プロパティフレームの親ウィンドウのハンドルである。 |
| x | INT | 4 | +16 | +8 | ダイアログ表示位置のX座標である。 |
| y | INT | 4 | +20 | +12 | ダイアログ表示位置のY座標である。 |
| lpszCaption | LPWSTR | 8/4 | +24 | +16 | プロパティフレームのタイトルバー文字列である。 |
| cObjects | DWORD | 4 | +32 | +20 | 対象オブジェクトの個数を表す。 |
| lplpUnk | IUnknown** | 8/4 | +40 | +24 | 対象オブジェクトのIUnknownポインタ配列へのポインタである。 |
| cPages | DWORD | 4 | +48 | +28 | 表示するプロパティページの個数を表す。 |
| lpPages | GUID* | 8/4 | +56 | +32 | 表示するプロパティページのCLSID(GUID)配列へのポインタである。 |
| lcid | DWORD | 4 | +64 | +36 | ロケールID(LCID)である。 |
| dispidInitialProperty | INT | 4 | +68 | +40 | 最初に選択するプロパティのDISPIDである。 |
各言語での定義
#include <windows.h>
// OCPFIPARAMS (x64 72 / x86 44 バイト)
typedef struct OCPFIPARAMS {
DWORD cbStructSize;
HWND hWndOwner;
INT x;
INT y;
LPWSTR lpszCaption;
DWORD cObjects;
IUnknown** lplpUnk;
DWORD cPages;
GUID* lpPages;
DWORD lcid;
INT dispidInitialProperty;
} OCPFIPARAMS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct OCPFIPARAMS
{
public uint cbStructSize;
public IntPtr hWndOwner;
public int x;
public int y;
public IntPtr lpszCaption;
public uint cObjects;
public IntPtr lplpUnk;
public uint cPages;
public IntPtr lpPages;
public uint lcid;
public int dispidInitialProperty;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure OCPFIPARAMS
Public cbStructSize As UInteger
Public hWndOwner As IntPtr
Public x As Integer
Public y As Integer
Public lpszCaption As IntPtr
Public cObjects As UInteger
Public lplpUnk As IntPtr
Public cPages As UInteger
Public lpPages As IntPtr
Public lcid As UInteger
Public dispidInitialProperty As Integer
End Structureimport ctypes
from ctypes import wintypes
class OCPFIPARAMS(ctypes.Structure):
_fields_ = [
("cbStructSize", wintypes.DWORD),
("hWndOwner", ctypes.c_void_p),
("x", ctypes.c_int),
("y", ctypes.c_int),
("lpszCaption", ctypes.c_void_p),
("cObjects", wintypes.DWORD),
("lplpUnk", ctypes.c_void_p),
("cPages", wintypes.DWORD),
("lpPages", ctypes.c_void_p),
("lcid", wintypes.DWORD),
("dispidInitialProperty", ctypes.c_int),
]#[repr(C)]
pub struct OCPFIPARAMS {
pub cbStructSize: u32,
pub hWndOwner: *mut core::ffi::c_void,
pub x: i32,
pub y: i32,
pub lpszCaption: *mut core::ffi::c_void,
pub cObjects: u32,
pub lplpUnk: *mut core::ffi::c_void,
pub cPages: u32,
pub lpPages: *mut core::ffi::c_void,
pub lcid: u32,
pub dispidInitialProperty: i32,
}import "golang.org/x/sys/windows"
type OCPFIPARAMS struct {
cbStructSize uint32
hWndOwner uintptr
x int32
y int32
lpszCaption uintptr
cObjects uint32
lplpUnk uintptr
cPages uint32
lpPages uintptr
lcid uint32
dispidInitialProperty int32
}type
OCPFIPARAMS = record
cbStructSize: DWORD;
hWndOwner: Pointer;
x: Integer;
y: Integer;
lpszCaption: Pointer;
cObjects: DWORD;
lplpUnk: Pointer;
cPages: DWORD;
lpPages: Pointer;
lcid: DWORD;
dispidInitialProperty: Integer;
end;const OCPFIPARAMS = extern struct {
cbStructSize: u32,
hWndOwner: ?*anyopaque,
x: i32,
y: i32,
lpszCaption: ?*anyopaque,
cObjects: u32,
lplpUnk: ?*anyopaque,
cPages: u32,
lpPages: ?*anyopaque,
lcid: u32,
dispidInitialProperty: i32,
};type
OCPFIPARAMS {.bycopy.} = object
cbStructSize: uint32
hWndOwner: pointer
x: int32
y: int32
lpszCaption: pointer
cObjects: uint32
lplpUnk: pointer
cPages: uint32
lpPages: pointer
lcid: uint32
dispidInitialProperty: int32struct OCPFIPARAMS
{
uint cbStructSize;
void* hWndOwner;
int x;
int y;
void* lpszCaption;
uint cObjects;
void* lplpUnk;
uint cPages;
void* lpPages;
uint lcid;
int dispidInitialProperty;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; OCPFIPARAMS サイズ: 44 バイト(x86)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; cbStructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hWndOwner : HWND (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; x : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; y : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; lpszCaption : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cObjects : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; lplpUnk : IUnknown** (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cPages : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; lpPages : GUID* (+32, 4byte) varptr(st)+32 を基点に操作(4byte:入れ子/配列)
; lcid : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dispidInitialProperty : INT (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; OCPFIPARAMS サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; cbStructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hWndOwner : HWND (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; x : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; y : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; lpszCaption : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; cObjects : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; lplpUnk : IUnknown** (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; cPages : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; lpPages : GUID* (+56, 8byte) varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; lcid : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; dispidInitialProperty : INT (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global OCPFIPARAMS
#field int cbStructSize
#field intptr hWndOwner
#field int x
#field int y
#field intptr lpszCaption
#field int cObjects
#field intptr lplpUnk
#field int cPages
#field intptr lpPages
#field int lcid
#field int dispidInitialProperty
#endstruct
stdim st, OCPFIPARAMS ; NSTRUCT 変数を確保
st->cbStructSize = 100
mes "cbStructSize=" + st->cbStructSize