Win32 API 日本語リファレンス
ホームNetworking.WindowsWebServices › WS_OPERATION_DESCRIPTION

WS_OPERATION_DESCRIPTION

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

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

フィールド

フィールドサイズx64x86説明
versionInfoDWORD4+0+0操作のバージョン情報を表す値。
inputMessageDescriptionWS_MESSAGE_DESCRIPTION*8/4+8+4入力メッセージの記述へのポインタ。NULL可。
outputMessageDescriptionWS_MESSAGE_DESCRIPTION*8/4+16+8出力メッセージの記述へのポインタ。NULL可。
inputMessageOptionsDWORD4+24+12入力メッセージの処理を制御するフラグの組み合わせ。
outputMessageOptionsDWORD4+28+16出力メッセージの処理を制御するフラグの組み合わせ。
parameterCountWORD2+32+20parameterDescription配列の要素数。
parameterDescriptionWS_PARAMETER_DESCRIPTION*8/4+40+24操作のパラメータ記述配列へのポインタ。
stubCallbackWS_SERVICE_STUB_CALLBACK8/4+48+28サーバー側でこの操作を処理するスタブコールバック関数。
styleWS_OPERATION_STYLE4+56+32操作のスタイル(document/RPC等)を示す列挙値。

各言語での定義

#include <windows.h>

// WS_OPERATION_DESCRIPTION  (x64 64 / x86 36 バイト)
typedef struct WS_OPERATION_DESCRIPTION {
    DWORD versionInfo;
    WS_MESSAGE_DESCRIPTION* inputMessageDescription;
    WS_MESSAGE_DESCRIPTION* outputMessageDescription;
    DWORD inputMessageOptions;
    DWORD outputMessageOptions;
    WORD parameterCount;
    WS_PARAMETER_DESCRIPTION* parameterDescription;
    WS_SERVICE_STUB_CALLBACK stubCallback;
    WS_OPERATION_STYLE style;
} WS_OPERATION_DESCRIPTION;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WS_OPERATION_DESCRIPTION
{
    public uint versionInfo;
    public IntPtr inputMessageDescription;
    public IntPtr outputMessageDescription;
    public uint inputMessageOptions;
    public uint outputMessageOptions;
    public ushort parameterCount;
    public IntPtr parameterDescription;
    public IntPtr stubCallback;
    public int style;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WS_OPERATION_DESCRIPTION
    Public versionInfo As UInteger
    Public inputMessageDescription As IntPtr
    Public outputMessageDescription As IntPtr
    Public inputMessageOptions As UInteger
    Public outputMessageOptions As UInteger
    Public parameterCount As UShort
    Public parameterDescription As IntPtr
    Public stubCallback As IntPtr
    Public style As Integer
End Structure
import ctypes
from ctypes import wintypes

class WS_OPERATION_DESCRIPTION(ctypes.Structure):
    _fields_ = [
        ("versionInfo", wintypes.DWORD),
        ("inputMessageDescription", ctypes.c_void_p),
        ("outputMessageDescription", ctypes.c_void_p),
        ("inputMessageOptions", wintypes.DWORD),
        ("outputMessageOptions", wintypes.DWORD),
        ("parameterCount", ctypes.c_ushort),
        ("parameterDescription", ctypes.c_void_p),
        ("stubCallback", ctypes.c_void_p),
        ("style", ctypes.c_int),
    ]
#[repr(C)]
pub struct WS_OPERATION_DESCRIPTION {
    pub versionInfo: u32,
    pub inputMessageDescription: *mut core::ffi::c_void,
    pub outputMessageDescription: *mut core::ffi::c_void,
    pub inputMessageOptions: u32,
    pub outputMessageOptions: u32,
    pub parameterCount: u16,
    pub parameterDescription: *mut core::ffi::c_void,
    pub stubCallback: *mut core::ffi::c_void,
    pub style: i32,
}
import "golang.org/x/sys/windows"

type WS_OPERATION_DESCRIPTION struct {
	versionInfo uint32
	inputMessageDescription uintptr
	outputMessageDescription uintptr
	inputMessageOptions uint32
	outputMessageOptions uint32
	parameterCount uint16
	parameterDescription uintptr
	stubCallback uintptr
	style int32
}
type
  WS_OPERATION_DESCRIPTION = record
    versionInfo: DWORD;
    inputMessageDescription: Pointer;
    outputMessageDescription: Pointer;
    inputMessageOptions: DWORD;
    outputMessageOptions: DWORD;
    parameterCount: Word;
    parameterDescription: Pointer;
    stubCallback: Pointer;
    style: Integer;
  end;
const WS_OPERATION_DESCRIPTION = extern struct {
    versionInfo: u32,
    inputMessageDescription: ?*anyopaque,
    outputMessageDescription: ?*anyopaque,
    inputMessageOptions: u32,
    outputMessageOptions: u32,
    parameterCount: u16,
    parameterDescription: ?*anyopaque,
    stubCallback: ?*anyopaque,
    style: i32,
};
type
  WS_OPERATION_DESCRIPTION {.bycopy.} = object
    versionInfo: uint32
    inputMessageDescription: pointer
    outputMessageDescription: pointer
    inputMessageOptions: uint32
    outputMessageOptions: uint32
    parameterCount: uint16
    parameterDescription: pointer
    stubCallback: pointer
    style: int32
struct WS_OPERATION_DESCRIPTION
{
    uint versionInfo;
    void* inputMessageDescription;
    void* outputMessageDescription;
    uint inputMessageOptions;
    uint outputMessageOptions;
    ushort parameterCount;
    void* parameterDescription;
    void* stubCallback;
    int style;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; WS_OPERATION_DESCRIPTION サイズ: 36 バイト(x86)
dim st, 9    ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; versionInfo : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; inputMessageDescription : WS_MESSAGE_DESCRIPTION* (+4, 4byte)  varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; outputMessageDescription : WS_MESSAGE_DESCRIPTION* (+8, 4byte)  varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; inputMessageOptions : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; outputMessageOptions : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; parameterCount : WORD (+20, 2byte)  wpoke st,20,値  /  値 = wpeek(st,20)
; parameterDescription : WS_PARAMETER_DESCRIPTION* (+24, 4byte)  varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; stubCallback : WS_SERVICE_STUB_CALLBACK (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; style : WS_OPERATION_STYLE (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WS_OPERATION_DESCRIPTION サイズ: 64 バイト(x64)
dim st, 16    ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; versionInfo : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; inputMessageDescription : WS_MESSAGE_DESCRIPTION* (+8, 8byte)  varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; outputMessageDescription : WS_MESSAGE_DESCRIPTION* (+16, 8byte)  varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; inputMessageOptions : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; outputMessageOptions : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; parameterCount : WORD (+32, 2byte)  wpoke st,32,値  /  値 = wpeek(st,32)
; parameterDescription : WS_PARAMETER_DESCRIPTION* (+40, 8byte)  varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; stubCallback : WS_SERVICE_STUB_CALLBACK (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; style : WS_OPERATION_STYLE (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global WS_OPERATION_DESCRIPTION
    #field int versionInfo
    #field intptr inputMessageDescription
    #field intptr outputMessageDescription
    #field int inputMessageOptions
    #field int outputMessageOptions
    #field short parameterCount
    #field intptr parameterDescription
    #field intptr stubCallback
    #field int style
#endstruct

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