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+0本構造体のバイトサイズ。
TypeCF_OPERATION_TYPE4+4+4実行する操作の種別を表す。
ConnectionKeyCF_CONNECTION_KEY8+8+8同期ルートとの接続を識別する接続キー。
TransferKeyLONGLONG8+16+16データ転送操作を識別する転送キー。
CorrelationVectorCORRELATION_VECTOR*8/4+24+24操作を追跡する相関ベクターへのポインタ。NULL可。
SyncStatusCF_SYNC_STATUS*8/4+32+28操作に付随する同期状態構造体へのポインタ。NULL可。
RequestKeyLONGLONG8+40+32個々の要求を識別する要求キー。

各言語での定義

#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