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

GNSS_AGNSS_INJECTBLOB

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

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

フィールド

フィールドサイズx64x86説明
SizeDWORD4+0+0この構造体のバイトサイズ。
VersionDWORD4+4+4構造体のバージョン番号。
BlobOuiDWORD4+8+8BLOB提供元を識別するOUI(組織固有識別子)。
BlobVersionDWORD4+12+12BLOBデータのバージョン番号。
AgnssFormatDWORD4+16+16AGNSSデータの形式を示す識別値。
BlobSizeDWORD4+20+20BlobDataの有効バイトサイズ。
BlobDataBYTE1+24+24注入するAGNSS支援データ本体の可変長バイト配列。

各言語での定義

#include <windows.h>

// GNSS_AGNSS_INJECTBLOB  (x64 28 / x86 28 バイト)
typedef struct GNSS_AGNSS_INJECTBLOB {
    DWORD Size;
    DWORD Version;
    DWORD BlobOui;
    DWORD BlobVersion;
    DWORD AgnssFormat;
    DWORD BlobSize;
    BYTE BlobData[1];
} GNSS_AGNSS_INJECTBLOB;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GNSS_AGNSS_INJECTBLOB
{
    public uint Size;
    public uint Version;
    public uint BlobOui;
    public uint BlobVersion;
    public uint AgnssFormat;
    public uint BlobSize;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] BlobData;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure GNSS_AGNSS_INJECTBLOB
    Public Size As UInteger
    Public Version As UInteger
    Public BlobOui As UInteger
    Public BlobVersion As UInteger
    Public AgnssFormat As UInteger
    Public BlobSize As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public BlobData() As Byte
End Structure
import ctypes
from ctypes import wintypes

class GNSS_AGNSS_INJECTBLOB(ctypes.Structure):
    _fields_ = [
        ("Size", wintypes.DWORD),
        ("Version", wintypes.DWORD),
        ("BlobOui", wintypes.DWORD),
        ("BlobVersion", wintypes.DWORD),
        ("AgnssFormat", wintypes.DWORD),
        ("BlobSize", wintypes.DWORD),
        ("BlobData", ctypes.c_ubyte * 1),
    ]
#[repr(C)]
pub struct GNSS_AGNSS_INJECTBLOB {
    pub Size: u32,
    pub Version: u32,
    pub BlobOui: u32,
    pub BlobVersion: u32,
    pub AgnssFormat: u32,
    pub BlobSize: u32,
    pub BlobData: [u8; 1],
}
import "golang.org/x/sys/windows"

type GNSS_AGNSS_INJECTBLOB struct {
	Size uint32
	Version uint32
	BlobOui uint32
	BlobVersion uint32
	AgnssFormat uint32
	BlobSize uint32
	BlobData [1]byte
}
type
  GNSS_AGNSS_INJECTBLOB = record
    Size: DWORD;
    Version: DWORD;
    BlobOui: DWORD;
    BlobVersion: DWORD;
    AgnssFormat: DWORD;
    BlobSize: DWORD;
    BlobData: array[0..0] of Byte;
  end;
const GNSS_AGNSS_INJECTBLOB = extern struct {
    Size: u32,
    Version: u32,
    BlobOui: u32,
    BlobVersion: u32,
    AgnssFormat: u32,
    BlobSize: u32,
    BlobData: [1]u8,
};
type
  GNSS_AGNSS_INJECTBLOB {.bycopy.} = object
    Size: uint32
    Version: uint32
    BlobOui: uint32
    BlobVersion: uint32
    AgnssFormat: uint32
    BlobSize: uint32
    BlobData: array[1, uint8]
struct GNSS_AGNSS_INJECTBLOB
{
    uint Size;
    uint Version;
    uint BlobOui;
    uint BlobVersion;
    uint AgnssFormat;
    uint BlobSize;
    ubyte[1] BlobData;
}

HSP用 定義

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

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

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