ホーム › Media.DirectShow › EALocationCodeType
EALocationCodeType
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| LocationCodeScheme | LocationCodeSchemeType | 4 | +0 | +0 | この構造体の他のメンバーを解釈する際に使用する規格を識別します。現在、この値は SCTE_18 でなければなりません。これは SCTE 18「Emergency Alert Message for Cable」を意味します。 |
| state_code | BYTE | 1 | +4 | +4 | state_code フィールドを格納します。 |
| county_subdivision | BYTE | 1 | +5 | +5 | county_subdivision フィールドを格納します。 |
| county_code | WORD | 2 | +6 | +6 | county_code フィールドを格納します。 |
公式ドキュメント
EALocationCodeType 構造体は、ANSI/SCTE 28 で定義されている緊急警報 (EA) のロケーションコードを定義します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// EALocationCodeType (x64 8 / x86 8 バイト)
typedef struct EALocationCodeType {
LocationCodeSchemeType LocationCodeScheme;
BYTE state_code;
BYTE county_subdivision;
WORD county_code;
} EALocationCodeType;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct EALocationCodeType
{
public int LocationCodeScheme;
public byte state_code;
public byte county_subdivision;
public ushort county_code;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure EALocationCodeType
Public LocationCodeScheme As Integer
Public state_code As Byte
Public county_subdivision As Byte
Public county_code As UShort
End Structureimport ctypes
from ctypes import wintypes
class EALocationCodeType(ctypes.Structure):
_fields_ = [
("LocationCodeScheme", ctypes.c_int),
("state_code", ctypes.c_ubyte),
("county_subdivision", ctypes.c_ubyte),
("county_code", ctypes.c_ushort),
]#[repr(C)]
pub struct EALocationCodeType {
pub LocationCodeScheme: i32,
pub state_code: u8,
pub county_subdivision: u8,
pub county_code: u16,
}import "golang.org/x/sys/windows"
type EALocationCodeType struct {
LocationCodeScheme int32
state_code byte
county_subdivision byte
county_code uint16
}type
EALocationCodeType = record
LocationCodeScheme: Integer;
state_code: Byte;
county_subdivision: Byte;
county_code: Word;
end;const EALocationCodeType = extern struct {
LocationCodeScheme: i32,
state_code: u8,
county_subdivision: u8,
county_code: u16,
};type
EALocationCodeType {.bycopy.} = object
LocationCodeScheme: int32
state_code: uint8
county_subdivision: uint8
county_code: uint16struct EALocationCodeType
{
int LocationCodeScheme;
ubyte state_code;
ubyte county_subdivision;
ushort county_code;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; EALocationCodeType サイズ: 8 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 8 / 4 切り上げ)
; LocationCodeScheme : LocationCodeSchemeType (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; state_code : BYTE (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; county_subdivision : BYTE (+5, 1byte) poke st,5,値 / 値 = peek(st,5)
; county_code : WORD (+6, 2byte) wpoke st,6,値 / 値 = wpeek(st,6)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global EALocationCodeType
#field int LocationCodeScheme
#field byte state_code
#field byte county_subdivision
#field short county_code
#endstruct
stdim st, EALocationCodeType ; NSTRUCT 変数を確保
st->LocationCodeScheme = 100
mes "LocationCodeScheme=" + st->LocationCodeScheme