ホーム › Storage.CloudFilters › CF_SYNC_STATUS
CF_SYNC_STATUS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| StructSize | DWORD | 4 | +0 | +0 | 実際の説明文字列を含む、同期状態構造体のサイズ (バイト単位)。 |
| Code | DWORD | 4 | +4 | +4 | このパラメーターの用途は、このリッチな同期状態の仕組みをサポートする同期プロバイダーに完全に委ねられています。 特定の同期プロバイダーにおいては、コードと説明文字列が 1 対 1 で対応することが想定されています。 エラーコードの種類を示すために最上位ビットを使用することを推奨します。エラーレベルのコードには メモ
Code はプラットフォームにとって不透明であり、追跡目的でのみ使用されます。 |
| DescriptionOffset | DWORD | 4 | +8 | +8 | CF_SYNC_STATUS の先頭からの相対的な説明文字列のオフセット。これは、対象のファイルについてより有意義で実行可能な情報を含むことが想定される、ローカライズされた null 終端のワイド文字列を指します。同期プロバイダーは、より実行可能な情報を提供するという要件と、メモリ使用量を可能な限り小さく保つこととのバランスを取ることが求められます。 |
| DescriptionLength | DWORD | 4 | +12 | +12 | null 終端文字を含む説明文字列のサイズ (バイト単位)。 |
| DeviceIdOffset | DWORD | 4 | +16 | +16 | CF_SYNC_STATUS の先頭からの相対的なデバイス ID BLOB のオフセット。デバイス ID BLOB は省略可能であり、プラットフォームにとって不透明です。この BLOB はデバイスごとに一意であることが想定されます。指定された場合、この BLOB は技術的な問題の診断に役立てるため、プラットフォームのテレメトリの一部として収集されます。 |
| DeviceIdLength | DWORD | 4 | +20 | +20 | デバイス ID BLOB のサイズ (バイト単位)。 |
公式ドキュメント
CF_OPERATION_INFO 構造体で使用され、指定された同期ルートの状態を示します。
解説(Remarks)
CF_OPERATION_INFO 構造体の SyncStatus フィールドに null ポインターが設定された場合、プラットフォームは以前に設定された同期状態があれば、それをクリアします。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// CF_SYNC_STATUS (x64 24 / x86 24 バイト)
typedef struct CF_SYNC_STATUS {
DWORD StructSize;
DWORD Code;
DWORD DescriptionOffset;
DWORD DescriptionLength;
DWORD DeviceIdOffset;
DWORD DeviceIdLength;
} CF_SYNC_STATUS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CF_SYNC_STATUS
{
public uint StructSize;
public uint Code;
public uint DescriptionOffset;
public uint DescriptionLength;
public uint DeviceIdOffset;
public uint DeviceIdLength;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CF_SYNC_STATUS
Public StructSize As UInteger
Public Code As UInteger
Public DescriptionOffset As UInteger
Public DescriptionLength As UInteger
Public DeviceIdOffset As UInteger
Public DeviceIdLength As UInteger
End Structureimport ctypes
from ctypes import wintypes
class CF_SYNC_STATUS(ctypes.Structure):
_fields_ = [
("StructSize", wintypes.DWORD),
("Code", wintypes.DWORD),
("DescriptionOffset", wintypes.DWORD),
("DescriptionLength", wintypes.DWORD),
("DeviceIdOffset", wintypes.DWORD),
("DeviceIdLength", wintypes.DWORD),
]#[repr(C)]
pub struct CF_SYNC_STATUS {
pub StructSize: u32,
pub Code: u32,
pub DescriptionOffset: u32,
pub DescriptionLength: u32,
pub DeviceIdOffset: u32,
pub DeviceIdLength: u32,
}import "golang.org/x/sys/windows"
type CF_SYNC_STATUS struct {
StructSize uint32
Code uint32
DescriptionOffset uint32
DescriptionLength uint32
DeviceIdOffset uint32
DeviceIdLength uint32
}type
CF_SYNC_STATUS = record
StructSize: DWORD;
Code: DWORD;
DescriptionOffset: DWORD;
DescriptionLength: DWORD;
DeviceIdOffset: DWORD;
DeviceIdLength: DWORD;
end;const CF_SYNC_STATUS = extern struct {
StructSize: u32,
Code: u32,
DescriptionOffset: u32,
DescriptionLength: u32,
DeviceIdOffset: u32,
DeviceIdLength: u32,
};type
CF_SYNC_STATUS {.bycopy.} = object
StructSize: uint32
Code: uint32
DescriptionOffset: uint32
DescriptionLength: uint32
DeviceIdOffset: uint32
DeviceIdLength: uint32struct CF_SYNC_STATUS
{
uint StructSize;
uint Code;
uint DescriptionOffset;
uint DescriptionLength;
uint DeviceIdOffset;
uint DeviceIdLength;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CF_SYNC_STATUS サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; StructSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Code : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DescriptionOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; DescriptionLength : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; DeviceIdOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; DeviceIdLength : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CF_SYNC_STATUS
#field int StructSize
#field int Code
#field int DescriptionOffset
#field int DescriptionLength
#field int DeviceIdOffset
#field int DeviceIdLength
#endstruct
stdim st, CF_SYNC_STATUS ; NSTRUCT 変数を確保
st->StructSize = 100
mes "StructSize=" + st->StructSize