ホーム › Networking.WindowsWebServices › WS_METADATA_ENDPOINT
WS_METADATA_ENDPOINT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| endpointAddress | WS_ENDPOINT_ADDRESS | 40/20 | +0 | +0 | エンドポイントのアドレスです。 |
| endpointPolicy | WS_POLICY* | 8/4 | +40 | +20 | エンドポイントのポリシーを表す不透明なハンドルです。 このハンドルは、メタデータオブジェクトが解放またはリセットされるまで有効です。 |
| portName | WS_XML_STRING* | 8/4 | +48 | +24 | エンドポイントの WSDL ポート名です (利用可能な場合)。 |
| serviceName | WS_XML_STRING* | 8/4 | +56 | +28 | エンドポイントの WSDL サービス名です (利用可能な場合)。 |
| serviceNs | WS_XML_STRING* | 8/4 | +64 | +32 | エンドポイントの WSDL サービス名前空間です (利用可能な場合)。 |
| bindingName | WS_XML_STRING* | 8/4 | +72 | +36 | エンドポイントの WSDL バインディング名です (利用可能な場合)。 |
| bindingNs | WS_XML_STRING* | 8/4 | +80 | +40 | エンドポイントの WSDL バインディング名前空間です (利用可能な場合)。 |
| portTypeName | WS_XML_STRING* | 8/4 | +88 | +44 | エンドポイントの WSDL portType 名です (利用可能な場合)。 |
| portTypeNs | WS_XML_STRING* | 8/4 | +96 | +48 | エンドポイントの WSDL portType 名前空間です (利用可能な場合)。 |
公式ドキュメント
メタデータドキュメントから読み取られた 単一のエンドポイントに関する情報です。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// WS_STRING (x64 16 / x86 8 バイト)
typedef struct WS_STRING {
DWORD length;
LPWSTR chars;
} WS_STRING;
// WS_ENDPOINT_ADDRESS (x64 40 / x86 20 バイト)
typedef struct WS_ENDPOINT_ADDRESS {
WS_STRING url;
WS_XML_BUFFER* headers;
WS_XML_BUFFER* extensions;
WS_ENDPOINT_IDENTITY* identity;
} WS_ENDPOINT_ADDRESS;
// WS_METADATA_ENDPOINT (x64 104 / x86 52 バイト)
typedef struct WS_METADATA_ENDPOINT {
WS_ENDPOINT_ADDRESS endpointAddress;
WS_POLICY* endpointPolicy;
WS_XML_STRING* portName;
WS_XML_STRING* serviceName;
WS_XML_STRING* serviceNs;
WS_XML_STRING* bindingName;
WS_XML_STRING* bindingNs;
WS_XML_STRING* portTypeName;
WS_XML_STRING* portTypeNs;
} WS_METADATA_ENDPOINT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WS_STRING
{
public uint length;
public IntPtr chars;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WS_ENDPOINT_ADDRESS
{
public WS_STRING url;
public IntPtr headers;
public IntPtr extensions;
public IntPtr identity;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WS_METADATA_ENDPOINT
{
public WS_ENDPOINT_ADDRESS endpointAddress;
public IntPtr endpointPolicy;
public IntPtr portName;
public IntPtr serviceName;
public IntPtr serviceNs;
public IntPtr bindingName;
public IntPtr bindingNs;
public IntPtr portTypeName;
public IntPtr portTypeNs;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WS_STRING
Public length As UInteger
Public chars As IntPtr
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WS_ENDPOINT_ADDRESS
Public url As WS_STRING
Public headers As IntPtr
Public extensions As IntPtr
Public identity As IntPtr
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WS_METADATA_ENDPOINT
Public endpointAddress As WS_ENDPOINT_ADDRESS
Public endpointPolicy As IntPtr
Public portName As IntPtr
Public serviceName As IntPtr
Public serviceNs As IntPtr
Public bindingName As IntPtr
Public bindingNs As IntPtr
Public portTypeName As IntPtr
Public portTypeNs As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class WS_STRING(ctypes.Structure):
_fields_ = [
("length", wintypes.DWORD),
("chars", ctypes.c_void_p),
]
class WS_ENDPOINT_ADDRESS(ctypes.Structure):
_fields_ = [
("url", WS_STRING),
("headers", ctypes.c_void_p),
("extensions", ctypes.c_void_p),
("identity", ctypes.c_void_p),
]
class WS_METADATA_ENDPOINT(ctypes.Structure):
_fields_ = [
("endpointAddress", WS_ENDPOINT_ADDRESS),
("endpointPolicy", ctypes.c_void_p),
("portName", ctypes.c_void_p),
("serviceName", ctypes.c_void_p),
("serviceNs", ctypes.c_void_p),
("bindingName", ctypes.c_void_p),
("bindingNs", ctypes.c_void_p),
("portTypeName", ctypes.c_void_p),
("portTypeNs", ctypes.c_void_p),
]#[repr(C)]
pub struct WS_STRING {
pub length: u32,
pub chars: *mut core::ffi::c_void,
}
#[repr(C)]
pub struct WS_ENDPOINT_ADDRESS {
pub url: WS_STRING,
pub headers: *mut core::ffi::c_void,
pub extensions: *mut core::ffi::c_void,
pub identity: *mut core::ffi::c_void,
}
#[repr(C)]
pub struct WS_METADATA_ENDPOINT {
pub endpointAddress: WS_ENDPOINT_ADDRESS,
pub endpointPolicy: *mut core::ffi::c_void,
pub portName: *mut core::ffi::c_void,
pub serviceName: *mut core::ffi::c_void,
pub serviceNs: *mut core::ffi::c_void,
pub bindingName: *mut core::ffi::c_void,
pub bindingNs: *mut core::ffi::c_void,
pub portTypeName: *mut core::ffi::c_void,
pub portTypeNs: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type WS_STRING struct {
length uint32
chars uintptr
}
type WS_ENDPOINT_ADDRESS struct {
url WS_STRING
headers uintptr
extensions uintptr
identity uintptr
}
type WS_METADATA_ENDPOINT struct {
endpointAddress WS_ENDPOINT_ADDRESS
endpointPolicy uintptr
portName uintptr
serviceName uintptr
serviceNs uintptr
bindingName uintptr
bindingNs uintptr
portTypeName uintptr
portTypeNs uintptr
}type
WS_STRING = record
length: DWORD;
chars: Pointer;
end;
WS_ENDPOINT_ADDRESS = record
url: WS_STRING;
headers: Pointer;
extensions: Pointer;
identity: Pointer;
end;
WS_METADATA_ENDPOINT = record
endpointAddress: WS_ENDPOINT_ADDRESS;
endpointPolicy: Pointer;
portName: Pointer;
serviceName: Pointer;
serviceNs: Pointer;
bindingName: Pointer;
bindingNs: Pointer;
portTypeName: Pointer;
portTypeNs: Pointer;
end;const WS_STRING = extern struct {
length: u32,
chars: ?*anyopaque,
};
const WS_ENDPOINT_ADDRESS = extern struct {
url: WS_STRING,
headers: ?*anyopaque,
extensions: ?*anyopaque,
identity: ?*anyopaque,
};
const WS_METADATA_ENDPOINT = extern struct {
endpointAddress: WS_ENDPOINT_ADDRESS,
endpointPolicy: ?*anyopaque,
portName: ?*anyopaque,
serviceName: ?*anyopaque,
serviceNs: ?*anyopaque,
bindingName: ?*anyopaque,
bindingNs: ?*anyopaque,
portTypeName: ?*anyopaque,
portTypeNs: ?*anyopaque,
};type
WS_STRING {.bycopy.} = object
length: uint32
chars: pointer
WS_ENDPOINT_ADDRESS {.bycopy.} = object
url: WS_STRING
headers: pointer
extensions: pointer
identity: pointer
WS_METADATA_ENDPOINT {.bycopy.} = object
endpointAddress: WS_ENDPOINT_ADDRESS
endpointPolicy: pointer
portName: pointer
serviceName: pointer
serviceNs: pointer
bindingName: pointer
bindingNs: pointer
portTypeName: pointer
portTypeNs: pointerstruct WS_STRING
{
uint length;
void* chars;
}
struct WS_ENDPOINT_ADDRESS
{
WS_STRING url;
void* headers;
void* extensions;
void* identity;
}
struct WS_METADATA_ENDPOINT
{
WS_ENDPOINT_ADDRESS endpointAddress;
void* endpointPolicy;
void* portName;
void* serviceName;
void* serviceNs;
void* bindingName;
void* bindingNs;
void* portTypeName;
void* portTypeNs;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WS_METADATA_ENDPOINT サイズ: 52 バイト(x86)
dim st, 13 ; 4byte整数×13(構造体サイズ 52 / 4 切り上げ)
; endpointAddress : WS_ENDPOINT_ADDRESS (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; endpointPolicy : WS_POLICY* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; portName : WS_XML_STRING* (+24, 4byte) varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; serviceName : WS_XML_STRING* (+28, 4byte) varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; serviceNs : WS_XML_STRING* (+32, 4byte) varptr(st)+32 を基点に操作(4byte:入れ子/配列)
; bindingName : WS_XML_STRING* (+36, 4byte) varptr(st)+36 を基点に操作(4byte:入れ子/配列)
; bindingNs : WS_XML_STRING* (+40, 4byte) varptr(st)+40 を基点に操作(4byte:入れ子/配列)
; portTypeName : WS_XML_STRING* (+44, 4byte) varptr(st)+44 を基点に操作(4byte:入れ子/配列)
; portTypeNs : WS_XML_STRING* (+48, 4byte) varptr(st)+48 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WS_METADATA_ENDPOINT サイズ: 104 バイト(x64)
dim st, 26 ; 4byte整数×26(構造体サイズ 104 / 4 切り上げ)
; endpointAddress : WS_ENDPOINT_ADDRESS (+0, 40byte) varptr(st)+0 を基点に操作(40byte:入れ子/配列)
; endpointPolicy : WS_POLICY* (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; portName : WS_XML_STRING* (+48, 8byte) varptr(st)+48 を基点に操作(8byte:入れ子/配列)
; serviceName : WS_XML_STRING* (+56, 8byte) varptr(st)+56 を基点に操作(8byte:入れ子/配列)
; serviceNs : WS_XML_STRING* (+64, 8byte) varptr(st)+64 を基点に操作(8byte:入れ子/配列)
; bindingName : WS_XML_STRING* (+72, 8byte) varptr(st)+72 を基点に操作(8byte:入れ子/配列)
; bindingNs : WS_XML_STRING* (+80, 8byte) varptr(st)+80 を基点に操作(8byte:入れ子/配列)
; portTypeName : WS_XML_STRING* (+88, 8byte) varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; portTypeNs : WS_XML_STRING* (+96, 8byte) varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WS_STRING
#field int length
#field intptr chars
#endstruct
#defstruct global WS_ENDPOINT_ADDRESS
#field WS_STRING url
#field intptr headers
#field intptr extensions
#field intptr identity
#endstruct
#defstruct global WS_METADATA_ENDPOINT
#field WS_ENDPOINT_ADDRESS endpointAddress
#field intptr endpointPolicy
#field intptr portName
#field intptr serviceName
#field intptr serviceNs
#field intptr bindingName
#field intptr bindingNs
#field intptr portTypeName
#field intptr portTypeNs
#endstruct
stdim st, WS_METADATA_ENDPOINT ; NSTRUCT 変数を確保