ホーム › Devices.Tapi › LINELOCATIONENTRY
LINELOCATIONENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwPermanentLocationID | DWORD | 4 | +0 | +0 | 発信場所(ロケーション)を識別する永続IDを表す。 |
| dwLocationNameSize | DWORD | 4 | +4 | +4 | ロケーション名文字列のサイズをバイトで表す。 |
| dwLocationNameOffset | DWORD | 4 | +8 | +8 | ロケーション名文字列までのオフセット。 |
| dwCountryCode | DWORD | 4 | +12 | +12 | このロケーションの国番号を表す。 |
| dwCityCodeSize | DWORD | 4 | +16 | +16 | 市外局番文字列のサイズをバイトで表す。 |
| dwCityCodeOffset | DWORD | 4 | +20 | +20 | 市外局番文字列までのオフセットをバイトで表す。 |
| dwPreferredCardID | DWORD | 4 | +24 | +24 | 既定で使用するコーリングカードのIDを表す。 |
| dwLocalAccessCodeSize | DWORD | 4 | +28 | +28 | 市内発信用外線アクセスコードのサイズをバイトで表す。 |
| dwLocalAccessCodeOffset | DWORD | 4 | +32 | +32 | 市内発信用アクセスコード文字列までのオフセット。 |
| dwLongDistanceAccessCodeSize | DWORD | 4 | +36 | +36 | 長距離発信用アクセスコードのサイズをバイトで表す。 |
| dwLongDistanceAccessCodeOffset | DWORD | 4 | +40 | +40 | 長距離発信用アクセスコード文字列までのオフセット。 |
| dwTollPrefixListSize | DWORD | 4 | +44 | +44 | 市外通話プレフィックスリストのサイズをバイトで表す。 |
| dwTollPrefixListOffset | DWORD | 4 | +48 | +48 | 市外通話プレフィックスリストまでのオフセット。 |
| dwCountryID | DWORD | 4 | +52 | +52 | このロケーションが属する国エントリのIDを表す。 |
| dwOptions | DWORD | 4 | +56 | +56 | ロケーションの動作オプション(トーン/パルス等)を示すフラグ。 |
| dwCancelCallWaitingSize | DWORD | 4 | +60 | +60 | キャッチホン解除コード文字列のサイズをバイトで表す。 |
| dwCancelCallWaitingOffset | DWORD | 4 | +64 | +64 | キャッチホン解除コード文字列までのオフセット。 |
各言語での定義
#include <windows.h>
// LINELOCATIONENTRY (x64 68 / x86 68 バイト)
#pragma pack(push, 1)
typedef struct LINELOCATIONENTRY {
DWORD dwPermanentLocationID;
DWORD dwLocationNameSize;
DWORD dwLocationNameOffset;
DWORD dwCountryCode;
DWORD dwCityCodeSize;
DWORD dwCityCodeOffset;
DWORD dwPreferredCardID;
DWORD dwLocalAccessCodeSize;
DWORD dwLocalAccessCodeOffset;
DWORD dwLongDistanceAccessCodeSize;
DWORD dwLongDistanceAccessCodeOffset;
DWORD dwTollPrefixListSize;
DWORD dwTollPrefixListOffset;
DWORD dwCountryID;
DWORD dwOptions;
DWORD dwCancelCallWaitingSize;
DWORD dwCancelCallWaitingOffset;
} LINELOCATIONENTRY;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINELOCATIONENTRY
{
public uint dwPermanentLocationID;
public uint dwLocationNameSize;
public uint dwLocationNameOffset;
public uint dwCountryCode;
public uint dwCityCodeSize;
public uint dwCityCodeOffset;
public uint dwPreferredCardID;
public uint dwLocalAccessCodeSize;
public uint dwLocalAccessCodeOffset;
public uint dwLongDistanceAccessCodeSize;
public uint dwLongDistanceAccessCodeOffset;
public uint dwTollPrefixListSize;
public uint dwTollPrefixListOffset;
public uint dwCountryID;
public uint dwOptions;
public uint dwCancelCallWaitingSize;
public uint dwCancelCallWaitingOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINELOCATIONENTRY
Public dwPermanentLocationID As UInteger
Public dwLocationNameSize As UInteger
Public dwLocationNameOffset As UInteger
Public dwCountryCode As UInteger
Public dwCityCodeSize As UInteger
Public dwCityCodeOffset As UInteger
Public dwPreferredCardID As UInteger
Public dwLocalAccessCodeSize As UInteger
Public dwLocalAccessCodeOffset As UInteger
Public dwLongDistanceAccessCodeSize As UInteger
Public dwLongDistanceAccessCodeOffset As UInteger
Public dwTollPrefixListSize As UInteger
Public dwTollPrefixListOffset As UInteger
Public dwCountryID As UInteger
Public dwOptions As UInteger
Public dwCancelCallWaitingSize As UInteger
Public dwCancelCallWaitingOffset As UInteger
End Structureimport ctypes
from ctypes import wintypes
class LINELOCATIONENTRY(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwPermanentLocationID", wintypes.DWORD),
("dwLocationNameSize", wintypes.DWORD),
("dwLocationNameOffset", wintypes.DWORD),
("dwCountryCode", wintypes.DWORD),
("dwCityCodeSize", wintypes.DWORD),
("dwCityCodeOffset", wintypes.DWORD),
("dwPreferredCardID", wintypes.DWORD),
("dwLocalAccessCodeSize", wintypes.DWORD),
("dwLocalAccessCodeOffset", wintypes.DWORD),
("dwLongDistanceAccessCodeSize", wintypes.DWORD),
("dwLongDistanceAccessCodeOffset", wintypes.DWORD),
("dwTollPrefixListSize", wintypes.DWORD),
("dwTollPrefixListOffset", wintypes.DWORD),
("dwCountryID", wintypes.DWORD),
("dwOptions", wintypes.DWORD),
("dwCancelCallWaitingSize", wintypes.DWORD),
("dwCancelCallWaitingOffset", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct LINELOCATIONENTRY {
pub dwPermanentLocationID: u32,
pub dwLocationNameSize: u32,
pub dwLocationNameOffset: u32,
pub dwCountryCode: u32,
pub dwCityCodeSize: u32,
pub dwCityCodeOffset: u32,
pub dwPreferredCardID: u32,
pub dwLocalAccessCodeSize: u32,
pub dwLocalAccessCodeOffset: u32,
pub dwLongDistanceAccessCodeSize: u32,
pub dwLongDistanceAccessCodeOffset: u32,
pub dwTollPrefixListSize: u32,
pub dwTollPrefixListOffset: u32,
pub dwCountryID: u32,
pub dwOptions: u32,
pub dwCancelCallWaitingSize: u32,
pub dwCancelCallWaitingOffset: u32,
}import "golang.org/x/sys/windows"
type LINELOCATIONENTRY struct {
dwPermanentLocationID uint32
dwLocationNameSize uint32
dwLocationNameOffset uint32
dwCountryCode uint32
dwCityCodeSize uint32
dwCityCodeOffset uint32
dwPreferredCardID uint32
dwLocalAccessCodeSize uint32
dwLocalAccessCodeOffset uint32
dwLongDistanceAccessCodeSize uint32
dwLongDistanceAccessCodeOffset uint32
dwTollPrefixListSize uint32
dwTollPrefixListOffset uint32
dwCountryID uint32
dwOptions uint32
dwCancelCallWaitingSize uint32
dwCancelCallWaitingOffset uint32
}type
LINELOCATIONENTRY = packed record
dwPermanentLocationID: DWORD;
dwLocationNameSize: DWORD;
dwLocationNameOffset: DWORD;
dwCountryCode: DWORD;
dwCityCodeSize: DWORD;
dwCityCodeOffset: DWORD;
dwPreferredCardID: DWORD;
dwLocalAccessCodeSize: DWORD;
dwLocalAccessCodeOffset: DWORD;
dwLongDistanceAccessCodeSize: DWORD;
dwLongDistanceAccessCodeOffset: DWORD;
dwTollPrefixListSize: DWORD;
dwTollPrefixListOffset: DWORD;
dwCountryID: DWORD;
dwOptions: DWORD;
dwCancelCallWaitingSize: DWORD;
dwCancelCallWaitingOffset: DWORD;
end;const LINELOCATIONENTRY = extern struct {
dwPermanentLocationID: u32,
dwLocationNameSize: u32,
dwLocationNameOffset: u32,
dwCountryCode: u32,
dwCityCodeSize: u32,
dwCityCodeOffset: u32,
dwPreferredCardID: u32,
dwLocalAccessCodeSize: u32,
dwLocalAccessCodeOffset: u32,
dwLongDistanceAccessCodeSize: u32,
dwLongDistanceAccessCodeOffset: u32,
dwTollPrefixListSize: u32,
dwTollPrefixListOffset: u32,
dwCountryID: u32,
dwOptions: u32,
dwCancelCallWaitingSize: u32,
dwCancelCallWaitingOffset: u32,
};type
LINELOCATIONENTRY {.packed.} = object
dwPermanentLocationID: uint32
dwLocationNameSize: uint32
dwLocationNameOffset: uint32
dwCountryCode: uint32
dwCityCodeSize: uint32
dwCityCodeOffset: uint32
dwPreferredCardID: uint32
dwLocalAccessCodeSize: uint32
dwLocalAccessCodeOffset: uint32
dwLongDistanceAccessCodeSize: uint32
dwLongDistanceAccessCodeOffset: uint32
dwTollPrefixListSize: uint32
dwTollPrefixListOffset: uint32
dwCountryID: uint32
dwOptions: uint32
dwCancelCallWaitingSize: uint32
dwCancelCallWaitingOffset: uint32align(1)
struct LINELOCATIONENTRY
{
uint dwPermanentLocationID;
uint dwLocationNameSize;
uint dwLocationNameOffset;
uint dwCountryCode;
uint dwCityCodeSize;
uint dwCityCodeOffset;
uint dwPreferredCardID;
uint dwLocalAccessCodeSize;
uint dwLocalAccessCodeOffset;
uint dwLongDistanceAccessCodeSize;
uint dwLongDistanceAccessCodeOffset;
uint dwTollPrefixListSize;
uint dwTollPrefixListOffset;
uint dwCountryID;
uint dwOptions;
uint dwCancelCallWaitingSize;
uint dwCancelCallWaitingOffset;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINELOCATIONENTRY サイズ: 68 バイト(x64)
dim st, 17 ; 4byte整数×17(構造体サイズ 68 / 4 切り上げ)
; dwPermanentLocationID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwLocationNameSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwLocationNameOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwCountryCode : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwCityCodeSize : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwCityCodeOffset : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwPreferredCardID : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwLocalAccessCodeSize : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwLocalAccessCodeOffset : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwLongDistanceAccessCodeSize : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwLongDistanceAccessCodeOffset : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; dwTollPrefixListSize : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwTollPrefixListOffset : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; dwCountryID : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; dwOptions : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwCancelCallWaitingSize : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; dwCancelCallWaitingOffset : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINELOCATIONENTRY, pack=1
#field int dwPermanentLocationID
#field int dwLocationNameSize
#field int dwLocationNameOffset
#field int dwCountryCode
#field int dwCityCodeSize
#field int dwCityCodeOffset
#field int dwPreferredCardID
#field int dwLocalAccessCodeSize
#field int dwLocalAccessCodeOffset
#field int dwLongDistanceAccessCodeSize
#field int dwLongDistanceAccessCodeOffset
#field int dwTollPrefixListSize
#field int dwTollPrefixListOffset
#field int dwCountryID
#field int dwOptions
#field int dwCancelCallWaitingSize
#field int dwCancelCallWaitingOffset
#endstruct
stdim st, LINELOCATIONENTRY ; NSTRUCT 変数を確保
st->dwPermanentLocationID = 100
mes "dwPermanentLocationID=" + st->dwPermanentLocationID