ホーム › Devices.Tapi › LINEPROXYREQUEST
LINEPROXYREQUEST
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSize | DWORD | 4 | +0 | +0 | この構造体の合計サイズをバイト単位で表す。可変長領域を含む全体長を示す。 |
| dwClientMachineNameSize | DWORD | 4 | +4 | +4 | クライアントマシン名文字列のサイズをバイト単位で示す。 |
| dwClientMachineNameOffset | DWORD | 4 | +8 | +8 | クライアントマシン名文字列への構造体先頭からのバイトオフセットを示す。 |
| dwClientUserNameSize | DWORD | 4 | +12 | +12 | クライアントユーザー名文字列のサイズをバイト単位で示す。 |
| dwClientUserNameOffset | DWORD | 4 | +16 | +16 | クライアントユーザー名文字列への構造体先頭からのバイトオフセットを示す。 |
| dwClientAppAPIVersion | DWORD | 4 | +20 | +20 | クライアントアプリが使用するTAPI APIバージョンを示す。 |
| dwRequestType | DWORD | 4 | +24 | +24 | プロキシ要求の種別を表すLINEPROXYREQUEST定数を保持する。 |
| Anonymous | _Anonymous_e__Union | 8/4 | +28 | +28 | 要求種別ごとに異なるパラメータを格納する無名共用体。種別に応じた一方のメンバを使う。 |
共用体: _Anonymous_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| SetAgentGroup | _SetAgentGroup_e__Struct | 8/4 | +0 | +0 |
| SetAgentState | _SetAgentState_e__Struct | 8/4 | +0 | +0 |
| SetAgentActivity | _SetAgentActivity_e__Struct | 8/4 | +0 | +0 |
| GetAgentCaps | _GetAgentCaps_e__Struct | 8/4 | +0 | +0 |
| GetAgentStatus | _GetAgentStatus_e__Struct | 8/4 | +0 | +0 |
| AgentSpecific | _AgentSpecific_e__Struct | 8/4 | +0 | +0 |
| GetAgentActivityList | _GetAgentActivityList_e__Struct | 8/4 | +0 | +0 |
| GetAgentGroupList | _GetAgentGroupList_e__Struct | 8/4 | +0 | +0 |
| CreateAgent | _CreateAgent_e__Struct | 8/4 | +0 | +0 |
| SetAgentStateEx | _SetAgentStateEx_e__Struct | 8/4 | +0 | +0 |
| SetAgentMeasurementPeriod | _SetAgentMeasurementPeriod_e__Struct | 8/4 | +0 | +0 |
| GetAgentInfo | _GetAgentInfo_e__Struct | 8/4 | +0 | +0 |
| CreateAgentSession | _CreateAgentSession_e__Struct | 8/4 | +0 | +0 |
| GetAgentSessionList | _GetAgentSessionList_e__Struct | 8/4 | +0 | +0 |
| GetAgentSessionInfo | _GetAgentSessionInfo_e__Struct | 8/4 | +0 | +0 |
| SetAgentSessionState | _SetAgentSessionState_e__Struct | 8/4 | +0 | +0 |
| GetQueueList | _GetQueueList_e__Struct | 8/4 | +0 | +0 |
| SetQueueMeasurementPeriod | _SetQueueMeasurementPeriod_e__Struct | 8/4 | +0 | +0 |
| GetQueueInfo | _GetQueueInfo_e__Struct | 8/4 | +0 | +0 |
| GetGroupList | _GetGroupList_e__Struct | 8/4 | +0 | +0 |
各言語での定義
#include <windows.h>
// LINEPROXYREQUEST (x64 36 / x86 32 バイト)
#pragma pack(push, 1)
typedef struct LINEPROXYREQUEST {
DWORD dwSize;
DWORD dwClientMachineNameSize;
DWORD dwClientMachineNameOffset;
DWORD dwClientUserNameSize;
DWORD dwClientUserNameOffset;
DWORD dwClientAppAPIVersion;
DWORD dwRequestType;
_Anonymous_e__Union Anonymous;
} LINEPROXYREQUEST;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINEPROXYREQUEST
{
public uint dwSize;
public uint dwClientMachineNameSize;
public uint dwClientMachineNameOffset;
public uint dwClientUserNameSize;
public uint dwClientUserNameOffset;
public uint dwClientAppAPIVersion;
public uint dwRequestType;
public _Anonymous_e__Union Anonymous;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINEPROXYREQUEST
Public dwSize As UInteger
Public dwClientMachineNameSize As UInteger
Public dwClientMachineNameOffset As UInteger
Public dwClientUserNameSize As UInteger
Public dwClientUserNameOffset As UInteger
Public dwClientAppAPIVersion As UInteger
Public dwRequestType As UInteger
Public Anonymous As _Anonymous_e__Union
End Structureimport ctypes
from ctypes import wintypes
class LINEPROXYREQUEST(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwSize", wintypes.DWORD),
("dwClientMachineNameSize", wintypes.DWORD),
("dwClientMachineNameOffset", wintypes.DWORD),
("dwClientUserNameSize", wintypes.DWORD),
("dwClientUserNameOffset", wintypes.DWORD),
("dwClientAppAPIVersion", wintypes.DWORD),
("dwRequestType", wintypes.DWORD),
("Anonymous", _Anonymous_e__Union),
]#[repr(C, packed(1))]
pub struct LINEPROXYREQUEST {
pub dwSize: u32,
pub dwClientMachineNameSize: u32,
pub dwClientMachineNameOffset: u32,
pub dwClientUserNameSize: u32,
pub dwClientUserNameOffset: u32,
pub dwClientAppAPIVersion: u32,
pub dwRequestType: u32,
pub Anonymous: _Anonymous_e__Union,
}import "golang.org/x/sys/windows"
type LINEPROXYREQUEST struct {
dwSize uint32
dwClientMachineNameSize uint32
dwClientMachineNameOffset uint32
dwClientUserNameSize uint32
dwClientUserNameOffset uint32
dwClientAppAPIVersion uint32
dwRequestType uint32
Anonymous _Anonymous_e__Union
}type
LINEPROXYREQUEST = packed record
dwSize: DWORD;
dwClientMachineNameSize: DWORD;
dwClientMachineNameOffset: DWORD;
dwClientUserNameSize: DWORD;
dwClientUserNameOffset: DWORD;
dwClientAppAPIVersion: DWORD;
dwRequestType: DWORD;
Anonymous: _Anonymous_e__Union;
end;const LINEPROXYREQUEST = extern struct {
dwSize: u32,
dwClientMachineNameSize: u32,
dwClientMachineNameOffset: u32,
dwClientUserNameSize: u32,
dwClientUserNameOffset: u32,
dwClientAppAPIVersion: u32,
dwRequestType: u32,
Anonymous: _Anonymous_e__Union,
};type
LINEPROXYREQUEST {.packed.} = object
dwSize: uint32
dwClientMachineNameSize: uint32
dwClientMachineNameOffset: uint32
dwClientUserNameSize: uint32
dwClientUserNameOffset: uint32
dwClientAppAPIVersion: uint32
dwRequestType: uint32
Anonymous: _Anonymous_e__Unionalign(1)
struct LINEPROXYREQUEST
{
uint dwSize;
uint dwClientMachineNameSize;
uint dwClientMachineNameOffset;
uint dwClientUserNameSize;
uint dwClientUserNameOffset;
uint dwClientAppAPIVersion;
uint dwRequestType;
_Anonymous_e__Union Anonymous;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; LINEPROXYREQUEST サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwClientMachineNameSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwClientMachineNameOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwClientUserNameSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwClientUserNameOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwClientAppAPIVersion : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwRequestType : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+28, 4byte) varptr(st)+28 を基点に操作(4byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINEPROXYREQUEST サイズ: 36 バイト(x64)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; dwSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwClientMachineNameSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwClientMachineNameOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwClientUserNameSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwClientUserNameOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwClientAppAPIVersion : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwRequestType : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+28, 8byte) varptr(st)+28 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINEPROXYREQUEST, pack=1
#field int dwSize
#field int dwClientMachineNameSize
#field int dwClientMachineNameOffset
#field int dwClientUserNameSize
#field int dwClientUserNameOffset
#field int dwClientAppAPIVersion
#field int dwRequestType
#field byte Anonymous 8
#endstruct
stdim st, LINEPROXYREQUEST ; NSTRUCT 変数を確保
st->dwSize = 100
mes "dwSize=" + st->dwSize
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。