ホーム › Devices.WebServicesOnDevices › WSD_METADATA_SECTION
WSD_METADATA_SECTION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Dialect | LPWSTR | 8/4 | +0 | +0 | メタデータセクションの方言(種別)を示すURI。 |
| Identifier | LPWSTR | 8/4 | +8 | +4 | メタデータセクションの識別子URI。 |
| Data | void* | 8/4 | +16 | +8 | メタデータの内容データへのポインタ。 |
| MetadataReference | WSD_ENDPOINT_REFERENCE* | 8/4 | +24 | +12 | 外部メタデータへの参照エンドポイント。 |
| Location | LPWSTR | 8/4 | +32 | +16 | メタデータの所在URL。 |
| Any | WSDXML_ELEMENT* | 8/4 | +40 | +20 | 拡張用の任意XML要素へのポインタ。 |
各言語での定義
#include <windows.h>
// WSD_METADATA_SECTION (x64 48 / x86 24 バイト)
typedef struct WSD_METADATA_SECTION {
LPWSTR Dialect;
LPWSTR Identifier;
void* Data;
WSD_ENDPOINT_REFERENCE* MetadataReference;
LPWSTR Location;
WSDXML_ELEMENT* Any;
} WSD_METADATA_SECTION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WSD_METADATA_SECTION
{
public IntPtr Dialect;
public IntPtr Identifier;
public IntPtr Data;
public IntPtr MetadataReference;
public IntPtr Location;
public IntPtr Any;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WSD_METADATA_SECTION
Public Dialect As IntPtr
Public Identifier As IntPtr
Public Data As IntPtr
Public MetadataReference As IntPtr
Public Location As IntPtr
Public Any As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class WSD_METADATA_SECTION(ctypes.Structure):
_fields_ = [
("Dialect", ctypes.c_void_p),
("Identifier", ctypes.c_void_p),
("Data", ctypes.c_void_p),
("MetadataReference", ctypes.c_void_p),
("Location", ctypes.c_void_p),
("Any", ctypes.c_void_p),
]#[repr(C)]
pub struct WSD_METADATA_SECTION {
pub Dialect: *mut core::ffi::c_void,
pub Identifier: *mut core::ffi::c_void,
pub Data: *mut core::ffi::c_void,
pub MetadataReference: *mut core::ffi::c_void,
pub Location: *mut core::ffi::c_void,
pub Any: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type WSD_METADATA_SECTION struct {
Dialect uintptr
Identifier uintptr
Data uintptr
MetadataReference uintptr
Location uintptr
Any uintptr
}type
WSD_METADATA_SECTION = record
Dialect: Pointer;
Identifier: Pointer;
Data: Pointer;
MetadataReference: Pointer;
Location: Pointer;
Any: Pointer;
end;const WSD_METADATA_SECTION = extern struct {
Dialect: ?*anyopaque,
Identifier: ?*anyopaque,
Data: ?*anyopaque,
MetadataReference: ?*anyopaque,
Location: ?*anyopaque,
Any: ?*anyopaque,
};type
WSD_METADATA_SECTION {.bycopy.} = object
Dialect: pointer
Identifier: pointer
Data: pointer
MetadataReference: pointer
Location: pointer
Any: pointerstruct WSD_METADATA_SECTION
{
void* Dialect;
void* Identifier;
void* Data;
void* MetadataReference;
void* Location;
void* Any;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WSD_METADATA_SECTION サイズ: 24 バイト(x86)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Dialect : LPWSTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Identifier : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Data : void* (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MetadataReference : WSD_ENDPOINT_REFERENCE* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; Location : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Any : WSDXML_ELEMENT* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WSD_METADATA_SECTION サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; Dialect : LPWSTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; Identifier : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; Data : void* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; MetadataReference : WSD_ENDPOINT_REFERENCE* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; Location : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Any : WSDXML_ELEMENT* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WSD_METADATA_SECTION
#field intptr Dialect
#field intptr Identifier
#field intptr Data
#field intptr MetadataReference
#field intptr Location
#field intptr Any
#endstruct
stdim st, WSD_METADATA_SECTION ; NSTRUCT 変数を確保