ホーム › NetworkManagement.NetManagement › REPL_IDIR_INFO_1
REPL_IDIR_INFO_1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| rpid1_dirname | LPWSTR | 8/4 | +0 | +0 | インポート対象ディレクトリ名を示すUnicode文字列。 |
| rpid1_state | DWORD | 4 | +8 | +4 | インポートディレクトリの状態を示す。同期済み/未同期などを表す。 |
| rpid1_mastername | LPWSTR | 8/4 | +16 | +8 | 更新元(マスター)サーバー名を示すUnicode文字列。 |
| rpid1_last_update_time | DWORD | 4 | +24 | +12 | 最後に更新された時刻を経過秒数で示す。 |
| rpid1_lockcount | DWORD | 4 | +28 | +16 | ディレクトリにかけられたロックの数を示す。 |
| rpid1_locktime | DWORD | 4 | +32 | +20 | ディレクトリが最初にロックされた時刻を経過秒数で示す。 |
各言語での定義
#include <windows.h>
// REPL_IDIR_INFO_1 (x64 40 / x86 24 バイト)
typedef struct REPL_IDIR_INFO_1 {
LPWSTR rpid1_dirname;
DWORD rpid1_state;
LPWSTR rpid1_mastername;
DWORD rpid1_last_update_time;
DWORD rpid1_lockcount;
DWORD rpid1_locktime;
} REPL_IDIR_INFO_1;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct REPL_IDIR_INFO_1
{
public IntPtr rpid1_dirname;
public uint rpid1_state;
public IntPtr rpid1_mastername;
public uint rpid1_last_update_time;
public uint rpid1_lockcount;
public uint rpid1_locktime;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure REPL_IDIR_INFO_1
Public rpid1_dirname As IntPtr
Public rpid1_state As UInteger
Public rpid1_mastername As IntPtr
Public rpid1_last_update_time As UInteger
Public rpid1_lockcount As UInteger
Public rpid1_locktime As UInteger
End Structureimport ctypes
from ctypes import wintypes
class REPL_IDIR_INFO_1(ctypes.Structure):
_fields_ = [
("rpid1_dirname", ctypes.c_void_p),
("rpid1_state", wintypes.DWORD),
("rpid1_mastername", ctypes.c_void_p),
("rpid1_last_update_time", wintypes.DWORD),
("rpid1_lockcount", wintypes.DWORD),
("rpid1_locktime", wintypes.DWORD),
]#[repr(C)]
pub struct REPL_IDIR_INFO_1 {
pub rpid1_dirname: *mut core::ffi::c_void,
pub rpid1_state: u32,
pub rpid1_mastername: *mut core::ffi::c_void,
pub rpid1_last_update_time: u32,
pub rpid1_lockcount: u32,
pub rpid1_locktime: u32,
}import "golang.org/x/sys/windows"
type REPL_IDIR_INFO_1 struct {
rpid1_dirname uintptr
rpid1_state uint32
rpid1_mastername uintptr
rpid1_last_update_time uint32
rpid1_lockcount uint32
rpid1_locktime uint32
}type
REPL_IDIR_INFO_1 = record
rpid1_dirname: Pointer;
rpid1_state: DWORD;
rpid1_mastername: Pointer;
rpid1_last_update_time: DWORD;
rpid1_lockcount: DWORD;
rpid1_locktime: DWORD;
end;const REPL_IDIR_INFO_1 = extern struct {
rpid1_dirname: ?*anyopaque,
rpid1_state: u32,
rpid1_mastername: ?*anyopaque,
rpid1_last_update_time: u32,
rpid1_lockcount: u32,
rpid1_locktime: u32,
};type
REPL_IDIR_INFO_1 {.bycopy.} = object
rpid1_dirname: pointer
rpid1_state: uint32
rpid1_mastername: pointer
rpid1_last_update_time: uint32
rpid1_lockcount: uint32
rpid1_locktime: uint32struct REPL_IDIR_INFO_1
{
void* rpid1_dirname;
uint rpid1_state;
void* rpid1_mastername;
uint rpid1_last_update_time;
uint rpid1_lockcount;
uint rpid1_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_IDIR_INFO_1 サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; rpid1_dirname : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; rpid1_state : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; rpid1_mastername : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; rpid1_last_update_time : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; rpid1_lockcount : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; rpid1_locktime : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; REPL_IDIR_INFO_1 サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; rpid1_dirname : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; rpid1_state : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; rpid1_mastername : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; rpid1_last_update_time : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; rpid1_lockcount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; rpid1_locktime : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global REPL_IDIR_INFO_1
#field intptr rpid1_dirname
#field int rpid1_state
#field intptr rpid1_mastername
#field int rpid1_last_update_time
#field int rpid1_lockcount
#field int rpid1_locktime
#endstruct
stdim st, REPL_IDIR_INFO_1 ; NSTRUCT 変数を確保
st->rpid1_state = 100
mes "rpid1_state=" + st->rpid1_state