Win32 API 日本語リファレンス
ホームDevices.Geolocation › GNSS_PLATFORM_CAPABILITY

GNSS_PLATFORM_CAPABILITY

構造体
サイズx64: 532 バイト / x86: 532 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
SizeDWORD4+0+0この構造体のサイズをバイト単位で示すDWORD。
VersionDWORD4+4+4構造体のバージョンを示すDWORD。
SupportAgnssInjectionBOOL4+8+8プラットフォームがA-GNSS注入をサポートするかを示すBOOL。
AgnssFormatSupportedDWORD4+12+12サポートするA-GNSSデータ形式を示すDWORD。
UnusedBYTE516+16+16未使用の予約バイト配列。

各言語での定義

#include <windows.h>

// GNSS_PLATFORM_CAPABILITY  (x64 532 / x86 532 バイト)
typedef struct GNSS_PLATFORM_CAPABILITY {
    DWORD Size;
    DWORD Version;
    BOOL SupportAgnssInjection;
    DWORD AgnssFormatSupported;
    BYTE Unused[516];
} GNSS_PLATFORM_CAPABILITY;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GNSS_PLATFORM_CAPABILITY
{
    public uint Size;
    public uint Version;
    [MarshalAs(UnmanagedType.Bool)] public bool SupportAgnssInjection;
    public uint AgnssFormatSupported;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 516)] public byte[] Unused;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure GNSS_PLATFORM_CAPABILITY
    Public Size As UInteger
    Public Version As UInteger
    <MarshalAs(UnmanagedType.Bool)> Public SupportAgnssInjection As Boolean
    Public AgnssFormatSupported As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=516)> Public Unused() As Byte
End Structure
import ctypes
from ctypes import wintypes

class GNSS_PLATFORM_CAPABILITY(ctypes.Structure):
    _fields_ = [
        ("Size", wintypes.DWORD),
        ("Version", wintypes.DWORD),
        ("SupportAgnssInjection", wintypes.BOOL),
        ("AgnssFormatSupported", wintypes.DWORD),
        ("Unused", ctypes.c_ubyte * 516),
    ]
#[repr(C)]
pub struct GNSS_PLATFORM_CAPABILITY {
    pub Size: u32,
    pub Version: u32,
    pub SupportAgnssInjection: i32,
    pub AgnssFormatSupported: u32,
    pub Unused: [u8; 516],
}
import "golang.org/x/sys/windows"

type GNSS_PLATFORM_CAPABILITY struct {
	Size uint32
	Version uint32
	SupportAgnssInjection int32
	AgnssFormatSupported uint32
	Unused [516]byte
}
type
  GNSS_PLATFORM_CAPABILITY = record
    Size: DWORD;
    Version: DWORD;
    SupportAgnssInjection: BOOL;
    AgnssFormatSupported: DWORD;
    Unused: array[0..515] of Byte;
  end;
const GNSS_PLATFORM_CAPABILITY = extern struct {
    Size: u32,
    Version: u32,
    SupportAgnssInjection: i32,
    AgnssFormatSupported: u32,
    Unused: [516]u8,
};
type
  GNSS_PLATFORM_CAPABILITY {.bycopy.} = object
    Size: uint32
    Version: uint32
    SupportAgnssInjection: int32
    AgnssFormatSupported: uint32
    Unused: array[516, uint8]
struct GNSS_PLATFORM_CAPABILITY
{
    uint Size;
    uint Version;
    int SupportAgnssInjection;
    uint AgnssFormatSupported;
    ubyte[516] Unused;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; GNSS_PLATFORM_CAPABILITY サイズ: 532 バイト(x64)
dim st, 133    ; 4byte整数×133(構造体サイズ 532 / 4 切り上げ)
; Size : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Version : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; SupportAgnssInjection : BOOL (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; AgnssFormatSupported : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Unused : BYTE (+16, 516byte)  varptr(st)+16 を基点に操作(516byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global GNSS_PLATFORM_CAPABILITY
    #field int Size
    #field int Version
    #field bool SupportAgnssInjection
    #field int AgnssFormatSupported
    #field byte Unused 516
#endstruct

stdim st, GNSS_PLATFORM_CAPABILITY        ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size