ホーム › Storage.DistributedFileSystem › DFS_INFO_107
DFS_INFO_107
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Comment | LPWSTR | 8/4 | +0 | +0 | DFSルート/リンクのコメント文字列。Unicode。 |
| State | DWORD | 4 | +8 | +4 | リンク/ルートの状態フラグ。 |
| Timeout | DWORD | 4 | +12 | +8 | 参照情報のキャッシュ有効期間。秒単位。 |
| PropertyFlagMask | DWORD | 4 | +16 | +12 | PropertyFlagsの更新対象ビットを示すマスク。 |
| PropertyFlags | DWORD | 4 | +20 | +16 | DFSプロパティを示すフラグ群。 |
| SdLengthReserved | DWORD | 4 | +24 | +20 | 予約フィールド。内部使用のため0を指定する。 |
| pSecurityDescriptor | PSECURITY_DESCRIPTOR | 8/4 | +32 | +24 | DFSリンクに適用するセキュリティ記述子へのポインタ。 |
各言語での定義
#include <windows.h>
// DFS_INFO_107 (x64 40 / x86 28 バイト)
typedef struct DFS_INFO_107 {
LPWSTR Comment;
DWORD State;
DWORD Timeout;
DWORD PropertyFlagMask;
DWORD PropertyFlags;
DWORD SdLengthReserved;
PSECURITY_DESCRIPTOR pSecurityDescriptor;
} DFS_INFO_107;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DFS_INFO_107
{
public IntPtr Comment;
public uint State;
public uint Timeout;
public uint PropertyFlagMask;
public uint PropertyFlags;
public uint SdLengthReserved;
public IntPtr pSecurityDescriptor;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DFS_INFO_107
Public Comment As IntPtr
Public State As UInteger
Public Timeout As UInteger
Public PropertyFlagMask As UInteger
Public PropertyFlags As UInteger
Public SdLengthReserved As UInteger
Public pSecurityDescriptor As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class DFS_INFO_107(ctypes.Structure):
_fields_ = [
("Comment", ctypes.c_void_p),
("State", wintypes.DWORD),
("Timeout", wintypes.DWORD),
("PropertyFlagMask", wintypes.DWORD),
("PropertyFlags", wintypes.DWORD),
("SdLengthReserved", wintypes.DWORD),
("pSecurityDescriptor", ctypes.c_void_p),
]#[repr(C)]
pub struct DFS_INFO_107 {
pub Comment: *mut core::ffi::c_void,
pub State: u32,
pub Timeout: u32,
pub PropertyFlagMask: u32,
pub PropertyFlags: u32,
pub SdLengthReserved: u32,
pub pSecurityDescriptor: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type DFS_INFO_107 struct {
Comment uintptr
State uint32
Timeout uint32
PropertyFlagMask uint32
PropertyFlags uint32
SdLengthReserved uint32
pSecurityDescriptor uintptr
}type
DFS_INFO_107 = record
Comment: Pointer;
State: DWORD;
Timeout: DWORD;
PropertyFlagMask: DWORD;
PropertyFlags: DWORD;
SdLengthReserved: DWORD;
pSecurityDescriptor: Pointer;
end;const DFS_INFO_107 = extern struct {
Comment: ?*anyopaque,
State: u32,
Timeout: u32,
PropertyFlagMask: u32,
PropertyFlags: u32,
SdLengthReserved: u32,
pSecurityDescriptor: ?*anyopaque,
};type
DFS_INFO_107 {.bycopy.} = object
Comment: pointer
State: uint32
Timeout: uint32
PropertyFlagMask: uint32
PropertyFlags: uint32
SdLengthReserved: uint32
pSecurityDescriptor: pointerstruct DFS_INFO_107
{
void* Comment;
uint State;
uint Timeout;
uint PropertyFlagMask;
uint PropertyFlags;
uint SdLengthReserved;
void* pSecurityDescriptor;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DFS_INFO_107 サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; Comment : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; State : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Timeout : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; PropertyFlagMask : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; PropertyFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SdLengthReserved : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; pSecurityDescriptor : PSECURITY_DESCRIPTOR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DFS_INFO_107 サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; Comment : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; State : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Timeout : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; PropertyFlagMask : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; PropertyFlags : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; SdLengthReserved : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; pSecurityDescriptor : PSECURITY_DESCRIPTOR (+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 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DFS_INFO_107
#field intptr Comment
#field int State
#field int Timeout
#field int PropertyFlagMask
#field int PropertyFlags
#field int SdLengthReserved
#field intptr pSecurityDescriptor
#endstruct
stdim st, DFS_INFO_107 ; NSTRUCT 変数を確保
st->State = 100
mes "State=" + st->State