ホーム › NetworkManagement.Rras › RASENTRYDLGW
RASENTRYDLGW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | この構造体のバイト単位のサイズ。 |
| hwndOwner | HWND | 8/4 | +8 | +4 | エントリ編集ダイアログの親ウィンドウのハンドル。 |
| dwFlags | DWORD | 4 | +16 | +8 | ダイアログの動作を制御するRASEDFLAG_*フラグ。 |
| xDlg | INT | 4 | +20 | +12 | ダイアログ表示位置のX座標(ピクセル)。 |
| yDlg | INT | 4 | +24 | +16 | ダイアログ表示位置のY座標(ピクセル)。 |
| szEntry | WCHAR | 514 | +28 | +20 | 編集対象または新規作成されたエントリ名(ワイド文字列)。 |
| dwError | DWORD | 4 | +544 | +536 | ダイアログ処理で発生したエラーコード。0なら正常。 |
| reserved | UINT_PTR | 8/4 | +552 | +540 | 予約済み。0を設定する。 |
| reserved2 | UINT_PTR | 8/4 | +560 | +544 | 予約済み。0を設定する。 |
各言語での定義
#include <windows.h>
// RASENTRYDLGW (x64 568 / x86 548 バイト)
typedef struct RASENTRYDLGW {
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
INT xDlg;
INT yDlg;
WCHAR szEntry[257];
DWORD dwError;
UINT_PTR reserved;
UINT_PTR reserved2;
} RASENTRYDLGW;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RASENTRYDLGW
{
public uint dwSize;
public IntPtr hwndOwner;
public uint dwFlags;
public int xDlg;
public int yDlg;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string szEntry;
public uint dwError;
public UIntPtr reserved;
public UIntPtr reserved2;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RASENTRYDLGW
Public dwSize As UInteger
Public hwndOwner As IntPtr
Public dwFlags As UInteger
Public xDlg As Integer
Public yDlg As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public szEntry As String
Public dwError As UInteger
Public reserved As UIntPtr
Public reserved2 As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class RASENTRYDLGW(ctypes.Structure):
_fields_ = [
("dwSize", wintypes.DWORD),
("hwndOwner", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("xDlg", ctypes.c_int),
("yDlg", ctypes.c_int),
("szEntry", ctypes.c_wchar * 257),
("dwError", wintypes.DWORD),
("reserved", ctypes.c_size_t),
("reserved2", ctypes.c_size_t),
]#[repr(C)]
pub struct RASENTRYDLGW {
pub dwSize: u32,
pub hwndOwner: *mut core::ffi::c_void,
pub dwFlags: u32,
pub xDlg: i32,
pub yDlg: i32,
pub szEntry: [u16; 257],
pub dwError: u32,
pub reserved: usize,
pub reserved2: usize,
}import "golang.org/x/sys/windows"
type RASENTRYDLGW struct {
dwSize uint32
hwndOwner uintptr
dwFlags uint32
xDlg int32
yDlg int32
szEntry [257]uint16
dwError uint32
reserved uintptr
reserved2 uintptr
}type
RASENTRYDLGW = record
dwSize: DWORD;
hwndOwner: Pointer;
dwFlags: DWORD;
xDlg: Integer;
yDlg: Integer;
szEntry: array[0..256] of WideChar;
dwError: DWORD;
reserved: NativeUInt;
reserved2: NativeUInt;
end;const RASENTRYDLGW = extern struct {
dwSize: u32,
hwndOwner: ?*anyopaque,
dwFlags: u32,
xDlg: i32,
yDlg: i32,
szEntry: [257]u16,
dwError: u32,
reserved: usize,
reserved2: usize,
};type
RASENTRYDLGW {.bycopy.} = object
dwSize: uint32
hwndOwner: pointer
dwFlags: uint32
xDlg: int32
yDlg: int32
szEntry: array[257, uint16]
dwError: uint32
reserved: uint
reserved2: uintstruct RASENTRYDLGW
{
uint dwSize;
void* hwndOwner;
uint dwFlags;
int xDlg;
int yDlg;
wchar[257] szEntry;
uint dwError;
size_t reserved;
size_t reserved2;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; RASENTRYDLGW サイズ: 548 バイト(x86)
dim st, 137 ; 4byte整数×137(構造体サイズ 548 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hwndOwner : HWND (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; xDlg : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; yDlg : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; szEntry : WCHAR (+20, 514byte) varptr(st)+20 を基点に操作(514byte:入れ子/配列)
; dwError : DWORD (+536, 4byte) st.134 = 値 / 値 = st.134 (lpoke/lpeek も可)
; reserved : UINT_PTR (+540, 4byte) st.135 = 値 / 値 = st.135 (lpoke/lpeek も可)
; reserved2 : UINT_PTR (+544, 4byte) st.136 = 値 / 値 = st.136 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RASENTRYDLGW サイズ: 568 バイト(x64)
dim st, 142 ; 4byte整数×142(構造体サイズ 568 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hwndOwner : HWND (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dwFlags : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; xDlg : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; yDlg : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; szEntry : WCHAR (+28, 514byte) varptr(st)+28 を基点に操作(514byte:入れ子/配列)
; dwError : DWORD (+544, 4byte) st.136 = 値 / 値 = st.136 (lpoke/lpeek も可)
; reserved : UINT_PTR (+552, 8byte) qpoke st,552,値 / qpeek(st,552) ※IronHSPのみ。3.7/3.8は lpoke st,552,下位 : lpoke st,556,上位
; reserved2 : UINT_PTR (+560, 8byte) qpoke st,560,値 / qpeek(st,560) ※IronHSPのみ。3.7/3.8は lpoke st,560,下位 : lpoke st,564,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RASENTRYDLGW
#field int dwSize
#field intptr hwndOwner
#field int dwFlags
#field int xDlg
#field int yDlg
#field wchar szEntry 257
#field int dwError
#field intptr reserved
#field intptr reserved2
#endstruct
stdim st, RASENTRYDLGW ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize