ホーム › System.Rpc › NDR64_EXPR_OPERATOR
NDR64_EXPR_OPERATOR
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ExprType | BYTE | 1 | +0 | +0 | 式ノードの種類を示すコード(演算子ノード)。 |
| Operator | BYTE | 1 | +1 | +1 | 適用する演算子の種類を示すコード。 |
| CastType | BYTE | 1 | +2 | +2 | オペランドへ適用するキャスト先の型コード。 |
| Reserved | BYTE | 1 | +3 | +3 | 予約フィールド(BYTE)。将来の拡張用。 |
各言語での定義
#include <windows.h>
// NDR64_EXPR_OPERATOR (x64 4 / x86 4 バイト)
typedef struct NDR64_EXPR_OPERATOR {
BYTE ExprType;
BYTE Operator;
BYTE CastType;
BYTE Reserved;
} NDR64_EXPR_OPERATOR;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDR64_EXPR_OPERATOR
{
public byte ExprType;
public byte Operator;
public byte CastType;
public byte Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDR64_EXPR_OPERATOR
Public ExprType As Byte
Public Operator As Byte
Public CastType As Byte
Public Reserved As Byte
End Structureimport ctypes
from ctypes import wintypes
class NDR64_EXPR_OPERATOR(ctypes.Structure):
_fields_ = [
("ExprType", ctypes.c_ubyte),
("Operator", ctypes.c_ubyte),
("CastType", ctypes.c_ubyte),
("Reserved", ctypes.c_ubyte),
]#[repr(C)]
pub struct NDR64_EXPR_OPERATOR {
pub ExprType: u8,
pub Operator: u8,
pub CastType: u8,
pub Reserved: u8,
}import "golang.org/x/sys/windows"
type NDR64_EXPR_OPERATOR struct {
ExprType byte
Operator byte
CastType byte
Reserved byte
}type
NDR64_EXPR_OPERATOR = record
ExprType: Byte;
Operator: Byte;
CastType: Byte;
Reserved: Byte;
end;const NDR64_EXPR_OPERATOR = extern struct {
ExprType: u8,
Operator: u8,
CastType: u8,
Reserved: u8,
};type
NDR64_EXPR_OPERATOR {.bycopy.} = object
ExprType: uint8
Operator: uint8
CastType: uint8
Reserved: uint8struct NDR64_EXPR_OPERATOR
{
ubyte ExprType;
ubyte Operator;
ubyte CastType;
ubyte Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NDR64_EXPR_OPERATOR サイズ: 4 バイト(x64)
dim st, 1 ; 4byte整数×1(構造体サイズ 4 / 4 切り上げ)
; ExprType : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; Operator : BYTE (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; CastType : BYTE (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; Reserved : BYTE (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NDR64_EXPR_OPERATOR
#field byte ExprType
#field byte Operator
#field byte CastType
#field byte Reserved
#endstruct
stdim st, NDR64_EXPR_OPERATOR ; NSTRUCT 変数を確保
st->ExprType = 100
mes "ExprType=" + st->ExprType