ホーム › Storage.CloudFilters › CF_SYNC_REGISTRATION
CF_SYNC_REGISTRATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| StructSize | DWORD | 4 | +0 | +0 | 本構造体のバイトサイズ。 |
| ProviderName | LPWSTR | 8/4 | +8 | +4 | 同期プロバイダーの名称文字列。 |
| ProviderVersion | LPWSTR | 8/4 | +16 | +8 | 同期プロバイダーのバージョン文字列。 |
| SyncRootIdentity | void* | 8/4 | +24 | +12 | 同期ルートを識別するプロバイダー固有データへのポインタ。 |
| SyncRootIdentityLength | DWORD | 4 | +32 | +16 | SyncRootIdentityのバイト長を表す。 |
| FileIdentity | void* | 8/4 | +40 | +20 | ファイルを識別するプロバイダー固有データへのポインタ。 |
| FileIdentityLength | DWORD | 4 | +48 | +24 | FileIdentityのバイト長を表す。 |
| ProviderId | GUID | 16 | +52 | +28 | 同期プロバイダーを識別するGUID。 |
各言語での定義
#include <windows.h>
// CF_SYNC_REGISTRATION (x64 72 / x86 44 バイト)
typedef struct CF_SYNC_REGISTRATION {
DWORD StructSize;
LPWSTR ProviderName;
LPWSTR ProviderVersion;
void* SyncRootIdentity;
DWORD SyncRootIdentityLength;
void* FileIdentity;
DWORD FileIdentityLength;
GUID ProviderId;
} CF_SYNC_REGISTRATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CF_SYNC_REGISTRATION
{
public uint StructSize;
public IntPtr ProviderName;
public IntPtr ProviderVersion;
public IntPtr SyncRootIdentity;
public uint SyncRootIdentityLength;
public IntPtr FileIdentity;
public uint FileIdentityLength;
public Guid ProviderId;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CF_SYNC_REGISTRATION
Public StructSize As UInteger
Public ProviderName As IntPtr
Public ProviderVersion As IntPtr
Public SyncRootIdentity As IntPtr
Public SyncRootIdentityLength As UInteger
Public FileIdentity As IntPtr
Public FileIdentityLength As UInteger
Public ProviderId As Guid
End Structureimport ctypes
from ctypes import wintypes
class CF_SYNC_REGISTRATION(ctypes.Structure):
_fields_ = [
("StructSize", wintypes.DWORD),
("ProviderName", ctypes.c_void_p),
("ProviderVersion", ctypes.c_void_p),
("SyncRootIdentity", ctypes.c_void_p),
("SyncRootIdentityLength", wintypes.DWORD),
("FileIdentity", ctypes.c_void_p),
("FileIdentityLength", wintypes.DWORD),
("ProviderId", GUID),
]#[repr(C)]
pub struct CF_SYNC_REGISTRATION {
pub StructSize: u32,
pub ProviderName: *mut core::ffi::c_void,
pub ProviderVersion: *mut core::ffi::c_void,
pub SyncRootIdentity: *mut core::ffi::c_void,
pub SyncRootIdentityLength: u32,
pub FileIdentity: *mut core::ffi::c_void,
pub FileIdentityLength: u32,
pub ProviderId: GUID,
}import "golang.org/x/sys/windows"
type CF_SYNC_REGISTRATION struct {
StructSize uint32
ProviderName uintptr
ProviderVersion uintptr
SyncRootIdentity uintptr
SyncRootIdentityLength uint32
FileIdentity uintptr
FileIdentityLength uint32
ProviderId windows.GUID
}type
CF_SYNC_REGISTRATION = record
StructSize: DWORD;
ProviderName: Pointer;
ProviderVersion: Pointer;
SyncRootIdentity: Pointer;
SyncRootIdentityLength: DWORD;
FileIdentity: Pointer;
FileIdentityLength: DWORD;
ProviderId: TGUID;
end;const CF_SYNC_REGISTRATION = extern struct {
StructSize: u32,
ProviderName: ?*anyopaque,
ProviderVersion: ?*anyopaque,
SyncRootIdentity: ?*anyopaque,
SyncRootIdentityLength: u32,
FileIdentity: ?*anyopaque,
FileIdentityLength: u32,
ProviderId: GUID,
};type
CF_SYNC_REGISTRATION {.bycopy.} = object
StructSize: uint32
ProviderName: pointer
ProviderVersion: pointer
SyncRootIdentity: pointer
SyncRootIdentityLength: uint32
FileIdentity: pointer
FileIdentityLength: uint32
ProviderId: GUIDstruct CF_SYNC_REGISTRATION
{
uint StructSize;
void* ProviderName;
void* ProviderVersion;
void* SyncRootIdentity;
uint SyncRootIdentityLength;
void* FileIdentity;
uint FileIdentityLength;
GUID ProviderId;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CF_SYNC_REGISTRATION サイズ: 44 バイト(x86)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ProviderName : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ProviderVersion : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; SyncRootIdentity : void* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SyncRootIdentityLength : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; FileIdentity : void* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; FileIdentityLength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ProviderId : GUID (+28, 16byte) varptr(st)+28 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CF_SYNC_REGISTRATION サイズ: 72 バイト(x64)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ProviderName : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ProviderVersion : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; SyncRootIdentity : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; SyncRootIdentityLength : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; FileIdentity : void* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; FileIdentityLength : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ProviderId : GUID (+52, 16byte) varptr(st)+52 を基点に操作(16byte:入れ子/配列)
; ※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 CF_SYNC_REGISTRATION
#field int StructSize
#field intptr ProviderName
#field intptr ProviderVersion
#field intptr SyncRootIdentity
#field int SyncRootIdentityLength
#field intptr FileIdentity
#field int FileIdentityLength
#field GUID ProviderId
#endstruct
stdim st, CF_SYNC_REGISTRATION ; NSTRUCT 変数を確保
st->StructSize = 100
mes "StructSize=" + st->StructSize