ホーム › Devices.Fax › FAX_ROUTE
FAX_ROUTE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SizeOfStruct | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示すDWORD。 |
| JobId | DWORD | 4 | +4 | +4 | ルーティング対象のジョブを識別するDWORD。 |
| ElapsedTime | ULONGLONG | 8 | +8 | +8 | 受信に要した経過時間を示す64ビット符号なし整数。 |
| ReceiveTime | ULONGLONG | 8 | +16 | +16 | 受信完了時刻を示す64ビット符号なし整数。 |
| PageCount | DWORD | 4 | +24 | +24 | 受信ファクスのページ数を示すDWORD。 |
| Csid | LPWSTR | 8/4 | +32 | +28 | 呼出加入者識別(CSID)を指すワイド文字列。 |
| Tsid | LPWSTR | 8/4 | +40 | +32 | 送信加入者識別(TSID)を指すワイド文字列。 |
| CallerId | LPWSTR | 8/4 | +48 | +36 | 発信者番号を指すワイド文字列。 |
| RoutingInfo | LPWSTR | 8/4 | +56 | +40 | ルーティング情報文字列を指すワイド文字列。 |
| ReceiverName | LPWSTR | 8/4 | +64 | +44 | 受信者名を指すワイド文字列。 |
| ReceiverNumber | LPWSTR | 8/4 | +72 | +48 | 受信者のファクス番号を指すワイド文字列。 |
| DeviceName | LPWSTR | 8/4 | +80 | +52 | 受信したデバイス名を指すワイド文字列。 |
| DeviceId | DWORD | 4 | +88 | +56 | 受信したデバイスを識別するDWORD。 |
| RoutingInfoData | BYTE* | 8/4 | +96 | +60 | ルーティング拡張固有のバイナリデータへのポインタ。 |
| RoutingInfoDataSize | DWORD | 4 | +104 | +64 | RoutingInfoDataのサイズをバイト単位で示すDWORD。 |
各言語での定義
#include <windows.h>
// FAX_ROUTE (x64 112 / x86 72 バイト)
typedef struct FAX_ROUTE {
DWORD SizeOfStruct;
DWORD JobId;
ULONGLONG ElapsedTime;
ULONGLONG ReceiveTime;
DWORD PageCount;
LPWSTR Csid;
LPWSTR Tsid;
LPWSTR CallerId;
LPWSTR RoutingInfo;
LPWSTR ReceiverName;
LPWSTR ReceiverNumber;
LPWSTR DeviceName;
DWORD DeviceId;
BYTE* RoutingInfoData;
DWORD RoutingInfoDataSize;
} FAX_ROUTE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FAX_ROUTE
{
public uint SizeOfStruct;
public uint JobId;
public ulong ElapsedTime;
public ulong ReceiveTime;
public uint PageCount;
public IntPtr Csid;
public IntPtr Tsid;
public IntPtr CallerId;
public IntPtr RoutingInfo;
public IntPtr ReceiverName;
public IntPtr ReceiverNumber;
public IntPtr DeviceName;
public uint DeviceId;
public IntPtr RoutingInfoData;
public uint RoutingInfoDataSize;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FAX_ROUTE
Public SizeOfStruct As UInteger
Public JobId As UInteger
Public ElapsedTime As ULong
Public ReceiveTime As ULong
Public PageCount As UInteger
Public Csid As IntPtr
Public Tsid As IntPtr
Public CallerId As IntPtr
Public RoutingInfo As IntPtr
Public ReceiverName As IntPtr
Public ReceiverNumber As IntPtr
Public DeviceName As IntPtr
Public DeviceId As UInteger
Public RoutingInfoData As IntPtr
Public RoutingInfoDataSize As UInteger
End Structureimport ctypes
from ctypes import wintypes
class FAX_ROUTE(ctypes.Structure):
_fields_ = [
("SizeOfStruct", wintypes.DWORD),
("JobId", wintypes.DWORD),
("ElapsedTime", ctypes.c_ulonglong),
("ReceiveTime", ctypes.c_ulonglong),
("PageCount", wintypes.DWORD),
("Csid", ctypes.c_void_p),
("Tsid", ctypes.c_void_p),
("CallerId", ctypes.c_void_p),
("RoutingInfo", ctypes.c_void_p),
("ReceiverName", ctypes.c_void_p),
("ReceiverNumber", ctypes.c_void_p),
("DeviceName", ctypes.c_void_p),
("DeviceId", wintypes.DWORD),
("RoutingInfoData", ctypes.c_void_p),
("RoutingInfoDataSize", wintypes.DWORD),
]#[repr(C)]
pub struct FAX_ROUTE {
pub SizeOfStruct: u32,
pub JobId: u32,
pub ElapsedTime: u64,
pub ReceiveTime: u64,
pub PageCount: u32,
pub Csid: *mut core::ffi::c_void,
pub Tsid: *mut core::ffi::c_void,
pub CallerId: *mut core::ffi::c_void,
pub RoutingInfo: *mut core::ffi::c_void,
pub ReceiverName: *mut core::ffi::c_void,
pub ReceiverNumber: *mut core::ffi::c_void,
pub DeviceName: *mut core::ffi::c_void,
pub DeviceId: u32,
pub RoutingInfoData: *mut core::ffi::c_void,
pub RoutingInfoDataSize: u32,
}import "golang.org/x/sys/windows"
type FAX_ROUTE struct {
SizeOfStruct uint32
JobId uint32
ElapsedTime uint64
ReceiveTime uint64
PageCount uint32
Csid uintptr
Tsid uintptr
CallerId uintptr
RoutingInfo uintptr
ReceiverName uintptr
ReceiverNumber uintptr
DeviceName uintptr
DeviceId uint32
RoutingInfoData uintptr
RoutingInfoDataSize uint32
}type
FAX_ROUTE = record
SizeOfStruct: DWORD;
JobId: DWORD;
ElapsedTime: UInt64;
ReceiveTime: UInt64;
PageCount: DWORD;
Csid: Pointer;
Tsid: Pointer;
CallerId: Pointer;
RoutingInfo: Pointer;
ReceiverName: Pointer;
ReceiverNumber: Pointer;
DeviceName: Pointer;
DeviceId: DWORD;
RoutingInfoData: Pointer;
RoutingInfoDataSize: DWORD;
end;const FAX_ROUTE = extern struct {
SizeOfStruct: u32,
JobId: u32,
ElapsedTime: u64,
ReceiveTime: u64,
PageCount: u32,
Csid: ?*anyopaque,
Tsid: ?*anyopaque,
CallerId: ?*anyopaque,
RoutingInfo: ?*anyopaque,
ReceiverName: ?*anyopaque,
ReceiverNumber: ?*anyopaque,
DeviceName: ?*anyopaque,
DeviceId: u32,
RoutingInfoData: ?*anyopaque,
RoutingInfoDataSize: u32,
};type
FAX_ROUTE {.bycopy.} = object
SizeOfStruct: uint32
JobId: uint32
ElapsedTime: uint64
ReceiveTime: uint64
PageCount: uint32
Csid: pointer
Tsid: pointer
CallerId: pointer
RoutingInfo: pointer
ReceiverName: pointer
ReceiverNumber: pointer
DeviceName: pointer
DeviceId: uint32
RoutingInfoData: pointer
RoutingInfoDataSize: uint32struct FAX_ROUTE
{
uint SizeOfStruct;
uint JobId;
ulong ElapsedTime;
ulong ReceiveTime;
uint PageCount;
void* Csid;
void* Tsid;
void* CallerId;
void* RoutingInfo;
void* ReceiverName;
void* ReceiverNumber;
void* DeviceName;
uint DeviceId;
void* RoutingInfoData;
uint RoutingInfoDataSize;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FAX_ROUTE サイズ: 72 バイト(x86)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; JobId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ElapsedTime : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ReceiveTime : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; PageCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Csid : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; Tsid : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; CallerId : LPWSTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; RoutingInfo : LPWSTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ReceiverName : LPWSTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ReceiverNumber : LPWSTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; DeviceName : LPWSTR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; DeviceId : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; RoutingInfoData : BYTE* (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; RoutingInfoDataSize : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FAX_ROUTE サイズ: 112 バイト(x64)
dim st, 28 ; 4byte整数×28(構造体サイズ 112 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; JobId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ElapsedTime : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ReceiveTime : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; PageCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Csid : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Tsid : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; CallerId : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; RoutingInfo : LPWSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ReceiverName : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ReceiverNumber : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; DeviceName : LPWSTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; DeviceId : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; RoutingInfoData : BYTE* (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; RoutingInfoDataSize : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FAX_ROUTE
#field int SizeOfStruct
#field int JobId
#field int64 ElapsedTime
#field int64 ReceiveTime
#field int PageCount
#field intptr Csid
#field intptr Tsid
#field intptr CallerId
#field intptr RoutingInfo
#field intptr ReceiverName
#field intptr ReceiverNumber
#field intptr DeviceName
#field int DeviceId
#field intptr RoutingInfoData
#field int RoutingInfoDataSize
#endstruct
stdim st, FAX_ROUTE ; NSTRUCT 変数を確保
st->SizeOfStruct = 100
mes "SizeOfStruct=" + st->SizeOfStruct