Win32 API 日本語リファレンス
ホームNetworkManagement.NetManagement › REPL_EDIR_INFO_2

REPL_EDIR_INFO_2

構造体
サイズx64: 24 バイト / x86: 20 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
rped2_dirnameLPWSTR8/4+0+0エクスポート対象ディレクトリ名を示すUnicode文字列。
rped2_integrityDWORD4+8+4ディレクトリの整合性レベルを示す。ツリー/ファイル単位の更新方式を表す。
rped2_extentDWORD4+12+8複製範囲を示す。ディレクトリ単体かサブツリー全体かを表す。
rped2_lockcountDWORD4+16+12ディレクトリにかけられたロックの数を示す。0で複製可能。
rped2_locktimeDWORD4+20+16ディレクトリが最初にロックされた時刻を経過秒数で示す。

各言語での定義

#include <windows.h>

// REPL_EDIR_INFO_2  (x64 24 / x86 20 バイト)
typedef struct REPL_EDIR_INFO_2 {
    LPWSTR rped2_dirname;
    DWORD rped2_integrity;
    DWORD rped2_extent;
    DWORD rped2_lockcount;
    DWORD rped2_locktime;
} REPL_EDIR_INFO_2;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct REPL_EDIR_INFO_2
{
    public IntPtr rped2_dirname;
    public uint rped2_integrity;
    public uint rped2_extent;
    public uint rped2_lockcount;
    public uint rped2_locktime;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure REPL_EDIR_INFO_2
    Public rped2_dirname As IntPtr
    Public rped2_integrity As UInteger
    Public rped2_extent As UInteger
    Public rped2_lockcount As UInteger
    Public rped2_locktime As UInteger
End Structure
import ctypes
from ctypes import wintypes

class REPL_EDIR_INFO_2(ctypes.Structure):
    _fields_ = [
        ("rped2_dirname", ctypes.c_void_p),
        ("rped2_integrity", wintypes.DWORD),
        ("rped2_extent", wintypes.DWORD),
        ("rped2_lockcount", wintypes.DWORD),
        ("rped2_locktime", wintypes.DWORD),
    ]
#[repr(C)]
pub struct REPL_EDIR_INFO_2 {
    pub rped2_dirname: *mut core::ffi::c_void,
    pub rped2_integrity: u32,
    pub rped2_extent: u32,
    pub rped2_lockcount: u32,
    pub rped2_locktime: u32,
}
import "golang.org/x/sys/windows"

type REPL_EDIR_INFO_2 struct {
	rped2_dirname uintptr
	rped2_integrity uint32
	rped2_extent uint32
	rped2_lockcount uint32
	rped2_locktime uint32
}
type
  REPL_EDIR_INFO_2 = record
    rped2_dirname: Pointer;
    rped2_integrity: DWORD;
    rped2_extent: DWORD;
    rped2_lockcount: DWORD;
    rped2_locktime: DWORD;
  end;
const REPL_EDIR_INFO_2 = extern struct {
    rped2_dirname: ?*anyopaque,
    rped2_integrity: u32,
    rped2_extent: u32,
    rped2_lockcount: u32,
    rped2_locktime: u32,
};
type
  REPL_EDIR_INFO_2 {.bycopy.} = object
    rped2_dirname: pointer
    rped2_integrity: uint32
    rped2_extent: uint32
    rped2_lockcount: uint32
    rped2_locktime: uint32
struct REPL_EDIR_INFO_2
{
    void* rped2_dirname;
    uint rped2_integrity;
    uint rped2_extent;
    uint rped2_lockcount;
    uint rped2_locktime;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; REPL_EDIR_INFO_2 サイズ: 20 バイト(x86)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; rped2_dirname : LPWSTR (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; rped2_integrity : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; rped2_extent : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; rped2_lockcount : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; rped2_locktime : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; REPL_EDIR_INFO_2 サイズ: 24 バイト(x64)
dim st, 6    ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; rped2_dirname : LPWSTR (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; rped2_integrity : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; rped2_extent : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; rped2_lockcount : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; rped2_locktime : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global REPL_EDIR_INFO_2
    #field intptr rped2_dirname
    #field int rped2_integrity
    #field int rped2_extent
    #field int rped2_lockcount
    #field int rped2_locktime
#endstruct

stdim st, REPL_EDIR_INFO_2        ; NSTRUCT 変数を確保
st->rped2_integrity = 100
mes "rped2_integrity=" + st->rped2_integrity