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