ホーム › Devices.Tapi › LINEAGENTENTRY
LINEAGENTENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hAgent | DWORD | 4 | +0 | +0 | このエージェントを識別するハンドル値を表す。 |
| dwNameSize | DWORD | 4 | +4 | +4 | エージェント名文字列のサイズをバイトで表す。 |
| dwNameOffset | DWORD | 4 | +8 | +8 | エージェント名文字列までのオフセットをバイトで表す。 |
| dwIDSize | DWORD | 4 | +12 | +12 | エージェントID文字列のサイズをバイトで表す。 |
| dwIDOffset | DWORD | 4 | +16 | +16 | エージェントID文字列までのオフセットをバイトで表す。 |
| dwPINSize | DWORD | 4 | +20 | +20 | エージェントPIN文字列のサイズをバイトで表す。 |
| dwPINOffset | DWORD | 4 | +24 | +24 | エージェントPIN文字列までのオフセットをバイトで表す。 |
各言語での定義
#include <windows.h>
// LINEAGENTENTRY (x64 28 / x86 28 バイト)
#pragma pack(push, 1)
typedef struct LINEAGENTENTRY {
DWORD hAgent;
DWORD dwNameSize;
DWORD dwNameOffset;
DWORD dwIDSize;
DWORD dwIDOffset;
DWORD dwPINSize;
DWORD dwPINOffset;
} LINEAGENTENTRY;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LINEAGENTENTRY
{
public uint hAgent;
public uint dwNameSize;
public uint dwNameOffset;
public uint dwIDSize;
public uint dwIDOffset;
public uint dwPINSize;
public uint dwPINOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LINEAGENTENTRY
Public hAgent As UInteger
Public dwNameSize As UInteger
Public dwNameOffset As UInteger
Public dwIDSize As UInteger
Public dwIDOffset As UInteger
Public dwPINSize As UInteger
Public dwPINOffset As UInteger
End Structureimport ctypes
from ctypes import wintypes
class LINEAGENTENTRY(ctypes.Structure):
_pack_ = 1
_fields_ = [
("hAgent", wintypes.DWORD),
("dwNameSize", wintypes.DWORD),
("dwNameOffset", wintypes.DWORD),
("dwIDSize", wintypes.DWORD),
("dwIDOffset", wintypes.DWORD),
("dwPINSize", wintypes.DWORD),
("dwPINOffset", wintypes.DWORD),
]#[repr(C, packed(1))]
pub struct LINEAGENTENTRY {
pub hAgent: u32,
pub dwNameSize: u32,
pub dwNameOffset: u32,
pub dwIDSize: u32,
pub dwIDOffset: u32,
pub dwPINSize: u32,
pub dwPINOffset: u32,
}import "golang.org/x/sys/windows"
type LINEAGENTENTRY struct {
hAgent uint32
dwNameSize uint32
dwNameOffset uint32
dwIDSize uint32
dwIDOffset uint32
dwPINSize uint32
dwPINOffset uint32
}type
LINEAGENTENTRY = packed record
hAgent: DWORD;
dwNameSize: DWORD;
dwNameOffset: DWORD;
dwIDSize: DWORD;
dwIDOffset: DWORD;
dwPINSize: DWORD;
dwPINOffset: DWORD;
end;const LINEAGENTENTRY = extern struct {
hAgent: u32,
dwNameSize: u32,
dwNameOffset: u32,
dwIDSize: u32,
dwIDOffset: u32,
dwPINSize: u32,
dwPINOffset: u32,
};type
LINEAGENTENTRY {.packed.} = object
hAgent: uint32
dwNameSize: uint32
dwNameOffset: uint32
dwIDSize: uint32
dwIDOffset: uint32
dwPINSize: uint32
dwPINOffset: uint32align(1)
struct LINEAGENTENTRY
{
uint hAgent;
uint dwNameSize;
uint dwNameOffset;
uint dwIDSize;
uint dwIDOffset;
uint dwPINSize;
uint dwPINOffset;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LINEAGENTENTRY サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; hAgent : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwNameSize : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwNameOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwIDSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwIDOffset : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwPINSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwPINOffset : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LINEAGENTENTRY, pack=1
#field int hAgent
#field int dwNameSize
#field int dwNameOffset
#field int dwIDSize
#field int dwIDOffset
#field int dwPINSize
#field int dwPINOffset
#endstruct
stdim st, LINEAGENTENTRY ; NSTRUCT 変数を確保
st->hAgent = 100
mes "hAgent=" + st->hAgent