ホーム › Devices.Tapi › LINECOUNTRYENTRY
LINECOUNTRYENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwCountryID | DWORD | 4 | +0 | +0 | エントリの国/地域識別子です。国/地域識別子は内部的な識別子であり、同じ国番号を持つ複数のエントリを国/地域リスト内に存在させることができます。たとえば、北米およびカリブ海地域のすべての国または地域は国番号 1 を共有しますが、リスト内では別々のエントリが必要です。 |
| dwCountryCode | DWORD | 4 | +4 | +4 | エントリが表す国/地域の国番号です。つまり、国際通話でダイヤルされる数字です。ユーザーに表示してよいのはこの値だけです。国/地域識別子を表示してはいけません。 |
| dwNextCountryID | DWORD | 4 | +8 | +8 | 国/地域リスト内の次のエントリの国/地域識別子です。国番号と国/地域識別子は規則的な数値順に割り当てられていないため、国/地域リストは単方向のリンクリストになっており、各エントリが次のエントリを指します。リストの最後の国/地域では、dwNextCountryID の値は 0 です。 LINECOUNTRYLIST 構造体を使用してリスト全体を取得した場合、リスト内のエントリは dwNextCountryID メンバーによってリンクされた順序で並びます。 |
| dwCountryNameSize | DWORD | 4 | +12 | +12 | 国/地域の名前のサイズ (バイト単位) です。null 終端文字を含みます。 |
| dwCountryNameOffset | DWORD | 4 | +16 | +16 | 構造体の先頭から、国/地域の名前を指定する null 終端文字列までのオフセットです。このフィールドのサイズは dwCountryNameSize で指定されます。 |
| dwSameAreaRuleSize | DWORD | 4 | +20 | +20 | 直接ダイヤルのダイヤル規則のサイズ (バイト単位) です。null 終端文字を含みます。 |
| dwSameAreaRuleOffset | DWORD | 4 | +24 | +24 | 構造体の先頭から、同じ市外局番への直接ダイヤル通話に使用するダイヤル規則を格納した null 終端文字列までのオフセットです。このフィールドのサイズは dwSameAreaRuleSize で指定されます。 |
| dwLongDistanceRuleSize | DWORD | 4 | +28 | +28 | 長距離のダイヤル規則のサイズ (バイト単位) です。null 終端文字を含みます。 |
| dwLongDistanceRuleOffset | DWORD | 4 | +32 | +32 | 構造体の先頭から、同じ国/地域内の他の地域への直接ダイヤル通話に使用するダイヤル規則を格納した null 終端文字列までのオフセットです。このフィールドのサイズは dwLongDistanceRuleSize で指定されます。 |
| dwInternationalRuleSize | DWORD | 4 | +36 | +36 | 国際通話のダイヤル規則のサイズ (バイト単位) です。null 終端文字を含みます。 |
| dwInternationalRuleOffset | DWORD | 4 | +40 | +40 | LINECOUNTRYLIST 構造体の先頭から、他の国/地域への直接ダイヤル通話に使用するダイヤル規則を格納した null 終端文字列までのオフセットです。このフィールドのサイズは dwInternationalRuleSize で指定されます。 |
公式ドキュメント
LINECOUNTRYENTRY 構造体は、1 つの国/地域エントリのデータを提供します。この構造体を 1 つ以上並べた配列は、 lineGetCountry 関数が返す LINECOUNTRYLIST 構造体の一部です。
解説(Remarks)
この構造体は拡張できません。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// LINECOUNTRYENTRY (x64 44 / x86 44 バイト)
#pragma pack(push, 1)
typedef struct LINECOUNTRYENTRY {
DWORD dwCountryID;
DWORD dwCountryCode;
DWORD dwNextCountryID;
DWORD dwCountryNameSize;
DWORD dwCountryNameOffset;
DWORD dwSameAreaRuleSize;
DWORD dwSameAreaRuleOffset;
DWORD dwLongDistanceRuleSize;
DWORD dwLongDistanceRuleOffset;
DWORD dwInternationalRuleSize;
DWORD dwInternationalRuleOffset;
} LINECOUNTRYENTRY;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINECOUNTRYENTRY
{
public uint dwCountryID;
public uint dwCountryCode;
public uint dwNextCountryID;
public uint dwCountryNameSize;
public uint dwCountryNameOffset;
public uint dwSameAreaRuleSize;
public uint dwSameAreaRuleOffset;
public uint dwLongDistanceRuleSize;
public uint dwLongDistanceRuleOffset;
public uint dwInternationalRuleSize;
public uint dwInternationalRuleOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINECOUNTRYENTRY
Public dwCountryID As UInteger
Public dwCountryCode As UInteger
Public dwNextCountryID As UInteger
Public dwCountryNameSize As UInteger
Public dwCountryNameOffset 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
End Structureimport ctypes
from ctypes import wintypes
class LINECOUNTRYENTRY(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwCountryID", wintypes.DWORD),
("dwCountryCode", wintypes.DWORD),
("dwNextCountryID", wintypes.DWORD),
("dwCountryNameSize", wintypes.DWORD),
("dwCountryNameOffset", wintypes.DWORD),
("dwSameAreaRuleSize", wintypes.DWORD),
("dwSameAreaRuleOffset", wintypes.DWORD),
("dwLongDistanceRuleSize", wintypes.DWORD),
("dwLongDistanceRuleOffset", wintypes.DWORD),
("dwInternationalRuleSize", wintypes.DWORD),
("dwInternationalRuleOffset", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct LINECOUNTRYENTRY {
pub dwCountryID: u32,
pub dwCountryCode: u32,
pub dwNextCountryID: u32,
pub dwCountryNameSize: u32,
pub dwCountryNameOffset: u32,
pub dwSameAreaRuleSize: u32,
pub dwSameAreaRuleOffset: u32,
pub dwLongDistanceRuleSize: u32,
pub dwLongDistanceRuleOffset: u32,
pub dwInternationalRuleSize: u32,
pub dwInternationalRuleOffset: u32,
}import "golang.org/x/sys/windows"
type LINECOUNTRYENTRY struct {
dwCountryID uint32
dwCountryCode uint32
dwNextCountryID uint32
dwCountryNameSize uint32
dwCountryNameOffset uint32
dwSameAreaRuleSize uint32
dwSameAreaRuleOffset uint32
dwLongDistanceRuleSize uint32
dwLongDistanceRuleOffset uint32
dwInternationalRuleSize uint32
dwInternationalRuleOffset uint32
}type
LINECOUNTRYENTRY = packed record
dwCountryID: DWORD;
dwCountryCode: DWORD;
dwNextCountryID: DWORD;
dwCountryNameSize: DWORD;
dwCountryNameOffset: DWORD;
dwSameAreaRuleSize: DWORD;
dwSameAreaRuleOffset: DWORD;
dwLongDistanceRuleSize: DWORD;
dwLongDistanceRuleOffset: DWORD;
dwInternationalRuleSize: DWORD;
dwInternationalRuleOffset: DWORD;
end;const LINECOUNTRYENTRY = extern struct {
dwCountryID: u32,
dwCountryCode: u32,
dwNextCountryID: u32,
dwCountryNameSize: u32,
dwCountryNameOffset: u32,
dwSameAreaRuleSize: u32,
dwSameAreaRuleOffset: u32,
dwLongDistanceRuleSize: u32,
dwLongDistanceRuleOffset: u32,
dwInternationalRuleSize: u32,
dwInternationalRuleOffset: u32,
};type
LINECOUNTRYENTRY {.packed.} = object
dwCountryID: uint32
dwCountryCode: uint32
dwNextCountryID: uint32
dwCountryNameSize: uint32
dwCountryNameOffset: uint32
dwSameAreaRuleSize: uint32
dwSameAreaRuleOffset: uint32
dwLongDistanceRuleSize: uint32
dwLongDistanceRuleOffset: uint32
dwInternationalRuleSize: uint32
dwInternationalRuleOffset: uint32align(1)
struct LINECOUNTRYENTRY
{
uint dwCountryID;
uint dwCountryCode;
uint dwNextCountryID;
uint dwCountryNameSize;
uint dwCountryNameOffset;
uint dwSameAreaRuleSize;
uint dwSameAreaRuleOffset;
uint dwLongDistanceRuleSize;
uint dwLongDistanceRuleOffset;
uint dwInternationalRuleSize;
uint dwInternationalRuleOffset;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINECOUNTRYENTRY サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; dwCountryID : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwCountryCode : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwNextCountryID : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwCountryNameSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwCountryNameOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwSameAreaRuleSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwSameAreaRuleOffset : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwLongDistanceRuleSize : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwLongDistanceRuleOffset : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwInternationalRuleSize : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwInternationalRuleOffset : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINECOUNTRYENTRY, pack=1
#field int dwCountryID
#field int dwCountryCode
#field int dwNextCountryID
#field int dwCountryNameSize
#field int dwCountryNameOffset
#field int dwSameAreaRuleSize
#field int dwSameAreaRuleOffset
#field int dwLongDistanceRuleSize
#field int dwLongDistanceRuleOffset
#field int dwInternationalRuleSize
#field int dwInternationalRuleOffset
#endstruct
stdim st, LINECOUNTRYENTRY ; NSTRUCT 変数を確保
st->dwCountryID = 100
mes "dwCountryID=" + st->dwCountryID