ホーム › Storage.CloudFilters › CF_CALLBACK_INFO
CF_CALLBACK_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| StructSize | DWORD | 4 | +0 | +0 | 本構造体のバイトサイズ。 |
| ConnectionKey | CF_CONNECTION_KEY | 8 | +8 | +8 | 同期ルートとの接続を識別する接続キー。 |
| CallbackContext | void* | 8/4 | +16 | +16 | コールバック登録時に指定したコンテキストへのポインタ。 |
| VolumeGuidName | LPWSTR | 8/4 | +24 | +20 | ボリュームのGUID名文字列。 |
| VolumeDosName | LPWSTR | 8/4 | +32 | +24 | ボリュームのDOS名(ドライブ文字)文字列。 |
| VolumeSerialNumber | DWORD | 4 | +40 | +28 | ボリュームのシリアル番号を表す。 |
| SyncRootFileId | LONGLONG | 8 | +48 | +32 | 同期ルートのファイルIDを表す。 |
| SyncRootIdentity | void* | 8/4 | +56 | +40 | 同期ルートを識別するプロバイダー固有データへのポインタ。 |
| SyncRootIdentityLength | DWORD | 4 | +64 | +44 | SyncRootIdentityのバイト長を表す。 |
| FileId | LONGLONG | 8 | +72 | +48 | 対象ファイルのファイルIDを表す。 |
| FileSize | LONGLONG | 8 | +80 | +56 | 対象ファイルの論理サイズをバイトで表す。 |
| FileIdentity | void* | 8/4 | +88 | +64 | ファイルを識別するプロバイダー固有データへのポインタ。 |
| FileIdentityLength | DWORD | 4 | +96 | +68 | FileIdentityのバイト長を表す。 |
| NormalizedPath | LPWSTR | 8/4 | +104 | +72 | ボリューム相対の正規化済みファイルパス文字列。 |
| TransferKey | LONGLONG | 8 | +112 | +80 | データ転送操作を識別する転送キー。 |
| PriorityHint | BYTE | 1 | +120 | +88 | I/O優先度のヒント値(0〜15)を表す。 |
| CorrelationVector | CORRELATION_VECTOR* | 8/4 | +128 | +92 | 操作を追跡する相関ベクターへのポインタ。NULL可。 |
| ProcessInfo | CF_PROCESS_INFO* | 8/4 | +136 | +96 | 操作を要求したプロセス情報へのポインタ。NULL可。 |
| RequestKey | LONGLONG | 8 | +144 | +104 | 個々の要求を識別する要求キー。 |
各言語での定義
#include <windows.h>
// CF_CALLBACK_INFO (x64 152 / x86 112 バイト)
typedef struct CF_CALLBACK_INFO {
DWORD StructSize;
CF_CONNECTION_KEY ConnectionKey;
void* CallbackContext;
LPWSTR VolumeGuidName;
LPWSTR VolumeDosName;
DWORD VolumeSerialNumber;
LONGLONG SyncRootFileId;
void* SyncRootIdentity;
DWORD SyncRootIdentityLength;
LONGLONG FileId;
LONGLONG FileSize;
void* FileIdentity;
DWORD FileIdentityLength;
LPWSTR NormalizedPath;
LONGLONG TransferKey;
BYTE PriorityHint;
CORRELATION_VECTOR* CorrelationVector;
CF_PROCESS_INFO* ProcessInfo;
LONGLONG RequestKey;
} CF_CALLBACK_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CF_CALLBACK_INFO
{
public uint StructSize;
public long ConnectionKey;
public IntPtr CallbackContext;
public IntPtr VolumeGuidName;
public IntPtr VolumeDosName;
public uint VolumeSerialNumber;
public long SyncRootFileId;
public IntPtr SyncRootIdentity;
public uint SyncRootIdentityLength;
public long FileId;
public long FileSize;
public IntPtr FileIdentity;
public uint FileIdentityLength;
public IntPtr NormalizedPath;
public long TransferKey;
public byte PriorityHint;
public IntPtr CorrelationVector;
public IntPtr ProcessInfo;
public long RequestKey;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CF_CALLBACK_INFO
Public StructSize As UInteger
Public ConnectionKey As Long
Public CallbackContext As IntPtr
Public VolumeGuidName As IntPtr
Public VolumeDosName As IntPtr
Public VolumeSerialNumber As UInteger
Public SyncRootFileId As Long
Public SyncRootIdentity As IntPtr
Public SyncRootIdentityLength As UInteger
Public FileId As Long
Public FileSize As Long
Public FileIdentity As IntPtr
Public FileIdentityLength As UInteger
Public NormalizedPath As IntPtr
Public TransferKey As Long
Public PriorityHint As Byte
Public CorrelationVector As IntPtr
Public ProcessInfo As IntPtr
Public RequestKey As Long
End Structureimport ctypes
from ctypes import wintypes
class CF_CALLBACK_INFO(ctypes.Structure):
_fields_ = [
("StructSize", wintypes.DWORD),
("ConnectionKey", ctypes.c_longlong),
("CallbackContext", ctypes.c_void_p),
("VolumeGuidName", ctypes.c_void_p),
("VolumeDosName", ctypes.c_void_p),
("VolumeSerialNumber", wintypes.DWORD),
("SyncRootFileId", ctypes.c_longlong),
("SyncRootIdentity", ctypes.c_void_p),
("SyncRootIdentityLength", wintypes.DWORD),
("FileId", ctypes.c_longlong),
("FileSize", ctypes.c_longlong),
("FileIdentity", ctypes.c_void_p),
("FileIdentityLength", wintypes.DWORD),
("NormalizedPath", ctypes.c_void_p),
("TransferKey", ctypes.c_longlong),
("PriorityHint", ctypes.c_ubyte),
("CorrelationVector", ctypes.c_void_p),
("ProcessInfo", ctypes.c_void_p),
("RequestKey", ctypes.c_longlong),
]#[repr(C)]
pub struct CF_CALLBACK_INFO {
pub StructSize: u32,
pub ConnectionKey: i64,
pub CallbackContext: *mut core::ffi::c_void,
pub VolumeGuidName: *mut core::ffi::c_void,
pub VolumeDosName: *mut core::ffi::c_void,
pub VolumeSerialNumber: u32,
pub SyncRootFileId: i64,
pub SyncRootIdentity: *mut core::ffi::c_void,
pub SyncRootIdentityLength: u32,
pub FileId: i64,
pub FileSize: i64,
pub FileIdentity: *mut core::ffi::c_void,
pub FileIdentityLength: u32,
pub NormalizedPath: *mut core::ffi::c_void,
pub TransferKey: i64,
pub PriorityHint: u8,
pub CorrelationVector: *mut core::ffi::c_void,
pub ProcessInfo: *mut core::ffi::c_void,
pub RequestKey: i64,
}import "golang.org/x/sys/windows"
type CF_CALLBACK_INFO struct {
StructSize uint32
ConnectionKey int64
CallbackContext uintptr
VolumeGuidName uintptr
VolumeDosName uintptr
VolumeSerialNumber uint32
SyncRootFileId int64
SyncRootIdentity uintptr
SyncRootIdentityLength uint32
FileId int64
FileSize int64
FileIdentity uintptr
FileIdentityLength uint32
NormalizedPath uintptr
TransferKey int64
PriorityHint byte
CorrelationVector uintptr
ProcessInfo uintptr
RequestKey int64
}type
CF_CALLBACK_INFO = record
StructSize: DWORD;
ConnectionKey: Int64;
CallbackContext: Pointer;
VolumeGuidName: Pointer;
VolumeDosName: Pointer;
VolumeSerialNumber: DWORD;
SyncRootFileId: Int64;
SyncRootIdentity: Pointer;
SyncRootIdentityLength: DWORD;
FileId: Int64;
FileSize: Int64;
FileIdentity: Pointer;
FileIdentityLength: DWORD;
NormalizedPath: Pointer;
TransferKey: Int64;
PriorityHint: Byte;
CorrelationVector: Pointer;
ProcessInfo: Pointer;
RequestKey: Int64;
end;const CF_CALLBACK_INFO = extern struct {
StructSize: u32,
ConnectionKey: i64,
CallbackContext: ?*anyopaque,
VolumeGuidName: ?*anyopaque,
VolumeDosName: ?*anyopaque,
VolumeSerialNumber: u32,
SyncRootFileId: i64,
SyncRootIdentity: ?*anyopaque,
SyncRootIdentityLength: u32,
FileId: i64,
FileSize: i64,
FileIdentity: ?*anyopaque,
FileIdentityLength: u32,
NormalizedPath: ?*anyopaque,
TransferKey: i64,
PriorityHint: u8,
CorrelationVector: ?*anyopaque,
ProcessInfo: ?*anyopaque,
RequestKey: i64,
};type
CF_CALLBACK_INFO {.bycopy.} = object
StructSize: uint32
ConnectionKey: int64
CallbackContext: pointer
VolumeGuidName: pointer
VolumeDosName: pointer
VolumeSerialNumber: uint32
SyncRootFileId: int64
SyncRootIdentity: pointer
SyncRootIdentityLength: uint32
FileId: int64
FileSize: int64
FileIdentity: pointer
FileIdentityLength: uint32
NormalizedPath: pointer
TransferKey: int64
PriorityHint: uint8
CorrelationVector: pointer
ProcessInfo: pointer
RequestKey: int64struct CF_CALLBACK_INFO
{
uint StructSize;
long ConnectionKey;
void* CallbackContext;
void* VolumeGuidName;
void* VolumeDosName;
uint VolumeSerialNumber;
long SyncRootFileId;
void* SyncRootIdentity;
uint SyncRootIdentityLength;
long FileId;
long FileSize;
void* FileIdentity;
uint FileIdentityLength;
void* NormalizedPath;
long TransferKey;
ubyte PriorityHint;
void* CorrelationVector;
void* ProcessInfo;
long RequestKey;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CF_CALLBACK_INFO サイズ: 112 バイト(x86)
dim st, 28 ; 4byte整数×28(構造体サイズ 112 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ConnectionKey : CF_CONNECTION_KEY (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; CallbackContext : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; VolumeGuidName : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; VolumeDosName : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; VolumeSerialNumber : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; SyncRootFileId : LONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; SyncRootIdentity : void* (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; SyncRootIdentityLength : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; FileId : LONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; FileSize : LONGLONG (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; FileIdentity : void* (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; FileIdentityLength : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; NormalizedPath : LPWSTR (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; TransferKey : LONGLONG (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; PriorityHint : BYTE (+88, 1byte) poke st,88,値 / 値 = peek(st,88)
; CorrelationVector : CORRELATION_VECTOR* (+92, 4byte) varptr(st)+92 を基点に操作(4byte:入れ子/配列)
; ProcessInfo : CF_PROCESS_INFO* (+96, 4byte) varptr(st)+96 を基点に操作(4byte:入れ子/配列)
; RequestKey : LONGLONG (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CF_CALLBACK_INFO サイズ: 152 バイト(x64)
dim st, 38 ; 4byte整数×38(構造体サイズ 152 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ConnectionKey : CF_CONNECTION_KEY (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; CallbackContext : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; VolumeGuidName : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; VolumeDosName : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; VolumeSerialNumber : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; SyncRootFileId : LONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; SyncRootIdentity : void* (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; SyncRootIdentityLength : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; FileId : LONGLONG (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; FileSize : LONGLONG (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; FileIdentity : void* (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; FileIdentityLength : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; NormalizedPath : LPWSTR (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; TransferKey : LONGLONG (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; PriorityHint : BYTE (+120, 1byte) poke st,120,値 / 値 = peek(st,120)
; CorrelationVector : CORRELATION_VECTOR* (+128, 8byte) varptr(st)+128 を基点に操作(8byte:入れ子/配列)
; ProcessInfo : CF_PROCESS_INFO* (+136, 8byte) varptr(st)+136 を基点に操作(8byte:入れ子/配列)
; RequestKey : LONGLONG (+144, 8byte) qpoke st,144,値 / qpeek(st,144) ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CF_CALLBACK_INFO
#field int StructSize
#field int64 ConnectionKey
#field intptr CallbackContext
#field intptr VolumeGuidName
#field intptr VolumeDosName
#field int VolumeSerialNumber
#field int64 SyncRootFileId
#field intptr SyncRootIdentity
#field int SyncRootIdentityLength
#field int64 FileId
#field int64 FileSize
#field intptr FileIdentity
#field int FileIdentityLength
#field intptr NormalizedPath
#field int64 TransferKey
#field byte PriorityHint
#field intptr CorrelationVector
#field intptr ProcessInfo
#field int64 RequestKey
#endstruct
stdim st, CF_CALLBACK_INFO ; NSTRUCT 変数を確保
st->StructSize = 100
mes "StructSize=" + st->StructSize