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

LINEREQMAKECALL

構造体
サイズx64: 240 バイト / x86: 240 バイト

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

フィールド

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

各言語での定義

#include <windows.h>

// LINEREQMAKECALL  (x64 240 / x86 240 バイト)
typedef struct LINEREQMAKECALL {
    CHAR szDestAddress[80];
    CHAR szAppName[40];
    CHAR szCalledParty[40];
    CHAR szComment[80];
} LINEREQMAKECALL;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LINEREQMAKECALL
{
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public sbyte[] szDestAddress;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public sbyte[] szAppName;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public sbyte[] szCalledParty;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 80)] public sbyte[] szComment;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LINEREQMAKECALL
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=80)> Public szDestAddress() As SByte
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=40)> Public szAppName() As SByte
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=40)> Public szCalledParty() As SByte
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=80)> Public szComment() As SByte
End Structure
import ctypes
from ctypes import wintypes

class LINEREQMAKECALL(ctypes.Structure):
    _fields_ = [
        ("szDestAddress", ctypes.c_byte * 80),
        ("szAppName", ctypes.c_byte * 40),
        ("szCalledParty", ctypes.c_byte * 40),
        ("szComment", ctypes.c_byte * 80),
    ]
#[repr(C)]
pub struct LINEREQMAKECALL {
    pub szDestAddress: [i8; 80],
    pub szAppName: [i8; 40],
    pub szCalledParty: [i8; 40],
    pub szComment: [i8; 80],
}
import "golang.org/x/sys/windows"

type LINEREQMAKECALL struct {
	szDestAddress [80]int8
	szAppName [40]int8
	szCalledParty [40]int8
	szComment [80]int8
}
type
  LINEREQMAKECALL = record
    szDestAddress: array[0..79] of Shortint;
    szAppName: array[0..39] of Shortint;
    szCalledParty: array[0..39] of Shortint;
    szComment: array[0..79] of Shortint;
  end;
const LINEREQMAKECALL = extern struct {
    szDestAddress: [80]i8,
    szAppName: [40]i8,
    szCalledParty: [40]i8,
    szComment: [80]i8,
};
type
  LINEREQMAKECALL {.bycopy.} = object
    szDestAddress: array[80, int8]
    szAppName: array[40, int8]
    szCalledParty: array[40, int8]
    szComment: array[80, int8]
struct LINEREQMAKECALL
{
    byte[80] szDestAddress;
    byte[40] szAppName;
    byte[40] szCalledParty;
    byte[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 レイアウト)
; LINEREQMAKECALL サイズ: 240 バイト(x64)
dim st, 60    ; 4byte整数×60(構造体サイズ 240 / 4 切り上げ)
; szDestAddress : CHAR (+0, 80byte)  varptr(st)+0 を基点に操作(80byte:入れ子/配列)
; szAppName : CHAR (+80, 40byte)  varptr(st)+80 を基点に操作(40byte:入れ子/配列)
; szCalledParty : CHAR (+120, 40byte)  varptr(st)+120 を基点に操作(40byte:入れ子/配列)
; szComment : CHAR (+160, 80byte)  varptr(st)+160 を基点に操作(80byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINEREQMAKECALL
    #field byte szDestAddress 80
    #field byte szAppName 40
    #field byte szCalledParty 40
    #field byte szComment 80
#endstruct

stdim st, LINEREQMAKECALL        ; NSTRUCT 変数を確保