ホーム › 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 | プロバイダー定義の同期状態コードを表す。 |
| DescriptionOffset | DWORD | 4 | +8 | +8 | 説明文字列の構造体先頭からのオフセット。 |
| DescriptionLength | DWORD | 4 | +12 | +12 | 説明文字列のバイト長を表す。 |
| DeviceIdOffset | DWORD | 4 | +16 | +16 | デバイスID文字列の構造体先頭からのオフセット。 |
| DeviceIdLength | DWORD | 4 | +20 | +20 | デバイスID文字列のバイト長を表す。 |
各言語での定義
#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