ホーム › NetworkManagement.Rras › RASENTRYDLGA
RASENTRYDLGA
構造体サイズ=各フィールドのバイト数(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 | CHAR | 257 | +28 | +20 | 編集対象または新規作成されたエントリ名(ANSI文字列)。 |
| dwError | DWORD | 4 | +288 | +280 | ダイアログ処理で発生したエラーコード。0なら正常。 |
| reserved | UINT_PTR | 8/4 | +296 | +284 | 予約済み。0を設定する。 |
| reserved2 | UINT_PTR | 8/4 | +304 | +288 | 予約済み。0を設定する。 |
各言語での定義
#include <windows.h>
// RASENTRYDLGA (x64 312 / x86 292 バイト)
typedef struct RASENTRYDLGA {
DWORD dwSize;
HWND hwndOwner;
DWORD dwFlags;
INT xDlg;
INT yDlg;
CHAR szEntry[257];
DWORD dwError;
UINT_PTR reserved;
UINT_PTR reserved2;
} RASENTRYDLGA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RASENTRYDLGA
{
public uint dwSize;
public IntPtr hwndOwner;
public uint dwFlags;
public int xDlg;
public int yDlg;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 257)] public sbyte[] szEntry;
public uint dwError;
public UIntPtr reserved;
public UIntPtr reserved2;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RASENTRYDLGA
Public dwSize As UInteger
Public hwndOwner As IntPtr
Public dwFlags As UInteger
Public xDlg As Integer
Public yDlg As Integer
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=257)> Public szEntry() As SByte
Public dwError As UInteger
Public reserved As UIntPtr
Public reserved2 As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class RASENTRYDLGA(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_byte * 257),
("dwError", wintypes.DWORD),
("reserved", ctypes.c_size_t),
("reserved2", ctypes.c_size_t),
]#[repr(C)]
pub struct RASENTRYDLGA {
pub dwSize: u32,
pub hwndOwner: *mut core::ffi::c_void,
pub dwFlags: u32,
pub xDlg: i32,
pub yDlg: i32,
pub szEntry: [i8; 257],
pub dwError: u32,
pub reserved: usize,
pub reserved2: usize,
}import "golang.org/x/sys/windows"
type RASENTRYDLGA struct {
dwSize uint32
hwndOwner uintptr
dwFlags uint32
xDlg int32
yDlg int32
szEntry [257]int8
dwError uint32
reserved uintptr
reserved2 uintptr
}type
RASENTRYDLGA = record
dwSize: DWORD;
hwndOwner: Pointer;
dwFlags: DWORD;
xDlg: Integer;
yDlg: Integer;
szEntry: array[0..256] of Shortint;
dwError: DWORD;
reserved: NativeUInt;
reserved2: NativeUInt;
end;const RASENTRYDLGA = extern struct {
dwSize: u32,
hwndOwner: ?*anyopaque,
dwFlags: u32,
xDlg: i32,
yDlg: i32,
szEntry: [257]i8,
dwError: u32,
reserved: usize,
reserved2: usize,
};type
RASENTRYDLGA {.bycopy.} = object
dwSize: uint32
hwndOwner: pointer
dwFlags: uint32
xDlg: int32
yDlg: int32
szEntry: array[257, int8]
dwError: uint32
reserved: uint
reserved2: uintstruct RASENTRYDLGA
{
uint dwSize;
void* hwndOwner;
uint dwFlags;
int xDlg;
int yDlg;
byte[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 レイアウト)
; RASENTRYDLGA サイズ: 292 バイト(x86)
dim st, 73 ; 4byte整数×73(構造体サイズ 292 / 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 : CHAR (+20, 257byte) varptr(st)+20 を基点に操作(257byte:入れ子/配列)
; dwError : DWORD (+280, 4byte) st.70 = 値 / 値 = st.70 (lpoke/lpeek も可)
; reserved : UINT_PTR (+284, 4byte) st.71 = 値 / 値 = st.71 (lpoke/lpeek も可)
; reserved2 : UINT_PTR (+288, 4byte) st.72 = 値 / 値 = st.72 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RASENTRYDLGA サイズ: 312 バイト(x64)
dim st, 78 ; 4byte整数×78(構造体サイズ 312 / 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 : CHAR (+28, 257byte) varptr(st)+28 を基点に操作(257byte:入れ子/配列)
; dwError : DWORD (+288, 4byte) st.72 = 値 / 値 = st.72 (lpoke/lpeek も可)
; reserved : UINT_PTR (+296, 8byte) qpoke st,296,値 / qpeek(st,296) ※IronHSPのみ。3.7/3.8は lpoke st,296,下位 : lpoke st,300,上位
; reserved2 : UINT_PTR (+304, 8byte) qpoke st,304,値 / qpeek(st,304) ※IronHSPのみ。3.7/3.8は lpoke st,304,下位 : lpoke st,308,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RASENTRYDLGA
#field int dwSize
#field intptr hwndOwner
#field int dwFlags
#field int xDlg
#field int yDlg
#field byte szEntry 257
#field int dwError
#field intptr reserved
#field intptr reserved2
#endstruct
stdim st, RASENTRYDLGA ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize