Win32 API 日本語リファレンス
ホームStorage.CloudFilters › CF_OPERATION_INFO

CF_OPERATION_INFO

構造体
サイズx64: 48 バイト / x86: 40 バイト

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

フィールド

フィールドサイズx64x86説明
StructSizeDWORD4+0+0CF_OPERATION_INFO 構造体のサイズです。
TypeCF_OPERATION_TYPE4+4+4実行される操作の種類です。詳細については、CF_OPERATION_TYPE を参照してください。
ConnectionKeyCF_CONNECTION_KEY8+8+8通信チャネル用に取得された接続キーです。
TransferKeyLONGLONG8+16+16プレースホルダーへの不透明なハンドルです。
CorrelationVectorCORRELATION_VECTOR*8/4+24+24テレメトリ目的で使用される、プレースホルダー上の相関ベクターです。
SyncStatusCF_SYNC_STATUS*8/4+32+28
メモ

このメンバーは Windows 10 バージョン 1803 で新たに追加されました。

プラットフォームの現在の CF_SYNC_STATUS です。

プラットフォームは、クラウド ファイル プレースホルダーに対する操作が失敗した際に、この情報を照会します。構造体が利用可能な場合、プラットフォームは提供された情報を使用して、より意味があり実行可能なメッセージをユーザーに対して構築します。プラットフォームは、そのファイルに対する最後のハンドルが解放されるまで、この情報を保持します。SyncStatusnull の場合、プラットフォームは以前に設定された同期状態があればそれをクリアします。

RequestKeyLONGLONG8+40+32特定のクラウド ファイルに対するクラウド ファイル操作を一意に識別する不透明な ID です。

公式ドキュメント

プレースホルダー ファイルまたはフォルダーに対する操作に関する情報です。

解説(Remarks)

プラットフォームは、CfConnectSyncRoot を介して登録されたすべてのコールバック関数に、ConnectionKeyTransferKeyCorrelationVector を提供します。さらに、同期プロバイダーは CfGetTransferKey を使用して TransferKey を、CfGetCorrelationVector を使用して CorrelationVector を取得できます。

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

各言語での定義

#include <windows.h>

// CF_OPERATION_INFO  (x64 48 / x86 40 バイト)
typedef struct CF_OPERATION_INFO {
    DWORD StructSize;
    CF_OPERATION_TYPE Type;
    CF_CONNECTION_KEY ConnectionKey;
    LONGLONG TransferKey;
    CORRELATION_VECTOR* CorrelationVector;
    CF_SYNC_STATUS* SyncStatus;
    LONGLONG RequestKey;
} CF_OPERATION_INFO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CF_OPERATION_INFO
{
    public uint StructSize;
    public int Type;
    public long ConnectionKey;
    public long TransferKey;
    public IntPtr CorrelationVector;
    public IntPtr SyncStatus;
    public long RequestKey;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CF_OPERATION_INFO
    Public StructSize As UInteger
    Public Type As Integer
    Public ConnectionKey As Long
    Public TransferKey As Long
    Public CorrelationVector As IntPtr
    Public SyncStatus As IntPtr
    Public RequestKey As Long
End Structure
import ctypes
from ctypes import wintypes

class CF_OPERATION_INFO(ctypes.Structure):
    _fields_ = [
        ("StructSize", wintypes.DWORD),
        ("Type", ctypes.c_int),
        ("ConnectionKey", ctypes.c_longlong),
        ("TransferKey", ctypes.c_longlong),
        ("CorrelationVector", ctypes.c_void_p),
        ("SyncStatus", ctypes.c_void_p),
        ("RequestKey", ctypes.c_longlong),
    ]
#[repr(C)]
pub struct CF_OPERATION_INFO {
    pub StructSize: u32,
    pub Type: i32,
    pub ConnectionKey: i64,
    pub TransferKey: i64,
    pub CorrelationVector: *mut core::ffi::c_void,
    pub SyncStatus: *mut core::ffi::c_void,
    pub RequestKey: i64,
}
import "golang.org/x/sys/windows"

type CF_OPERATION_INFO struct {
	StructSize uint32
	Type int32
	ConnectionKey int64
	TransferKey int64
	CorrelationVector uintptr
	SyncStatus uintptr
	RequestKey int64
}
type
  CF_OPERATION_INFO = record
    StructSize: DWORD;
    Type: Integer;
    ConnectionKey: Int64;
    TransferKey: Int64;
    CorrelationVector: Pointer;
    SyncStatus: Pointer;
    RequestKey: Int64;
  end;
const CF_OPERATION_INFO = extern struct {
    StructSize: u32,
    Type: i32,
    ConnectionKey: i64,
    TransferKey: i64,
    CorrelationVector: ?*anyopaque,
    SyncStatus: ?*anyopaque,
    RequestKey: i64,
};
type
  CF_OPERATION_INFO {.bycopy.} = object
    StructSize: uint32
    Type: int32
    ConnectionKey: int64
    TransferKey: int64
    CorrelationVector: pointer
    SyncStatus: pointer
    RequestKey: int64
struct CF_OPERATION_INFO
{
    uint StructSize;
    int Type;
    long ConnectionKey;
    long TransferKey;
    void* CorrelationVector;
    void* SyncStatus;
    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_OPERATION_INFO サイズ: 40 バイト(x86)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Type : CF_OPERATION_TYPE (+4, 4byte)  st.1 = 値  /  値 = st.1   (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,上位
; TransferKey : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; CorrelationVector : CORRELATION_VECTOR* (+24, 4byte)  varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; SyncStatus : CF_SYNC_STATUS* (+28, 4byte)  varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; RequestKey : LONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CF_OPERATION_INFO サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Type : CF_OPERATION_TYPE (+4, 4byte)  st.1 = 値  /  値 = st.1   (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,上位
; TransferKey : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; CorrelationVector : CORRELATION_VECTOR* (+24, 8byte)  varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; SyncStatus : CF_SYNC_STATUS* (+32, 8byte)  varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; RequestKey : LONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CF_OPERATION_INFO
    #field int StructSize
    #field int Type
    #field int64 ConnectionKey
    #field int64 TransferKey
    #field intptr CorrelationVector
    #field intptr SyncStatus
    #field int64 RequestKey
#endstruct

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