Win32 API 日本語リファレンス
ホームSystem.AddressBook › SCommentRestriction

SCommentRestriction

構造体
サイズx64: 24 バイト / x86: 12 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
cValuesDWORD4+0+0lpPropが指すプロパティ値配列の要素数。
lpResSRestriction*8/4+8+4コメントを付与する対象の制限(SRestriction)へのポインタ。NULL可。
lpPropSPropValue*8/4+16+8制限に関連付ける注釈用プロパティ値の配列へのポインタ。

公式ドキュメント

適用対象: Outlook 2013 | Outlook 2016

コメント制限を記述します。コメント制限は、制限に注釈を付けるために使用されます。

プロパティ
ヘッダー ファイル:
Mapidefs.h
typedef struct _SCommentRestriction
{
  ULONG          cValues;
  LPSRestriction lpRes;
  LPSPropValue   lpProp;
} SCommentRestriction;

解説(Remarks)

SCommentRestriction 構造体は、オブジェクトと名前付きプロパティのセットを関連付けます。コメント制限は評価されないという点で、他の制限とは異なります。つまり、IMAPITable::Restrict メソッドでは無視されます。IMAPITable::Restrict の呼び出しを行っても、IMAPITable::QueryRows メソッドが返す行には影響しません。

SCommentRestriction 構造体は、制限をディスクに保存する際に、アプリケーション固有の情報を制限と共に保持するために使用できます。たとえば、プロパティ制限で使用される名前付きプロパティの名前を保存するクライアントは、SCommentRestriction 構造体を使用してそれを実現できます。関連する SPropertyRestriction 構造体はプロパティ タグのみを保持するため、プロパティ制限でプロパティ名を保存することはできません。

SCommentRestriction 構造体および制限全般の詳細については、「制限について」を参照してください。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp)

各言語での定義

#include <windows.h>

// SCommentRestriction  (x64 24 / x86 12 バイト)
typedef struct SCommentRestriction {
    DWORD cValues;
    SRestriction* lpRes;
    SPropValue* lpProp;
} SCommentRestriction;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SCommentRestriction
{
    public uint cValues;
    public IntPtr lpRes;
    public IntPtr lpProp;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SCommentRestriction
    Public cValues As UInteger
    Public lpRes As IntPtr
    Public lpProp As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class SCommentRestriction(ctypes.Structure):
    _fields_ = [
        ("cValues", wintypes.DWORD),
        ("lpRes", ctypes.c_void_p),
        ("lpProp", ctypes.c_void_p),
    ]
#[repr(C)]
pub struct SCommentRestriction {
    pub cValues: u32,
    pub lpRes: *mut core::ffi::c_void,
    pub lpProp: *mut core::ffi::c_void,
}
import "golang.org/x/sys/windows"

type SCommentRestriction struct {
	cValues uint32
	lpRes uintptr
	lpProp uintptr
}
type
  SCommentRestriction = record
    cValues: DWORD;
    lpRes: Pointer;
    lpProp: Pointer;
  end;
const SCommentRestriction = extern struct {
    cValues: u32,
    lpRes: ?*anyopaque,
    lpProp: ?*anyopaque,
};
type
  SCommentRestriction {.bycopy.} = object
    cValues: uint32
    lpRes: pointer
    lpProp: pointer
struct SCommentRestriction
{
    uint cValues;
    void* lpRes;
    void* lpProp;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SCommentRestriction サイズ: 12 バイト(x86)
dim st, 3    ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; cValues : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; lpRes : SRestriction* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; lpProp : SPropValue* (+8, 4byte)  varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SCommentRestriction サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; cValues : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; lpRes : SRestriction* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; lpProp : SPropValue* (+16, 8byte)  varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SCommentRestriction
    #field int cValues
    #field intptr lpRes
    #field intptr lpProp
#endstruct

stdim st, SCommentRestriction        ; NSTRUCT 変数を確保
st->cValues = 100
mes "cValues=" + st->cValues