ホーム › Devices.Tapi › LINETRANSLATECAPS
LINETRANSLATECAPS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwTotalSize | DWORD | 4 | +0 | +0 | このデータ構造体に割り当てられた合計サイズ (バイト単位)。 |
| dwNeededSize | DWORD | 4 | +4 | +4 | 返されるすべての情報を保持するために必要な、このデータ構造体のサイズ (バイト単位)。 |
| dwUsedSize | DWORD | 4 | +8 | +8 | このデータ構造体のうち、有用な情報が格納されている部分のサイズ (バイト単位)。 |
| dwNumLocations | DWORD | 4 | +12 | +12 | LocationList 内のエントリ数。0 (既定) を含め、定義されているすべての所在地が対象となります。 |
| dwLocationListSize | DWORD | 4 | +16 | +16 | アドレス変換が認識している所在地の一覧のサイズ (バイト単位)。 |
| dwLocationListOffset | DWORD | 4 | +20 | +20 | この構造体の先頭から、アドレス変換が認識している所在地の一覧までのオフセット。この一覧は LINELOCATIONENTRY 構造体の並びで構成されます。dwLocationListOffset メンバーは最初の構造体の先頭バイトを指し、dwLocationListSize メンバーは一覧の合計バイト数を示します。 |
| dwCurrentLocationID | DWORD | 4 | +24 | +24 | レジストリの [Locations] セクションにある CurrentLocation エントリの永続的な識別子。 LINELOCATIONENTRY 構造体の dwPermanentLocationID メンバーを参照してください。 |
| dwNumCards | DWORD | 4 | +28 | +28 | CardList 内のエントリ数。 |
| dwCardListSize | DWORD | 4 | +32 | +32 | アドレス変換が認識している通話カードの一覧のサイズ (バイト単位)。 |
| dwCardListOffset | DWORD | 4 | +36 | +36 | この構造体の先頭から、アドレス変換が認識している通話カードの一覧までのオフセット。非表示ではないカードのエントリのみが対象となり、常にカード 0 (ダイレクトダイヤル) が含まれます。この一覧は LINECARDENTRY 構造体の並びで構成されます。dwCardListOffset メンバーは最初の構造体の先頭バイトを指し、dwCardListSize メンバーは一覧の合計バイト数を示します。 |
| dwCurrentPreferredCardID | DWORD | 4 | +40 | +40 | レジストリの [Locations] セクションにある CurrentLocation エントリで優先される通話カード。 LINELOCATIONENTRY 構造体の dwPreferredCardID メンバーを参照してください。 |
公式ドキュメント
LINETRANSLATECAPS 構造体は、アドレス変換の機能を記述します。この構造体には、 LINELOCATIONENTRY 構造体の配列と LINECARDENTRY 構造体の配列を格納できます。 LINETRANSLATECAPS 構造体は lineGetTranslateCaps 関数から返されます。
解説(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>
// LINETRANSLATECAPS (x64 44 / x86 44 バイト)
#pragma pack(push, 1)
typedef struct LINETRANSLATECAPS {
DWORD dwTotalSize;
DWORD dwNeededSize;
DWORD dwUsedSize;
DWORD dwNumLocations;
DWORD dwLocationListSize;
DWORD dwLocationListOffset;
DWORD dwCurrentLocationID;
DWORD dwNumCards;
DWORD dwCardListSize;
DWORD dwCardListOffset;
DWORD dwCurrentPreferredCardID;
} LINETRANSLATECAPS;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINETRANSLATECAPS
{
public uint dwTotalSize;
public uint dwNeededSize;
public uint dwUsedSize;
public uint dwNumLocations;
public uint dwLocationListSize;
public uint dwLocationListOffset;
public uint dwCurrentLocationID;
public uint dwNumCards;
public uint dwCardListSize;
public uint dwCardListOffset;
public uint dwCurrentPreferredCardID;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINETRANSLATECAPS
Public dwTotalSize As UInteger
Public dwNeededSize As UInteger
Public dwUsedSize As UInteger
Public dwNumLocations As UInteger
Public dwLocationListSize As UInteger
Public dwLocationListOffset As UInteger
Public dwCurrentLocationID As UInteger
Public dwNumCards As UInteger
Public dwCardListSize As UInteger
Public dwCardListOffset As UInteger
Public dwCurrentPreferredCardID As UInteger
End Structureimport ctypes
from ctypes import wintypes
class LINETRANSLATECAPS(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwTotalSize", wintypes.DWORD),
("dwNeededSize", wintypes.DWORD),
("dwUsedSize", wintypes.DWORD),
("dwNumLocations", wintypes.DWORD),
("dwLocationListSize", wintypes.DWORD),
("dwLocationListOffset", wintypes.DWORD),
("dwCurrentLocationID", wintypes.DWORD),
("dwNumCards", wintypes.DWORD),
("dwCardListSize", wintypes.DWORD),
("dwCardListOffset", wintypes.DWORD),
("dwCurrentPreferredCardID", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct LINETRANSLATECAPS {
pub dwTotalSize: u32,
pub dwNeededSize: u32,
pub dwUsedSize: u32,
pub dwNumLocations: u32,
pub dwLocationListSize: u32,
pub dwLocationListOffset: u32,
pub dwCurrentLocationID: u32,
pub dwNumCards: u32,
pub dwCardListSize: u32,
pub dwCardListOffset: u32,
pub dwCurrentPreferredCardID: u32,
}import "golang.org/x/sys/windows"
type LINETRANSLATECAPS struct {
dwTotalSize uint32
dwNeededSize uint32
dwUsedSize uint32
dwNumLocations uint32
dwLocationListSize uint32
dwLocationListOffset uint32
dwCurrentLocationID uint32
dwNumCards uint32
dwCardListSize uint32
dwCardListOffset uint32
dwCurrentPreferredCardID uint32
}type
LINETRANSLATECAPS = packed record
dwTotalSize: DWORD;
dwNeededSize: DWORD;
dwUsedSize: DWORD;
dwNumLocations: DWORD;
dwLocationListSize: DWORD;
dwLocationListOffset: DWORD;
dwCurrentLocationID: DWORD;
dwNumCards: DWORD;
dwCardListSize: DWORD;
dwCardListOffset: DWORD;
dwCurrentPreferredCardID: DWORD;
end;const LINETRANSLATECAPS = extern struct {
dwTotalSize: u32,
dwNeededSize: u32,
dwUsedSize: u32,
dwNumLocations: u32,
dwLocationListSize: u32,
dwLocationListOffset: u32,
dwCurrentLocationID: u32,
dwNumCards: u32,
dwCardListSize: u32,
dwCardListOffset: u32,
dwCurrentPreferredCardID: u32,
};type
LINETRANSLATECAPS {.packed.} = object
dwTotalSize: uint32
dwNeededSize: uint32
dwUsedSize: uint32
dwNumLocations: uint32
dwLocationListSize: uint32
dwLocationListOffset: uint32
dwCurrentLocationID: uint32
dwNumCards: uint32
dwCardListSize: uint32
dwCardListOffset: uint32
dwCurrentPreferredCardID: uint32align(1)
struct LINETRANSLATECAPS
{
uint dwTotalSize;
uint dwNeededSize;
uint dwUsedSize;
uint dwNumLocations;
uint dwLocationListSize;
uint dwLocationListOffset;
uint dwCurrentLocationID;
uint dwNumCards;
uint dwCardListSize;
uint dwCardListOffset;
uint dwCurrentPreferredCardID;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINETRANSLATECAPS サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; dwTotalSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwNeededSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwUsedSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwNumLocations : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwLocationListSize : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwLocationListOffset : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwCurrentLocationID : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwNumCards : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwCardListSize : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwCardListOffset : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwCurrentPreferredCardID : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINETRANSLATECAPS, pack=1
#field int dwTotalSize
#field int dwNeededSize
#field int dwUsedSize
#field int dwNumLocations
#field int dwLocationListSize
#field int dwLocationListOffset
#field int dwCurrentLocationID
#field int dwNumCards
#field int dwCardListSize
#field int dwCardListOffset
#field int dwCurrentPreferredCardID
#endstruct
stdim st, LINETRANSLATECAPS ; NSTRUCT 変数を確保
st->dwTotalSize = 100
mes "dwTotalSize=" + st->dwTotalSize