ホーム › Storage.CloudFilters › CF_PLACEHOLDER_BASIC_INFO
CF_PLACEHOLDER_BASIC_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| PinState | CF_PIN_STATE | 4 | +0 | +0 | プレースホルダーのピン留め状態を表す。 |
| InSyncState | CF_IN_SYNC_STATE | 4 | +4 | +4 | プレースホルダーの同期状態を表す。 |
| FileId | LONGLONG | 8 | +8 | +8 | 対象ファイルのファイルIDを表す。 |
| SyncRootFileId | LONGLONG | 8 | +16 | +16 | 同期ルートのファイルIDを表す。 |
| FileIdentityLength | DWORD | 4 | +24 | +24 | FileIdentityのバイト長を表す。 |
| FileIdentity | BYTE | 1 | +28 | +28 | 可変長のファイル識別データの先頭バイト。 |
各言語での定義
#include <windows.h>
// CF_PLACEHOLDER_BASIC_INFO (x64 32 / x86 32 バイト)
typedef struct CF_PLACEHOLDER_BASIC_INFO {
CF_PIN_STATE PinState;
CF_IN_SYNC_STATE InSyncState;
LONGLONG FileId;
LONGLONG SyncRootFileId;
DWORD FileIdentityLength;
BYTE FileIdentity[1];
} CF_PLACEHOLDER_BASIC_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CF_PLACEHOLDER_BASIC_INFO
{
public int PinState;
public int InSyncState;
public long FileId;
public long SyncRootFileId;
public uint FileIdentityLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] FileIdentity;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CF_PLACEHOLDER_BASIC_INFO
Public PinState As Integer
Public InSyncState As Integer
Public FileId As Long
Public SyncRootFileId As Long
Public FileIdentityLength As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public FileIdentity() As Byte
End Structureimport ctypes
from ctypes import wintypes
class CF_PLACEHOLDER_BASIC_INFO(ctypes.Structure):
_fields_ = [
("PinState", ctypes.c_int),
("InSyncState", ctypes.c_int),
("FileId", ctypes.c_longlong),
("SyncRootFileId", ctypes.c_longlong),
("FileIdentityLength", wintypes.DWORD),
("FileIdentity", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct CF_PLACEHOLDER_BASIC_INFO {
pub PinState: i32,
pub InSyncState: i32,
pub FileId: i64,
pub SyncRootFileId: i64,
pub FileIdentityLength: u32,
pub FileIdentity: [u8; 1],
}import "golang.org/x/sys/windows"
type CF_PLACEHOLDER_BASIC_INFO struct {
PinState int32
InSyncState int32
FileId int64
SyncRootFileId int64
FileIdentityLength uint32
FileIdentity [1]byte
}type
CF_PLACEHOLDER_BASIC_INFO = record
PinState: Integer;
InSyncState: Integer;
FileId: Int64;
SyncRootFileId: Int64;
FileIdentityLength: DWORD;
FileIdentity: array[0..0] of Byte;
end;const CF_PLACEHOLDER_BASIC_INFO = extern struct {
PinState: i32,
InSyncState: i32,
FileId: i64,
SyncRootFileId: i64,
FileIdentityLength: u32,
FileIdentity: [1]u8,
};type
CF_PLACEHOLDER_BASIC_INFO {.bycopy.} = object
PinState: int32
InSyncState: int32
FileId: int64
SyncRootFileId: int64
FileIdentityLength: uint32
FileIdentity: array[1, uint8]struct CF_PLACEHOLDER_BASIC_INFO
{
int PinState;
int InSyncState;
long FileId;
long SyncRootFileId;
uint FileIdentityLength;
ubyte[1] FileIdentity;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CF_PLACEHOLDER_BASIC_INFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; PinState : CF_PIN_STATE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; InSyncState : CF_IN_SYNC_STATE (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; FileId : LONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SyncRootFileId : LONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; FileIdentityLength : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; FileIdentity : BYTE (+28, 1byte) varptr(st)+28 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global CF_PLACEHOLDER_BASIC_INFO
#field int PinState
#field int InSyncState
#field int64 FileId
#field int64 SyncRootFileId
#field int FileIdentityLength
#field byte FileIdentity 1
#endstruct
stdim st, CF_PLACEHOLDER_BASIC_INFO ; NSTRUCT 変数を確保
st->PinState = 100
mes "PinState=" + st->PinState