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