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

RASDIALDLG

構造体
サイズx64: 48 バイト / x86: 36 バイトパッキング4

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

フィールド

フィールドサイズx64x86説明
dwSizeDWORD4+0+0この構造体のバイト単位のサイズ。
hwndOwnerHWND8/4+4+4ダイヤルダイアログの親ウィンドウのハンドル。
dwFlagsDWORD4+12+8ダイアログの動作を制御するRASDDFLAG_*フラグ。
xDlgINT4+16+12ダイアログ表示位置のX座標(ピクセル)。
yDlgINT4+20+16ダイアログ表示位置のY座標(ピクセル)。
dwSubEntryDWORD4+24+20ダイヤルするサブエントリの1基点インデックス。
dwErrorDWORD4+28+24ダイアログ処理で発生したエラーコード。0なら正常。
reservedUINT_PTR8/4+32+28予約済み。0を設定する。
reserved2UINT_PTR8/4+40+32予約済み。0を設定する。

各言語での定義

#include <windows.h>

// RASDIALDLG  (x64 48 / x86 36 バイト)
#pragma pack(push, 4)
typedef struct RASDIALDLG {
    DWORD dwSize;
    HWND hwndOwner;
    DWORD dwFlags;
    INT xDlg;
    INT yDlg;
    DWORD dwSubEntry;
    DWORD dwError;
    UINT_PTR reserved;
    UINT_PTR reserved2;
} RASDIALDLG;
#pragma pack(pop)
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
public struct RASDIALDLG
{
    public uint dwSize;
    public IntPtr hwndOwner;
    public uint dwFlags;
    public int xDlg;
    public int yDlg;
    public uint dwSubEntry;
    public uint dwError;
    public UIntPtr reserved;
    public UIntPtr reserved2;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, Pack:=4, CharSet:=CharSet.Unicode)>
Public Structure RASDIALDLG
    Public dwSize As UInteger
    Public hwndOwner As IntPtr
    Public dwFlags As UInteger
    Public xDlg As Integer
    Public yDlg As Integer
    Public dwSubEntry As UInteger
    Public dwError As UInteger
    Public reserved As UIntPtr
    Public reserved2 As UIntPtr
End Structure
import ctypes
from ctypes import wintypes

class RASDIALDLG(ctypes.Structure):
    _pack_ = 4
    _fields_ = [
        ("dwSize", wintypes.DWORD),
        ("hwndOwner", ctypes.c_void_p),
        ("dwFlags", wintypes.DWORD),
        ("xDlg", ctypes.c_int),
        ("yDlg", ctypes.c_int),
        ("dwSubEntry", wintypes.DWORD),
        ("dwError", wintypes.DWORD),
        ("reserved", ctypes.c_size_t),
        ("reserved2", ctypes.c_size_t),
    ]
#[repr(C, packed(4))]
pub struct RASDIALDLG {
    pub dwSize: u32,
    pub hwndOwner: *mut core::ffi::c_void,
    pub dwFlags: u32,
    pub xDlg: i32,
    pub yDlg: i32,
    pub dwSubEntry: u32,
    pub dwError: u32,
    pub reserved: usize,
    pub reserved2: usize,
}
import "golang.org/x/sys/windows"

type RASDIALDLG struct {
	dwSize uint32
	hwndOwner uintptr
	dwFlags uint32
	xDlg int32
	yDlg int32
	dwSubEntry uint32
	dwError uint32
	reserved uintptr
	reserved2 uintptr
}
type
  RASDIALDLG = packed record
    dwSize: DWORD;
    hwndOwner: Pointer;
    dwFlags: DWORD;
    xDlg: Integer;
    yDlg: Integer;
    dwSubEntry: DWORD;
    dwError: DWORD;
    reserved: NativeUInt;
    reserved2: NativeUInt;
  end;
const RASDIALDLG = extern struct {
    dwSize: u32,
    hwndOwner: ?*anyopaque,
    dwFlags: u32,
    xDlg: i32,
    yDlg: i32,
    dwSubEntry: u32,
    dwError: u32,
    reserved: usize,
    reserved2: usize,
};
type
  RASDIALDLG {.packed.} = object
    dwSize: uint32
    hwndOwner: pointer
    dwFlags: uint32
    xDlg: int32
    yDlg: int32
    dwSubEntry: uint32
    dwError: uint32
    reserved: uint
    reserved2: uint
align(4)
struct RASDIALDLG
{
    uint dwSize;
    void* hwndOwner;
    uint dwFlags;
    int xDlg;
    int yDlg;
    uint dwSubEntry;
    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 レイアウト)
; RASDIALDLG サイズ: 36 バイト(x86)
dim st, 9    ; 4byte整数×9(構造体サイズ 36 / 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 も可)
; dwSubEntry : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; dwError : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; reserved : UINT_PTR (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; reserved2 : UINT_PTR (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RASDIALDLG サイズ: 48 バイト(x64)
dim st, 12    ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; hwndOwner : HWND (+4, 8byte)  qpoke st,4,値 / qpeek(st,4)  ※IronHSPのみ。3.7/3.8は lpoke st,4,下位 : lpoke st,8,上位
; dwFlags : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; xDlg : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; yDlg : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; dwSubEntry : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; dwError : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; reserved : UINT_PTR (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; reserved2 : UINT_PTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RASDIALDLG, pack=4
    #field int dwSize
    #field intptr hwndOwner
    #field int dwFlags
    #field int xDlg
    #field int yDlg
    #field int dwSubEntry
    #field int dwError
    #field intptr reserved
    #field intptr reserved2
#endstruct

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