ホーム › System.AddressBook › SExistRestriction
SExistRestriction
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ulReserved1 | DWORD | 4 | +0 | +0 | 予約済みフィールド。0を設定する必要がある。 |
| ulPropTag | DWORD | 4 | +4 | +4 | 存在判定の対象とするプロパティのプロパティタグ。 |
| ulReserved2 | DWORD | 4 | +8 | +8 | 予約済みフィールド。0を設定する必要がある。 |
各言語での定義
#include <windows.h>
// SExistRestriction (x64 12 / x86 12 バイト)
typedef struct SExistRestriction {
DWORD ulReserved1;
DWORD ulPropTag;
DWORD ulReserved2;
} SExistRestriction;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SExistRestriction
{
public uint ulReserved1;
public uint ulPropTag;
public uint ulReserved2;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SExistRestriction
Public ulReserved1 As UInteger
Public ulPropTag As UInteger
Public ulReserved2 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SExistRestriction(ctypes.Structure):
_fields_ = [
("ulReserved1", wintypes.DWORD),
("ulPropTag", wintypes.DWORD),
("ulReserved2", wintypes.DWORD),
]#[repr(C)]
pub struct SExistRestriction {
pub ulReserved1: u32,
pub ulPropTag: u32,
pub ulReserved2: u32,
}import "golang.org/x/sys/windows"
type SExistRestriction struct {
ulReserved1 uint32
ulPropTag uint32
ulReserved2 uint32
}type
SExistRestriction = record
ulReserved1: DWORD;
ulPropTag: DWORD;
ulReserved2: DWORD;
end;const SExistRestriction = extern struct {
ulReserved1: u32,
ulPropTag: u32,
ulReserved2: u32,
};type
SExistRestriction {.bycopy.} = object
ulReserved1: uint32
ulPropTag: uint32
ulReserved2: uint32struct SExistRestriction
{
uint ulReserved1;
uint ulPropTag;
uint ulReserved2;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SExistRestriction サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; ulReserved1 : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ulPropTag : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ulReserved2 : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SExistRestriction
#field int ulReserved1
#field int ulPropTag
#field int ulReserved2
#endstruct
stdim st, SExistRestriction ; NSTRUCT 変数を確保
st->ulReserved1 = 100
mes "ulReserved1=" + st->ulReserved1