ホーム › Devices.Tapi › LINEREQMEDIACALL
LINEREQMEDIACALL
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hWnd | HWND | 8/4 | +0 | +0 | 要求を処理するアプリケーションのウィンドウハンドル。通知先ウィンドウ。 |
| wRequestID | WPARAM | 8/4 | +8 | +4 | 要求を識別するためのリクエストID。WPARAM型で渡される。 |
| szDeviceClass | CHAR | 40 | +16 | +8 | 対象とするデバイスクラスを示すANSI文字列。 |
| ucDeviceID | BYTE | 40 | +56 | +48 | デバイス識別子のバイト配列。デバイスを特定する。 |
| dwSize | DWORD | 4 | +96 | +88 | ucDeviceIDなどの可変データのサイズをバイト単位で示す。 |
| dwSecure | DWORD | 4 | +100 | +92 | 通話をセキュアに行うかを示すフラグ。0以外で機密扱い。 |
| szDestAddress | CHAR | 80 | +104 | +96 | 発信先電話番号を表すANSI文字列。 |
| szAppName | CHAR | 40 | +184 | +176 | 発呼を要求したアプリケーション名のANSI文字列。 |
| szCalledParty | CHAR | 40 | +224 | +216 | 発信先相手の名称を示すANSI文字列。 |
| szComment | CHAR | 80 | +264 | +256 | 通話に付随するコメントのANSI文字列。 |
各言語での定義
#include <windows.h>
// LINEREQMEDIACALL (x64 344 / x86 336 バイト)
#pragma pack(push, 1)
typedef struct LINEREQMEDIACALL {
HWND hWnd;
WPARAM wRequestID;
CHAR szDeviceClass[40];
BYTE ucDeviceID[40];
DWORD dwSize;
DWORD dwSecure;
CHAR szDestAddress[80];
CHAR szAppName[40];
CHAR szCalledParty[40];
CHAR szComment[80];
} LINEREQMEDIACALL;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINEREQMEDIACALL
{
public IntPtr hWnd;
public UIntPtr wRequestID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public sbyte[] szDeviceClass;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 40)] public byte[] ucDeviceID;
public uint dwSize;
public uint dwSecure;
[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, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINEREQMEDIACALL
Public hWnd As IntPtr
Public wRequestID As UIntPtr
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=40)> Public szDeviceClass() As SByte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=40)> Public ucDeviceID() As Byte
Public dwSize As UInteger
Public dwSecure As UInteger
<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 Structureimport ctypes
from ctypes import wintypes
class LINEREQMEDIACALL(ctypes.Structure):
_pack_ = 1
_fields_ = [
("hWnd", ctypes.c_void_p),
("wRequestID", ctypes.c_size_t),
("szDeviceClass", ctypes.c_byte * 40),
("ucDeviceID", ctypes.c_ubyte * 40),
("dwSize", wintypes.DWORD),
("dwSecure", wintypes.DWORD),
("szDestAddress", ctypes.c_byte * 80),
("szAppName", ctypes.c_byte * 40),
("szCalledParty", ctypes.c_byte * 40),
("szComment", ctypes.c_byte * 80),
]#[repr(C, packed(1))]
pub struct LINEREQMEDIACALL {
pub hWnd: *mut core::ffi::c_void,
pub wRequestID: usize,
pub szDeviceClass: [i8; 40],
pub ucDeviceID: [u8; 40],
pub dwSize: u32,
pub dwSecure: u32,
pub szDestAddress: [i8; 80],
pub szAppName: [i8; 40],
pub szCalledParty: [i8; 40],
pub szComment: [i8; 80],
}import "golang.org/x/sys/windows"
type LINEREQMEDIACALL struct {
hWnd uintptr
wRequestID uintptr
szDeviceClass [40]int8
ucDeviceID [40]byte
dwSize uint32
dwSecure uint32
szDestAddress [80]int8
szAppName [40]int8
szCalledParty [40]int8
szComment [80]int8
}type
LINEREQMEDIACALL = packed record
hWnd: Pointer;
wRequestID: NativeUInt;
szDeviceClass: array[0..39] of Shortint;
ucDeviceID: array[0..39] of Byte;
dwSize: DWORD;
dwSecure: DWORD;
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 LINEREQMEDIACALL = extern struct {
hWnd: ?*anyopaque,
wRequestID: usize,
szDeviceClass: [40]i8,
ucDeviceID: [40]u8,
dwSize: u32,
dwSecure: u32,
szDestAddress: [80]i8,
szAppName: [40]i8,
szCalledParty: [40]i8,
szComment: [80]i8,
};type
LINEREQMEDIACALL {.packed.} = object
hWnd: pointer
wRequestID: uint
szDeviceClass: array[40, int8]
ucDeviceID: array[40, uint8]
dwSize: uint32
dwSecure: uint32
szDestAddress: array[80, int8]
szAppName: array[40, int8]
szCalledParty: array[40, int8]
szComment: array[80, int8]align(1)
struct LINEREQMEDIACALL
{
void* hWnd;
size_t wRequestID;
byte[40] szDeviceClass;
ubyte[40] ucDeviceID;
uint dwSize;
uint dwSecure;
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整数の配列変数で操作します。(x86 レイアウト)
; LINEREQMEDIACALL サイズ: 336 バイト(x86)
dim st, 84 ; 4byte整数×84(構造体サイズ 336 / 4 切り上げ)
; hWnd : HWND (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; wRequestID : WPARAM (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; szDeviceClass : CHAR (+8, 40byte) varptr(st)+8 を基点に操作(40byte:入れ子/配列)
; ucDeviceID : BYTE (+48, 40byte) varptr(st)+48 を基点に操作(40byte:入れ子/配列)
; dwSize : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; dwSecure : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; szDestAddress : CHAR (+96, 80byte) varptr(st)+96 を基点に操作(80byte:入れ子/配列)
; szAppName : CHAR (+176, 40byte) varptr(st)+176 を基点に操作(40byte:入れ子/配列)
; szCalledParty : CHAR (+216, 40byte) varptr(st)+216 を基点に操作(40byte:入れ子/配列)
; szComment : CHAR (+256, 80byte) varptr(st)+256 を基点に操作(80byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINEREQMEDIACALL サイズ: 344 バイト(x64)
dim st, 86 ; 4byte整数×86(構造体サイズ 344 / 4 切り上げ)
; hWnd : HWND (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; wRequestID : WPARAM (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; szDeviceClass : CHAR (+16, 40byte) varptr(st)+16 を基点に操作(40byte:入れ子/配列)
; ucDeviceID : BYTE (+56, 40byte) varptr(st)+56 を基点に操作(40byte:入れ子/配列)
; dwSize : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; dwSecure : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; szDestAddress : CHAR (+104, 80byte) varptr(st)+104 を基点に操作(80byte:入れ子/配列)
; szAppName : CHAR (+184, 40byte) varptr(st)+184 を基点に操作(40byte:入れ子/配列)
; szCalledParty : CHAR (+224, 40byte) varptr(st)+224 を基点に操作(40byte:入れ子/配列)
; szComment : CHAR (+264, 80byte) varptr(st)+264 を基点に操作(80byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINEREQMEDIACALL, pack=1
#field intptr hWnd
#field intptr wRequestID
#field byte szDeviceClass 40
#field byte ucDeviceID 40
#field int dwSize
#field int dwSecure
#field byte szDestAddress 80
#field byte szAppName 40
#field byte szCalledParty 40
#field byte szComment 80
#endstruct
stdim st, LINEREQMEDIACALL ; NSTRUCT 変数を確保
st->wRequestID = 100
mes "wRequestID=" + st->wRequestID