Win32 API 日本語リファレンス
ホームDevices.Tapi › LINEREQMAKECALLW

LINEREQMAKECALLW

構造体
サイズx64: 480 バイト / x86: 480 バイトパッキング1

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

フィールド

フィールドサイズx64x86説明
szDestAddressWCHAR160+0+0発信先電話番号を表すUnicode文字列バッファ。発呼要求の宛先アドレス。
szAppNameWCHAR80+160+160発呼を要求したアプリケーション名のUnicode文字列。
szCalledPartyWCHAR80+240+240発信先相手の名称を示すUnicode文字列。
szCommentWCHAR160+320+320通話に付随するコメントのUnicode文字列。

各言語での定義

#include <windows.h>

// LINEREQMAKECALLW  (x64 480 / x86 480 バイト)
#pragma pack(push, 1)
typedef struct LINEREQMAKECALLW {
    WCHAR szDestAddress[80];
    WCHAR szAppName[40];
    WCHAR szCalledParty[40];
    WCHAR szComment[80];
} LINEREQMAKECALLW;
#pragma pack(pop)
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINEREQMAKECALLW
{
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szDestAddress;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] public string szAppName;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 40)] public string szCalledParty;
    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)] public string szComment;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINEREQMAKECALLW
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> Public szDestAddress As String
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=40)> Public szAppName As String
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=40)> Public szCalledParty As String
    <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> Public szComment As String
End Structure
import ctypes
from ctypes import wintypes

class LINEREQMAKECALLW(ctypes.Structure):
    _pack_ = 1
    _fields_ = [
        ("szDestAddress", ctypes.c_wchar * 80),
        ("szAppName", ctypes.c_wchar * 40),
        ("szCalledParty", ctypes.c_wchar * 40),
        ("szComment", ctypes.c_wchar * 80),
    ]
#[repr(C, packed(1))]
pub struct LINEREQMAKECALLW {
    pub szDestAddress: [u16; 80],
    pub szAppName: [u16; 40],
    pub szCalledParty: [u16; 40],
    pub szComment: [u16; 80],
}
import "golang.org/x/sys/windows"

type LINEREQMAKECALLW struct {
	szDestAddress [80]uint16
	szAppName [40]uint16
	szCalledParty [40]uint16
	szComment [80]uint16
}
type
  LINEREQMAKECALLW = packed record
    szDestAddress: array[0..79] of WideChar;
    szAppName: array[0..39] of WideChar;
    szCalledParty: array[0..39] of WideChar;
    szComment: array[0..79] of WideChar;
  end;
const LINEREQMAKECALLW = extern struct {
    szDestAddress: [80]u16,
    szAppName: [40]u16,
    szCalledParty: [40]u16,
    szComment: [80]u16,
};
type
  LINEREQMAKECALLW {.packed.} = object
    szDestAddress: array[80, uint16]
    szAppName: array[40, uint16]
    szCalledParty: array[40, uint16]
    szComment: array[80, uint16]
align(1)
struct LINEREQMAKECALLW
{
    wchar[80] szDestAddress;
    wchar[40] szAppName;
    wchar[40] szCalledParty;
    wchar[80] szComment;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINEREQMAKECALLW サイズ: 480 バイト(x64)
dim st, 120    ; 4byte整数×120(構造体サイズ 480 / 4 切り上げ)
; szDestAddress : WCHAR (+0, 160byte)  varptr(st)+0 を基点に操作(160byte:入れ子/配列)
; szAppName : WCHAR (+160, 80byte)  varptr(st)+160 を基点に操作(80byte:入れ子/配列)
; szCalledParty : WCHAR (+240, 80byte)  varptr(st)+240 を基点に操作(80byte:入れ子/配列)
; szComment : WCHAR (+320, 160byte)  varptr(st)+320 を基点に操作(160byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINEREQMAKECALLW, pack=1
    #field wchar szDestAddress 80
    #field wchar szAppName 40
    #field wchar szCalledParty 40
    #field wchar szComment 80
#endstruct

stdim st, LINEREQMAKECALLW        ; NSTRUCT 変数を確保