ホーム › NetworkManagement.QoS › RSVP_STATUS_INFO
RSVP_STATUS_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ObjectHdr | QOS_OBJECT_HDR | 8 | +0 | +0 | オブジェクト種別と長さを示すQOS_OBJECT_HDR。 |
| StatusCode | DWORD | 4 | +8 | +8 | RSVP状態を示すステータスコード。 |
| ExtendedStatus1 | DWORD | 4 | +12 | +12 | 拡張ステータス情報その1。 |
| ExtendedStatus2 | DWORD | 4 | +16 | +16 | 拡張ステータス情報その2。 |
各言語での定義
#include <windows.h>
// QOS_OBJECT_HDR (x64 8 / x86 8 バイト)
typedef struct QOS_OBJECT_HDR {
DWORD ObjectType;
DWORD ObjectLength;
} QOS_OBJECT_HDR;
// RSVP_STATUS_INFO (x64 20 / x86 20 バイト)
typedef struct RSVP_STATUS_INFO {
QOS_OBJECT_HDR ObjectHdr;
DWORD StatusCode;
DWORD ExtendedStatus1;
DWORD ExtendedStatus2;
} RSVP_STATUS_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct QOS_OBJECT_HDR
{
public uint ObjectType;
public uint ObjectLength;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RSVP_STATUS_INFO
{
public QOS_OBJECT_HDR ObjectHdr;
public uint StatusCode;
public uint ExtendedStatus1;
public uint ExtendedStatus2;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure QOS_OBJECT_HDR
Public ObjectType As UInteger
Public ObjectLength As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RSVP_STATUS_INFO
Public ObjectHdr As QOS_OBJECT_HDR
Public StatusCode As UInteger
Public ExtendedStatus1 As UInteger
Public ExtendedStatus2 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class QOS_OBJECT_HDR(ctypes.Structure):
_fields_ = [
("ObjectType", wintypes.DWORD),
("ObjectLength", wintypes.DWORD),
]
class RSVP_STATUS_INFO(ctypes.Structure):
_fields_ = [
("ObjectHdr", QOS_OBJECT_HDR),
("StatusCode", wintypes.DWORD),
("ExtendedStatus1", wintypes.DWORD),
("ExtendedStatus2", wintypes.DWORD),
]#[repr(C)]
pub struct QOS_OBJECT_HDR {
pub ObjectType: u32,
pub ObjectLength: u32,
}
#[repr(C)]
pub struct RSVP_STATUS_INFO {
pub ObjectHdr: QOS_OBJECT_HDR,
pub StatusCode: u32,
pub ExtendedStatus1: u32,
pub ExtendedStatus2: u32,
}import "golang.org/x/sys/windows"
type QOS_OBJECT_HDR struct {
ObjectType uint32
ObjectLength uint32
}
type RSVP_STATUS_INFO struct {
ObjectHdr QOS_OBJECT_HDR
StatusCode uint32
ExtendedStatus1 uint32
ExtendedStatus2 uint32
}type
QOS_OBJECT_HDR = record
ObjectType: DWORD;
ObjectLength: DWORD;
end;
RSVP_STATUS_INFO = record
ObjectHdr: QOS_OBJECT_HDR;
StatusCode: DWORD;
ExtendedStatus1: DWORD;
ExtendedStatus2: DWORD;
end;const QOS_OBJECT_HDR = extern struct {
ObjectType: u32,
ObjectLength: u32,
};
const RSVP_STATUS_INFO = extern struct {
ObjectHdr: QOS_OBJECT_HDR,
StatusCode: u32,
ExtendedStatus1: u32,
ExtendedStatus2: u32,
};type
QOS_OBJECT_HDR {.bycopy.} = object
ObjectType: uint32
ObjectLength: uint32
RSVP_STATUS_INFO {.bycopy.} = object
ObjectHdr: QOS_OBJECT_HDR
StatusCode: uint32
ExtendedStatus1: uint32
ExtendedStatus2: uint32struct QOS_OBJECT_HDR
{
uint ObjectType;
uint ObjectLength;
}
struct RSVP_STATUS_INFO
{
QOS_OBJECT_HDR ObjectHdr;
uint StatusCode;
uint ExtendedStatus1;
uint ExtendedStatus2;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RSVP_STATUS_INFO サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; ObjectHdr : QOS_OBJECT_HDR (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; StatusCode : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ExtendedStatus1 : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ExtendedStatus2 : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global QOS_OBJECT_HDR
#field int ObjectType
#field int ObjectLength
#endstruct
#defstruct global RSVP_STATUS_INFO
#field QOS_OBJECT_HDR ObjectHdr
#field int StatusCode
#field int ExtendedStatus1
#field int ExtendedStatus2
#endstruct
stdim st, RSVP_STATUS_INFO ; NSTRUCT 変数を確保
st->StatusCode = 100
mes "StatusCode=" + st->StatusCode