ホーム › Storage.ProjectedFileSystem › PRJ_PLACEHOLDER_INFO
PRJ_PLACEHOLDER_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| FileBasicInfo | PRJ_FILE_BASIC_INFO | 56 | +0 | +0 | 項目に関する基本情報を提供する構造体です。ファイルのサイズ (バイト単位。IsDirectory フィールドが TRUE に設定されている場合は 0 にしてください)、項目のタイムスタンプ、および属性を示します。 |
| EaInformation | _EaInformation_e__Struct | 8 | +56 | +56 | 項目の拡張属性 (EA) 情報を提供する構造体です。 |
| SecurityInformation | _SecurityInformation_e__Struct | 8 | +64 | +64 | 項目のカスタムセキュリティ記述子情報を提供します。 |
| StreamsInformation | _StreamsInformation_e__Struct | 8 | +72 | +72 | 項目の代替データストリームに関する情報を提供します。 |
| VersionInfo | PRJ_PLACEHOLDER_VERSION_INFO | 256 | +80 | +80 | プレースホルダーのプロバイダIDとコンテンツIDを格納するバージョン情報である。 |
| VariableData | BYTE | 1 | +336 | +336 | EA、カスタムセキュリティ記述子、および代替データストリーム情報を格納する可変長バッファーの先頭です。 |
構造体: _EaInformation_e__Struct x64 8B / x86 8B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| EaBufferSize | DWORD | 4 | +0 | +0 | 拡張属性バッファーのサイズ (バイト単位)。拡張属性情報がない場合は、0 に設定しなければなりません。 |
| OffsetToFirstEa | DWORD | 4 | +4 | +4 | PRJ_PLACEHOLDER_INFO 構造体の先頭から最初の FILE_FULL_EA_INFORMATION エントリまでのオフセット (バイト単位)。 |
構造体: _SecurityInformation_e__Struct x64 8B / x86 8B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SecurityBufferSize | DWORD | 4 | +0 | +0 | カスタムセキュリティ記述子のサイズ (バイト単位)。カスタムセキュリティ記述子がない場合は、0 に設定しなければなりません。 |
| OffsetToSecurityDescriptor | DWORD | 4 | +4 | +4 | PRJ_PLACEHOLDER_INFO 構造体の先頭から SECURITY_DESCRIPTOR 構造体までのオフセット (バイト単位) を指定します。 |
構造体: _StreamsInformation_e__Struct x64 8B / x86 8B
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| StreamsInfoBufferSize | DWORD | 4 | +0 | +0 | プレースホルダーの代替データストリーム情報のサイズ (バイト単位)。代替データストリームがない場合は、0 に設定しなければなりません。 |
| OffsetToFirstStreamInfo | DWORD | 4 | +4 | +4 | PRJ_PLACEHOLDER_INFO 構造体の先頭から最初の FILE_STREAM_INFORMATION エントリまでのオフセット (バイト単位)。 |
公式ドキュメント
プレースホルダーのファイルまたはディレクトリのメタデータを格納するバッファーです。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// PRJ_FILE_BASIC_INFO (x64 56 / x86 56 バイト)
typedef struct PRJ_FILE_BASIC_INFO {
BOOLEAN IsDirectory;
LONGLONG FileSize;
LONGLONG CreationTime;
LONGLONG LastAccessTime;
LONGLONG LastWriteTime;
LONGLONG ChangeTime;
DWORD FileAttributes;
} PRJ_FILE_BASIC_INFO;
// PRJ_PLACEHOLDER_VERSION_INFO (x64 256 / x86 256 バイト)
typedef struct PRJ_PLACEHOLDER_VERSION_INFO {
BYTE ProviderID[128];
BYTE ContentID[128];
} PRJ_PLACEHOLDER_VERSION_INFO;
// PRJ_PLACEHOLDER_INFO (x64 344 / x86 344 バイト)
typedef struct PRJ_PLACEHOLDER_INFO {
PRJ_FILE_BASIC_INFO FileBasicInfo;
_EaInformation_e__Struct EaInformation;
_SecurityInformation_e__Struct SecurityInformation;
_StreamsInformation_e__Struct StreamsInformation;
PRJ_PLACEHOLDER_VERSION_INFO VersionInfo;
BYTE VariableData[1];
} PRJ_PLACEHOLDER_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PRJ_FILE_BASIC_INFO
{
[MarshalAs(UnmanagedType.U1)] public bool IsDirectory;
public long FileSize;
public long CreationTime;
public long LastAccessTime;
public long LastWriteTime;
public long ChangeTime;
public uint FileAttributes;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PRJ_PLACEHOLDER_VERSION_INFO
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] public byte[] ProviderID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] public byte[] ContentID;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PRJ_PLACEHOLDER_INFO
{
public PRJ_FILE_BASIC_INFO FileBasicInfo;
public _EaInformation_e__Struct EaInformation;
public _SecurityInformation_e__Struct SecurityInformation;
public _StreamsInformation_e__Struct StreamsInformation;
public PRJ_PLACEHOLDER_VERSION_INFO VersionInfo;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] VariableData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PRJ_FILE_BASIC_INFO
<MarshalAs(UnmanagedType.U1)> Public IsDirectory As Boolean
Public FileSize As Long
Public CreationTime As Long
Public LastAccessTime As Long
Public LastWriteTime As Long
Public ChangeTime As Long
Public FileAttributes As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PRJ_PLACEHOLDER_VERSION_INFO
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=128)> Public ProviderID() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=128)> Public ContentID() As Byte
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PRJ_PLACEHOLDER_INFO
Public FileBasicInfo As PRJ_FILE_BASIC_INFO
Public EaInformation As _EaInformation_e__Struct
Public SecurityInformation As _SecurityInformation_e__Struct
Public StreamsInformation As _StreamsInformation_e__Struct
Public VersionInfo As PRJ_PLACEHOLDER_VERSION_INFO
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public VariableData() As Byte
End Structureimport ctypes
from ctypes import wintypes
class PRJ_FILE_BASIC_INFO(ctypes.Structure):
_fields_ = [
("IsDirectory", ctypes.c_byte),
("FileSize", ctypes.c_longlong),
("CreationTime", ctypes.c_longlong),
("LastAccessTime", ctypes.c_longlong),
("LastWriteTime", ctypes.c_longlong),
("ChangeTime", ctypes.c_longlong),
("FileAttributes", wintypes.DWORD),
]
class PRJ_PLACEHOLDER_VERSION_INFO(ctypes.Structure):
_fields_ = [
("ProviderID", ctypes.c_ubyte * 128),
("ContentID", ctypes.c_ubyte * 128),
]
class PRJ_PLACEHOLDER_INFO(ctypes.Structure):
_fields_ = [
("FileBasicInfo", PRJ_FILE_BASIC_INFO),
("EaInformation", _EaInformation_e__Struct),
("SecurityInformation", _SecurityInformation_e__Struct),
("StreamsInformation", _StreamsInformation_e__Struct),
("VersionInfo", PRJ_PLACEHOLDER_VERSION_INFO),
("VariableData", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct PRJ_FILE_BASIC_INFO {
pub IsDirectory: u8,
pub FileSize: i64,
pub CreationTime: i64,
pub LastAccessTime: i64,
pub LastWriteTime: i64,
pub ChangeTime: i64,
pub FileAttributes: u32,
}
#[repr(C)]
pub struct PRJ_PLACEHOLDER_VERSION_INFO {
pub ProviderID: [u8; 128],
pub ContentID: [u8; 128],
}
#[repr(C)]
pub struct PRJ_PLACEHOLDER_INFO {
pub FileBasicInfo: PRJ_FILE_BASIC_INFO,
pub EaInformation: _EaInformation_e__Struct,
pub SecurityInformation: _SecurityInformation_e__Struct,
pub StreamsInformation: _StreamsInformation_e__Struct,
pub VersionInfo: PRJ_PLACEHOLDER_VERSION_INFO,
pub VariableData: [u8; 1],
}import "golang.org/x/sys/windows"
type PRJ_FILE_BASIC_INFO struct {
IsDirectory byte
FileSize int64
CreationTime int64
LastAccessTime int64
LastWriteTime int64
ChangeTime int64
FileAttributes uint32
}
type PRJ_PLACEHOLDER_VERSION_INFO struct {
ProviderID [128]byte
ContentID [128]byte
}
type PRJ_PLACEHOLDER_INFO struct {
FileBasicInfo PRJ_FILE_BASIC_INFO
EaInformation _EaInformation_e__Struct
SecurityInformation _SecurityInformation_e__Struct
StreamsInformation _StreamsInformation_e__Struct
VersionInfo PRJ_PLACEHOLDER_VERSION_INFO
VariableData [1]byte
}type
PRJ_FILE_BASIC_INFO = record
IsDirectory: ByteBool;
FileSize: Int64;
CreationTime: Int64;
LastAccessTime: Int64;
LastWriteTime: Int64;
ChangeTime: Int64;
FileAttributes: DWORD;
end;
PRJ_PLACEHOLDER_VERSION_INFO = record
ProviderID: array[0..127] of Byte;
ContentID: array[0..127] of Byte;
end;
PRJ_PLACEHOLDER_INFO = record
FileBasicInfo: PRJ_FILE_BASIC_INFO;
EaInformation: _EaInformation_e__Struct;
SecurityInformation: _SecurityInformation_e__Struct;
StreamsInformation: _StreamsInformation_e__Struct;
VersionInfo: PRJ_PLACEHOLDER_VERSION_INFO;
VariableData: array[0..0] of Byte;
end;const PRJ_FILE_BASIC_INFO = extern struct {
IsDirectory: u8,
FileSize: i64,
CreationTime: i64,
LastAccessTime: i64,
LastWriteTime: i64,
ChangeTime: i64,
FileAttributes: u32,
};
const PRJ_PLACEHOLDER_VERSION_INFO = extern struct {
ProviderID: [128]u8,
ContentID: [128]u8,
};
const PRJ_PLACEHOLDER_INFO = extern struct {
FileBasicInfo: PRJ_FILE_BASIC_INFO,
EaInformation: _EaInformation_e__Struct,
SecurityInformation: _SecurityInformation_e__Struct,
StreamsInformation: _StreamsInformation_e__Struct,
VersionInfo: PRJ_PLACEHOLDER_VERSION_INFO,
VariableData: [1]u8,
};type
PRJ_FILE_BASIC_INFO {.bycopy.} = object
IsDirectory: uint8
FileSize: int64
CreationTime: int64
LastAccessTime: int64
LastWriteTime: int64
ChangeTime: int64
FileAttributes: uint32
PRJ_PLACEHOLDER_VERSION_INFO {.bycopy.} = object
ProviderID: array[128, uint8]
ContentID: array[128, uint8]
PRJ_PLACEHOLDER_INFO {.bycopy.} = object
FileBasicInfo: PRJ_FILE_BASIC_INFO
EaInformation: _EaInformation_e__Struct
SecurityInformation: _SecurityInformation_e__Struct
StreamsInformation: _StreamsInformation_e__Struct
VersionInfo: PRJ_PLACEHOLDER_VERSION_INFO
VariableData: array[1, uint8]struct PRJ_FILE_BASIC_INFO
{
ubyte IsDirectory;
long FileSize;
long CreationTime;
long LastAccessTime;
long LastWriteTime;
long ChangeTime;
uint FileAttributes;
}
struct PRJ_PLACEHOLDER_VERSION_INFO
{
ubyte[128] ProviderID;
ubyte[128] ContentID;
}
struct PRJ_PLACEHOLDER_INFO
{
PRJ_FILE_BASIC_INFO FileBasicInfo;
_EaInformation_e__Struct EaInformation;
_SecurityInformation_e__Struct SecurityInformation;
_StreamsInformation_e__Struct StreamsInformation;
PRJ_PLACEHOLDER_VERSION_INFO VersionInfo;
ubyte[1] VariableData;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PRJ_PLACEHOLDER_INFO サイズ: 344 バイト(x64)
dim st, 86 ; 4byte整数×86(構造体サイズ 344 / 4 切り上げ)
; FileBasicInfo : PRJ_FILE_BASIC_INFO (+0, 56byte) varptr(st)+0 を基点に操作(56byte:入れ子/配列)
; EaInformation : _EaInformation_e__Struct (+56, 8byte) varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; SecurityInformation : _SecurityInformation_e__Struct (+64, 8byte) varptr(st)+64 を基点に操作(8byte:入れ子/配列)
; StreamsInformation : _StreamsInformation_e__Struct (+72, 8byte) varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; VersionInfo : PRJ_PLACEHOLDER_VERSION_INFO (+80, 256byte) varptr(st)+80 を基点に操作(256byte:入れ子/配列)
; VariableData : BYTE (+336, 1byte) varptr(st)+336 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global PRJ_FILE_BASIC_INFO
#field bool1 IsDirectory
#field int64 FileSize
#field int64 CreationTime
#field int64 LastAccessTime
#field int64 LastWriteTime
#field int64 ChangeTime
#field int FileAttributes
#endstruct
#defstruct global PRJ_PLACEHOLDER_VERSION_INFO
#field byte ProviderID 128
#field byte ContentID 128
#endstruct
#defstruct global PRJ_PLACEHOLDER_INFO
#field PRJ_FILE_BASIC_INFO FileBasicInfo
#field _EaInformation_e__Struct EaInformation
#field _SecurityInformation_e__Struct SecurityInformation
#field _StreamsInformation_e__Struct StreamsInformation
#field PRJ_PLACEHOLDER_VERSION_INFO VersionInfo
#field byte VariableData 1
#endstruct
stdim st, PRJ_PLACEHOLDER_INFO ; NSTRUCT 変数を確保