ホーム › System.Search › SUBSCRIPTIONINFO
SUBSCRIPTIONINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のバイト数。呼び出し前に sizeof で設定する。 |
| fUpdateFlags | DWORD | 4 | +4 | +4 | 有効なメンバーを示す更新フラグ。SUBSINFO_* 定数のビット組み合わせ。 |
| schedule | SUBSCRIPTIONSCHEDULE | 4 | +8 | +8 | 更新スケジュールの種類を示す SUBSCRIPTIONSCHEDULE 列挙値。 |
| customGroupCookie | GUID | 16 | +12 | +12 | カスタムスケジュールグループを識別する GUID。 |
| pTrigger | void* | 8/4 | +32 | +28 | 更新を起動するトリガーオブジェクトへのポインター。NULL 可。 |
| dwRecurseLevels | DWORD | 4 | +40 | +32 | Web クロール時に辿るリンクの再帰階層数。 |
| fWebcrawlerFlags | DWORD | 4 | +44 | +36 | Web クローラーの挙動を制御するフラグのビット集合。 |
| bMailNotification | BOOL | 4 | +48 | +40 | 更新時にメール通知するか否かのフラグ。TRUE で通知する。 |
| bGleam | BOOL | 4 | +52 | +44 | 更新検出時に項目へグリーム(光る目印)を表示するか否かのフラグ。 |
| bChangesOnly | BOOL | 4 | +56 | +48 | 変更分のみを取得するか否かのフラグ。TRUE で差分のみ取得する。 |
| bNeedPassword | BOOL | 4 | +60 | +52 | アクセスにパスワードが必要か否かのフラグ。 |
| fChannelFlags | DWORD | 4 | +64 | +56 | チャネル購読の挙動を制御するフラグのビット集合。 |
| bstrUserName | LPWSTR | 8/4 | +72 | +60 | 認証に用いるユーザー名。BSTR(ワイド文字列)。 |
| bstrPassword | LPWSTR | 8/4 | +80 | +64 | 認証に用いるパスワード。BSTR(ワイド文字列)。 |
| bstrFriendlyName | LPWSTR | 8/4 | +88 | +68 | サブスクリプションの表示名。BSTR(ワイド文字列)。 |
| dwMaxSizeKB | DWORD | 4 | +96 | +72 | ダウンロードを許可する最大サイズ。キロバイト単位。 |
| subType | SUBSCRIPTIONTYPE | 4 | +100 | +76 | サブスクリプションの種類を示す SUBSCRIPTIONTYPE 列挙値。 |
| fTaskFlags | DWORD | 4 | +104 | +80 | 関連タスクの動作を制御するフラグのビット集合。 |
| dwReserved | DWORD | 4 | +108 | +84 | 予約済みフィールド。0 を設定する。 |
各言語での定義
#include <windows.h>
// SUBSCRIPTIONINFO (x64 112 / x86 88 バイト)
typedef struct SUBSCRIPTIONINFO {
DWORD cbSize;
DWORD fUpdateFlags;
SUBSCRIPTIONSCHEDULE schedule;
GUID customGroupCookie;
void* pTrigger;
DWORD dwRecurseLevels;
DWORD fWebcrawlerFlags;
BOOL bMailNotification;
BOOL bGleam;
BOOL bChangesOnly;
BOOL bNeedPassword;
DWORD fChannelFlags;
LPWSTR bstrUserName;
LPWSTR bstrPassword;
LPWSTR bstrFriendlyName;
DWORD dwMaxSizeKB;
SUBSCRIPTIONTYPE subType;
DWORD fTaskFlags;
DWORD dwReserved;
} SUBSCRIPTIONINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SUBSCRIPTIONINFO
{
public uint cbSize;
public uint fUpdateFlags;
public int schedule;
public Guid customGroupCookie;
public IntPtr pTrigger;
public uint dwRecurseLevels;
public uint fWebcrawlerFlags;
[MarshalAs(UnmanagedType.Bool)] public bool bMailNotification;
[MarshalAs(UnmanagedType.Bool)] public bool bGleam;
[MarshalAs(UnmanagedType.Bool)] public bool bChangesOnly;
[MarshalAs(UnmanagedType.Bool)] public bool bNeedPassword;
public uint fChannelFlags;
public IntPtr bstrUserName;
public IntPtr bstrPassword;
public IntPtr bstrFriendlyName;
public uint dwMaxSizeKB;
public int subType;
public uint fTaskFlags;
public uint dwReserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SUBSCRIPTIONINFO
Public cbSize As UInteger
Public fUpdateFlags As UInteger
Public schedule As Integer
Public customGroupCookie As Guid
Public pTrigger As IntPtr
Public dwRecurseLevels As UInteger
Public fWebcrawlerFlags As UInteger
<MarshalAs(UnmanagedType.Bool)> Public bMailNotification As Boolean
<MarshalAs(UnmanagedType.Bool)> Public bGleam As Boolean
<MarshalAs(UnmanagedType.Bool)> Public bChangesOnly As Boolean
<MarshalAs(UnmanagedType.Bool)> Public bNeedPassword As Boolean
Public fChannelFlags As UInteger
Public bstrUserName As IntPtr
Public bstrPassword As IntPtr
Public bstrFriendlyName As IntPtr
Public dwMaxSizeKB As UInteger
Public subType As Integer
Public fTaskFlags As UInteger
Public dwReserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SUBSCRIPTIONINFO(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("fUpdateFlags", wintypes.DWORD),
("schedule", ctypes.c_int),
("customGroupCookie", GUID),
("pTrigger", ctypes.c_void_p),
("dwRecurseLevels", wintypes.DWORD),
("fWebcrawlerFlags", wintypes.DWORD),
("bMailNotification", wintypes.BOOL),
("bGleam", wintypes.BOOL),
("bChangesOnly", wintypes.BOOL),
("bNeedPassword", wintypes.BOOL),
("fChannelFlags", wintypes.DWORD),
("bstrUserName", ctypes.c_void_p),
("bstrPassword", ctypes.c_void_p),
("bstrFriendlyName", ctypes.c_void_p),
("dwMaxSizeKB", wintypes.DWORD),
("subType", ctypes.c_int),
("fTaskFlags", wintypes.DWORD),
("dwReserved", wintypes.DWORD),
]#[repr(C)]
pub struct SUBSCRIPTIONINFO {
pub cbSize: u32,
pub fUpdateFlags: u32,
pub schedule: i32,
pub customGroupCookie: GUID,
pub pTrigger: *mut core::ffi::c_void,
pub dwRecurseLevels: u32,
pub fWebcrawlerFlags: u32,
pub bMailNotification: i32,
pub bGleam: i32,
pub bChangesOnly: i32,
pub bNeedPassword: i32,
pub fChannelFlags: u32,
pub bstrUserName: *mut core::ffi::c_void,
pub bstrPassword: *mut core::ffi::c_void,
pub bstrFriendlyName: *mut core::ffi::c_void,
pub dwMaxSizeKB: u32,
pub subType: i32,
pub fTaskFlags: u32,
pub dwReserved: u32,
}import "golang.org/x/sys/windows"
type SUBSCRIPTIONINFO struct {
cbSize uint32
fUpdateFlags uint32
schedule int32
customGroupCookie windows.GUID
pTrigger uintptr
dwRecurseLevels uint32
fWebcrawlerFlags uint32
bMailNotification int32
bGleam int32
bChangesOnly int32
bNeedPassword int32
fChannelFlags uint32
bstrUserName uintptr
bstrPassword uintptr
bstrFriendlyName uintptr
dwMaxSizeKB uint32
subType int32
fTaskFlags uint32
dwReserved uint32
}type
SUBSCRIPTIONINFO = record
cbSize: DWORD;
fUpdateFlags: DWORD;
schedule: Integer;
customGroupCookie: TGUID;
pTrigger: Pointer;
dwRecurseLevels: DWORD;
fWebcrawlerFlags: DWORD;
bMailNotification: BOOL;
bGleam: BOOL;
bChangesOnly: BOOL;
bNeedPassword: BOOL;
fChannelFlags: DWORD;
bstrUserName: Pointer;
bstrPassword: Pointer;
bstrFriendlyName: Pointer;
dwMaxSizeKB: DWORD;
subType: Integer;
fTaskFlags: DWORD;
dwReserved: DWORD;
end;const SUBSCRIPTIONINFO = extern struct {
cbSize: u32,
fUpdateFlags: u32,
schedule: i32,
customGroupCookie: GUID,
pTrigger: ?*anyopaque,
dwRecurseLevels: u32,
fWebcrawlerFlags: u32,
bMailNotification: i32,
bGleam: i32,
bChangesOnly: i32,
bNeedPassword: i32,
fChannelFlags: u32,
bstrUserName: ?*anyopaque,
bstrPassword: ?*anyopaque,
bstrFriendlyName: ?*anyopaque,
dwMaxSizeKB: u32,
subType: i32,
fTaskFlags: u32,
dwReserved: u32,
};type
SUBSCRIPTIONINFO {.bycopy.} = object
cbSize: uint32
fUpdateFlags: uint32
schedule: int32
customGroupCookie: GUID
pTrigger: pointer
dwRecurseLevels: uint32
fWebcrawlerFlags: uint32
bMailNotification: int32
bGleam: int32
bChangesOnly: int32
bNeedPassword: int32
fChannelFlags: uint32
bstrUserName: pointer
bstrPassword: pointer
bstrFriendlyName: pointer
dwMaxSizeKB: uint32
subType: int32
fTaskFlags: uint32
dwReserved: uint32struct SUBSCRIPTIONINFO
{
uint cbSize;
uint fUpdateFlags;
int schedule;
GUID customGroupCookie;
void* pTrigger;
uint dwRecurseLevels;
uint fWebcrawlerFlags;
int bMailNotification;
int bGleam;
int bChangesOnly;
int bNeedPassword;
uint fChannelFlags;
void* bstrUserName;
void* bstrPassword;
void* bstrFriendlyName;
uint dwMaxSizeKB;
int subType;
uint fTaskFlags;
uint dwReserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SUBSCRIPTIONINFO サイズ: 88 バイト(x86)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fUpdateFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; schedule : SUBSCRIPTIONSCHEDULE (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; customGroupCookie : GUID (+12, 16byte) varptr(st)+12 を基点に操作(16byte:入れ子/配列)
; pTrigger : void* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwRecurseLevels : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; fWebcrawlerFlags : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; bMailNotification : BOOL (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; bGleam : BOOL (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; bChangesOnly : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; bNeedPassword : BOOL (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; fChannelFlags : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; bstrUserName : LPWSTR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; bstrPassword : LPWSTR (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; bstrFriendlyName : LPWSTR (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; dwMaxSizeKB : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; subType : SUBSCRIPTIONTYPE (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; fTaskFlags : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; dwReserved : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SUBSCRIPTIONINFO サイズ: 112 バイト(x64)
dim st, 28 ; 4byte整数×28(構造体サイズ 112 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fUpdateFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; schedule : SUBSCRIPTIONSCHEDULE (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; customGroupCookie : GUID (+12, 16byte) varptr(st)+12 を基点に操作(16byte:入れ子/配列)
; pTrigger : void* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; dwRecurseLevels : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; fWebcrawlerFlags : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; bMailNotification : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; bGleam : BOOL (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; bChangesOnly : BOOL (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; bNeedPassword : BOOL (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; fChannelFlags : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; bstrUserName : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; bstrPassword : LPWSTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; bstrFriendlyName : LPWSTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; dwMaxSizeKB : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; subType : SUBSCRIPTIONTYPE (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; fTaskFlags : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; dwReserved : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global SUBSCRIPTIONINFO
#field int cbSize
#field int fUpdateFlags
#field int schedule
#field GUID customGroupCookie
#field intptr pTrigger
#field int dwRecurseLevels
#field int fWebcrawlerFlags
#field bool bMailNotification
#field bool bGleam
#field bool bChangesOnly
#field bool bNeedPassword
#field int fChannelFlags
#field intptr bstrUserName
#field intptr bstrPassword
#field intptr bstrFriendlyName
#field int dwMaxSizeKB
#field int subType
#field int fTaskFlags
#field int dwReserved
#endstruct
stdim st, SUBSCRIPTIONINFO ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize