ホーム › System.AddressBook › ADRPARM
ADRPARM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbABContEntryID | DWORD | 4 | +0 | +0 | lpABContEntryIDが指すエントリIDのバイト長。 |
| lpABContEntryID | ENTRYID* | 8/4 | +8 | +4 | 初期表示するアドレス帳コンテナのエントリIDへのポインタ。NULL可。 |
| ulFlags | DWORD | 4 | +16 | +8 | ダイアログの動作を制御するフラグ。DIALOG_MODAL/AB_SELECTONLY等を組み合わせる。 |
| lpReserved | void* | 8/4 | +24 | +12 | 予約済み。NULLを設定する。 |
| ulHelpContext | DWORD | 4 | +32 | +16 | ヘルプファイル内のヘルプコンテキストID。 |
| lpszHelpFileName | CHAR* | 8/4 | +40 | +20 | 関連付けるヘルプファイル名へのポインタ。NULL可。 |
| lpfnABSDI | LPFNABSDI | 8/4 | +48 | +24 | アドレス選択ダイアログのコールバック関数へのポインタ。NULL可。 |
| lpfnDismiss | LPFNDISMISS | 8/4 | +56 | +28 | ダイアログ終了時に呼ばれるコールバック関数へのポインタ。NULL可。 |
| lpvDismissContext | void* | 8/4 | +64 | +32 | Dismissコールバックに渡すユーザー定義コンテキストへのポインタ。 |
| lpszCaption | CHAR* | 8/4 | +72 | +36 | ダイアログのタイトルバーに表示する文字列へのポインタ。NULL可。 |
| lpszNewEntryTitle | CHAR* | 8/4 | +80 | +40 | 新規エントリボタン用のタイトル文字列へのポインタ。NULL可。 |
| lpszDestWellsTitle | CHAR* | 8/4 | +88 | +44 | 宛先ウェル領域の見出し文字列へのポインタ。NULL可。 |
| cDestFields | DWORD | 4 | +96 | +48 | 宛先フィールド(宛先/CC/BCC等)の数。 |
| nDestFieldFocus | DWORD | 4 | +100 | +52 | 初期フォーカスを置く宛先フィールドの0起点インデックス。 |
| lppszDestTitles | CHAR** | 8/4 | +104 | +56 | 各宛先フィールドの見出し文字列配列へのポインタ。 |
| lpulDestComps | DWORD* | 8/4 | +112 | +60 | 各宛先フィールドに対応する受信者種別(MAPI_TO等)配列へのポインタ。 |
| lpContRestriction | SRestriction* | 8/4 | +120 | +64 | コンテンツ表示に適用する制限(SRestriction)へのポインタ。NULL可。 |
| lpHierRestriction | SRestriction* | 8/4 | +128 | +68 | 階層表示に適用する制限(SRestriction)へのポインタ。NULL可。 |
各言語での定義
#include <windows.h>
// ADRPARM (x64 136 / x86 72 バイト)
typedef struct ADRPARM {
DWORD cbABContEntryID;
ENTRYID* lpABContEntryID;
DWORD ulFlags;
void* lpReserved;
DWORD ulHelpContext;
CHAR* lpszHelpFileName;
LPFNABSDI lpfnABSDI;
LPFNDISMISS lpfnDismiss;
void* lpvDismissContext;
CHAR* lpszCaption;
CHAR* lpszNewEntryTitle;
CHAR* lpszDestWellsTitle;
DWORD cDestFields;
DWORD nDestFieldFocus;
CHAR** lppszDestTitles;
DWORD* lpulDestComps;
SRestriction* lpContRestriction;
SRestriction* lpHierRestriction;
} ADRPARM;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ADRPARM
{
public uint cbABContEntryID;
public IntPtr lpABContEntryID;
public uint ulFlags;
public IntPtr lpReserved;
public uint ulHelpContext;
public IntPtr lpszHelpFileName;
public IntPtr lpfnABSDI;
public IntPtr lpfnDismiss;
public IntPtr lpvDismissContext;
public IntPtr lpszCaption;
public IntPtr lpszNewEntryTitle;
public IntPtr lpszDestWellsTitle;
public uint cDestFields;
public uint nDestFieldFocus;
public IntPtr lppszDestTitles;
public IntPtr lpulDestComps;
public IntPtr lpContRestriction;
public IntPtr lpHierRestriction;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ADRPARM
Public cbABContEntryID As UInteger
Public lpABContEntryID As IntPtr
Public ulFlags As UInteger
Public lpReserved As IntPtr
Public ulHelpContext As UInteger
Public lpszHelpFileName As IntPtr
Public lpfnABSDI As IntPtr
Public lpfnDismiss As IntPtr
Public lpvDismissContext As IntPtr
Public lpszCaption As IntPtr
Public lpszNewEntryTitle As IntPtr
Public lpszDestWellsTitle As IntPtr
Public cDestFields As UInteger
Public nDestFieldFocus As UInteger
Public lppszDestTitles As IntPtr
Public lpulDestComps As IntPtr
Public lpContRestriction As IntPtr
Public lpHierRestriction As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class ADRPARM(ctypes.Structure):
_fields_ = [
("cbABContEntryID", wintypes.DWORD),
("lpABContEntryID", ctypes.c_void_p),
("ulFlags", wintypes.DWORD),
("lpReserved", ctypes.c_void_p),
("ulHelpContext", wintypes.DWORD),
("lpszHelpFileName", ctypes.c_void_p),
("lpfnABSDI", ctypes.c_void_p),
("lpfnDismiss", ctypes.c_void_p),
("lpvDismissContext", ctypes.c_void_p),
("lpszCaption", ctypes.c_void_p),
("lpszNewEntryTitle", ctypes.c_void_p),
("lpszDestWellsTitle", ctypes.c_void_p),
("cDestFields", wintypes.DWORD),
("nDestFieldFocus", wintypes.DWORD),
("lppszDestTitles", ctypes.c_void_p),
("lpulDestComps", ctypes.c_void_p),
("lpContRestriction", ctypes.c_void_p),
("lpHierRestriction", ctypes.c_void_p),
]#[repr(C)]
pub struct ADRPARM {
pub cbABContEntryID: u32,
pub lpABContEntryID: *mut core::ffi::c_void,
pub ulFlags: u32,
pub lpReserved: *mut core::ffi::c_void,
pub ulHelpContext: u32,
pub lpszHelpFileName: *mut core::ffi::c_void,
pub lpfnABSDI: *mut core::ffi::c_void,
pub lpfnDismiss: *mut core::ffi::c_void,
pub lpvDismissContext: *mut core::ffi::c_void,
pub lpszCaption: *mut core::ffi::c_void,
pub lpszNewEntryTitle: *mut core::ffi::c_void,
pub lpszDestWellsTitle: *mut core::ffi::c_void,
pub cDestFields: u32,
pub nDestFieldFocus: u32,
pub lppszDestTitles: *mut core::ffi::c_void,
pub lpulDestComps: *mut core::ffi::c_void,
pub lpContRestriction: *mut core::ffi::c_void,
pub lpHierRestriction: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type ADRPARM struct {
cbABContEntryID uint32
lpABContEntryID uintptr
ulFlags uint32
lpReserved uintptr
ulHelpContext uint32
lpszHelpFileName uintptr
lpfnABSDI uintptr
lpfnDismiss uintptr
lpvDismissContext uintptr
lpszCaption uintptr
lpszNewEntryTitle uintptr
lpszDestWellsTitle uintptr
cDestFields uint32
nDestFieldFocus uint32
lppszDestTitles uintptr
lpulDestComps uintptr
lpContRestriction uintptr
lpHierRestriction uintptr
}type
ADRPARM = record
cbABContEntryID: DWORD;
lpABContEntryID: Pointer;
ulFlags: DWORD;
lpReserved: Pointer;
ulHelpContext: DWORD;
lpszHelpFileName: Pointer;
lpfnABSDI: Pointer;
lpfnDismiss: Pointer;
lpvDismissContext: Pointer;
lpszCaption: Pointer;
lpszNewEntryTitle: Pointer;
lpszDestWellsTitle: Pointer;
cDestFields: DWORD;
nDestFieldFocus: DWORD;
lppszDestTitles: Pointer;
lpulDestComps: Pointer;
lpContRestriction: Pointer;
lpHierRestriction: Pointer;
end;const ADRPARM = extern struct {
cbABContEntryID: u32,
lpABContEntryID: ?*anyopaque,
ulFlags: u32,
lpReserved: ?*anyopaque,
ulHelpContext: u32,
lpszHelpFileName: ?*anyopaque,
lpfnABSDI: ?*anyopaque,
lpfnDismiss: ?*anyopaque,
lpvDismissContext: ?*anyopaque,
lpszCaption: ?*anyopaque,
lpszNewEntryTitle: ?*anyopaque,
lpszDestWellsTitle: ?*anyopaque,
cDestFields: u32,
nDestFieldFocus: u32,
lppszDestTitles: ?*anyopaque,
lpulDestComps: ?*anyopaque,
lpContRestriction: ?*anyopaque,
lpHierRestriction: ?*anyopaque,
};type
ADRPARM {.bycopy.} = object
cbABContEntryID: uint32
lpABContEntryID: pointer
ulFlags: uint32
lpReserved: pointer
ulHelpContext: uint32
lpszHelpFileName: pointer
lpfnABSDI: pointer
lpfnDismiss: pointer
lpvDismissContext: pointer
lpszCaption: pointer
lpszNewEntryTitle: pointer
lpszDestWellsTitle: pointer
cDestFields: uint32
nDestFieldFocus: uint32
lppszDestTitles: pointer
lpulDestComps: pointer
lpContRestriction: pointer
lpHierRestriction: pointerstruct ADRPARM
{
uint cbABContEntryID;
void* lpABContEntryID;
uint ulFlags;
void* lpReserved;
uint ulHelpContext;
void* lpszHelpFileName;
void* lpfnABSDI;
void* lpfnDismiss;
void* lpvDismissContext;
void* lpszCaption;
void* lpszNewEntryTitle;
void* lpszDestWellsTitle;
uint cDestFields;
uint nDestFieldFocus;
void* lppszDestTitles;
void* lpulDestComps;
void* lpContRestriction;
void* lpHierRestriction;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ADRPARM サイズ: 72 バイト(x86)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; cbABContEntryID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpABContEntryID : ENTRYID* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; ulFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; lpReserved : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulHelpContext : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpszHelpFileName : CHAR* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; lpfnABSDI : LPFNABSDI (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; lpfnDismiss : LPFNDISMISS (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; lpvDismissContext : void* (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; lpszCaption : CHAR* (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; lpszNewEntryTitle : CHAR* (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; lpszDestWellsTitle : CHAR* (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; cDestFields : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; nDestFieldFocus : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; lppszDestTitles : CHAR** (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; lpulDestComps : DWORD* (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; lpContRestriction : SRestriction* (+64, 4byte) varptr(st)+64 を基点に操作(4byte:入れ子/配列)
; lpHierRestriction : SRestriction* (+68, 4byte) varptr(st)+68 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ADRPARM サイズ: 136 バイト(x64)
dim st, 34 ; 4byte整数×34(構造体サイズ 136 / 4 切り上げ)
; cbABContEntryID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; lpABContEntryID : ENTRYID* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; ulFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; lpReserved : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ulHelpContext : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; lpszHelpFileName : CHAR* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; lpfnABSDI : LPFNABSDI (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; lpfnDismiss : LPFNDISMISS (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; lpvDismissContext : void* (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; lpszCaption : CHAR* (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; lpszNewEntryTitle : CHAR* (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; lpszDestWellsTitle : CHAR* (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; cDestFields : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; nDestFieldFocus : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; lppszDestTitles : CHAR** (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; lpulDestComps : DWORD* (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; lpContRestriction : SRestriction* (+120, 8byte) varptr(st)+120 を基点に操作(8byte:入れ子/配列)
; lpHierRestriction : SRestriction* (+128, 8byte) varptr(st)+128 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ADRPARM
#field int cbABContEntryID
#field intptr lpABContEntryID
#field int ulFlags
#field intptr lpReserved
#field int ulHelpContext
#field intptr lpszHelpFileName
#field intptr lpfnABSDI
#field intptr lpfnDismiss
#field intptr lpvDismissContext
#field intptr lpszCaption
#field intptr lpszNewEntryTitle
#field intptr lpszDestWellsTitle
#field int cDestFields
#field int nDestFieldFocus
#field intptr lppszDestTitles
#field intptr lpulDestComps
#field intptr lpContRestriction
#field intptr lpHierRestriction
#endstruct
stdim st, ADRPARM ; NSTRUCT 変数を確保
st->cbABContEntryID = 100
mes "cbABContEntryID=" + st->cbABContEntryID