ホーム › Devices.Fax › FAX_JOB_PARAMA
FAX_JOB_PARAMA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SizeOfStruct | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示すDWORD。 |
| RecipientNumber | LPSTR | 8/4 | +8 | +4 | 受信者のファクス番号を指すANSI文字列。 |
| RecipientName | LPSTR | 8/4 | +16 | +8 | 受信者名を指すANSI文字列。 |
| Tsid | LPSTR | 8/4 | +24 | +12 | 送信加入者識別(TSID)を指すANSI文字列。 |
| SenderName | LPSTR | 8/4 | +32 | +16 | 送信者名を指すANSI文字列。 |
| SenderCompany | LPSTR | 8/4 | +40 | +20 | 送信者の会社名を指すANSI文字列。 |
| SenderDept | LPSTR | 8/4 | +48 | +24 | 送信者の部署名を指すANSI文字列。 |
| BillingCode | LPSTR | 8/4 | +56 | +28 | 課金コードを指すANSI文字列。 |
| ScheduleAction | DWORD | 4 | +64 | +32 | 送信スケジュールの種別を示すDWORD。即時/指定時刻等。 |
| ScheduleTime | SYSTEMTIME | 16 | +68 | +36 | 送信を予約する日時を示すSYSTEMTIME。 |
| DeliveryReportType | DWORD | 4 | +84 | +52 | 配信レポートの種別を示すDWORD。 |
| DeliveryReportAddress | LPSTR | 8/4 | +88 | +56 | 配信レポート送付先アドレスを指すANSI文字列。 |
| DocumentName | LPSTR | 8/4 | +96 | +60 | ドキュメント名を指すANSI文字列。 |
| CallHandle | DWORD | 4 | +104 | +64 | 既存の通話ハンドルを示すDWORD。手動送信時に使用。 |
| Reserved | UINT_PTR | 24/12 | +112 | +68 | 予約フィールド。将来の拡張用のポインタサイズ整数。 |
各言語での定義
#include <windows.h>
// SYSTEMTIME (x64 16 / x86 16 バイト)
typedef struct SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
// FAX_JOB_PARAMA (x64 136 / x86 80 バイト)
typedef struct FAX_JOB_PARAMA {
DWORD SizeOfStruct;
LPSTR RecipientNumber;
LPSTR RecipientName;
LPSTR Tsid;
LPSTR SenderName;
LPSTR SenderCompany;
LPSTR SenderDept;
LPSTR BillingCode;
DWORD ScheduleAction;
SYSTEMTIME ScheduleTime;
DWORD DeliveryReportType;
LPSTR DeliveryReportAddress;
LPSTR DocumentName;
DWORD CallHandle;
UINT_PTR Reserved[3];
} FAX_JOB_PARAMA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SYSTEMTIME
{
public ushort wYear;
public ushort wMonth;
public ushort wDayOfWeek;
public ushort wDay;
public ushort wHour;
public ushort wMinute;
public ushort wSecond;
public ushort wMilliseconds;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FAX_JOB_PARAMA
{
public uint SizeOfStruct;
public IntPtr RecipientNumber;
public IntPtr RecipientName;
public IntPtr Tsid;
public IntPtr SenderName;
public IntPtr SenderCompany;
public IntPtr SenderDept;
public IntPtr BillingCode;
public uint ScheduleAction;
public SYSTEMTIME ScheduleTime;
public uint DeliveryReportType;
public IntPtr DeliveryReportAddress;
public IntPtr DocumentName;
public uint CallHandle;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public UIntPtr[] Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SYSTEMTIME
Public wYear As UShort
Public wMonth As UShort
Public wDayOfWeek As UShort
Public wDay As UShort
Public wHour As UShort
Public wMinute As UShort
Public wSecond As UShort
Public wMilliseconds As UShort
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FAX_JOB_PARAMA
Public SizeOfStruct As UInteger
Public RecipientNumber As IntPtr
Public RecipientName As IntPtr
Public Tsid As IntPtr
Public SenderName As IntPtr
Public SenderCompany As IntPtr
Public SenderDept As IntPtr
Public BillingCode As IntPtr
Public ScheduleAction As UInteger
Public ScheduleTime As SYSTEMTIME
Public DeliveryReportType As UInteger
Public DeliveryReportAddress As IntPtr
Public DocumentName As IntPtr
Public CallHandle As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=3)> Public Reserved() As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class SYSTEMTIME(ctypes.Structure):
_fields_ = [
("wYear", ctypes.c_ushort),
("wMonth", ctypes.c_ushort),
("wDayOfWeek", ctypes.c_ushort),
("wDay", ctypes.c_ushort),
("wHour", ctypes.c_ushort),
("wMinute", ctypes.c_ushort),
("wSecond", ctypes.c_ushort),
("wMilliseconds", ctypes.c_ushort),
]
class FAX_JOB_PARAMA(ctypes.Structure):
_fields_ = [
("SizeOfStruct", wintypes.DWORD),
("RecipientNumber", ctypes.c_void_p),
("RecipientName", ctypes.c_void_p),
("Tsid", ctypes.c_void_p),
("SenderName", ctypes.c_void_p),
("SenderCompany", ctypes.c_void_p),
("SenderDept", ctypes.c_void_p),
("BillingCode", ctypes.c_void_p),
("ScheduleAction", wintypes.DWORD),
("ScheduleTime", SYSTEMTIME),
("DeliveryReportType", wintypes.DWORD),
("DeliveryReportAddress", ctypes.c_void_p),
("DocumentName", ctypes.c_void_p),
("CallHandle", wintypes.DWORD),
("Reserved", ctypes.c_size_t * 3),
]#[repr(C)]
pub struct SYSTEMTIME {
pub wYear: u16,
pub wMonth: u16,
pub wDayOfWeek: u16,
pub wDay: u16,
pub wHour: u16,
pub wMinute: u16,
pub wSecond: u16,
pub wMilliseconds: u16,
}
#[repr(C)]
pub struct FAX_JOB_PARAMA {
pub SizeOfStruct: u32,
pub RecipientNumber: *mut core::ffi::c_void,
pub RecipientName: *mut core::ffi::c_void,
pub Tsid: *mut core::ffi::c_void,
pub SenderName: *mut core::ffi::c_void,
pub SenderCompany: *mut core::ffi::c_void,
pub SenderDept: *mut core::ffi::c_void,
pub BillingCode: *mut core::ffi::c_void,
pub ScheduleAction: u32,
pub ScheduleTime: SYSTEMTIME,
pub DeliveryReportType: u32,
pub DeliveryReportAddress: *mut core::ffi::c_void,
pub DocumentName: *mut core::ffi::c_void,
pub CallHandle: u32,
pub Reserved: [usize; 3],
}import "golang.org/x/sys/windows"
type SYSTEMTIME struct {
wYear uint16
wMonth uint16
wDayOfWeek uint16
wDay uint16
wHour uint16
wMinute uint16
wSecond uint16
wMilliseconds uint16
}
type FAX_JOB_PARAMA struct {
SizeOfStruct uint32
RecipientNumber uintptr
RecipientName uintptr
Tsid uintptr
SenderName uintptr
SenderCompany uintptr
SenderDept uintptr
BillingCode uintptr
ScheduleAction uint32
ScheduleTime SYSTEMTIME
DeliveryReportType uint32
DeliveryReportAddress uintptr
DocumentName uintptr
CallHandle uint32
Reserved [3]uintptr
}type
SYSTEMTIME = record
wYear: Word;
wMonth: Word;
wDayOfWeek: Word;
wDay: Word;
wHour: Word;
wMinute: Word;
wSecond: Word;
wMilliseconds: Word;
end;
FAX_JOB_PARAMA = record
SizeOfStruct: DWORD;
RecipientNumber: Pointer;
RecipientName: Pointer;
Tsid: Pointer;
SenderName: Pointer;
SenderCompany: Pointer;
SenderDept: Pointer;
BillingCode: Pointer;
ScheduleAction: DWORD;
ScheduleTime: SYSTEMTIME;
DeliveryReportType: DWORD;
DeliveryReportAddress: Pointer;
DocumentName: Pointer;
CallHandle: DWORD;
Reserved: array[0..2] of NativeUInt;
end;const SYSTEMTIME = extern struct {
wYear: u16,
wMonth: u16,
wDayOfWeek: u16,
wDay: u16,
wHour: u16,
wMinute: u16,
wSecond: u16,
wMilliseconds: u16,
};
const FAX_JOB_PARAMA = extern struct {
SizeOfStruct: u32,
RecipientNumber: ?*anyopaque,
RecipientName: ?*anyopaque,
Tsid: ?*anyopaque,
SenderName: ?*anyopaque,
SenderCompany: ?*anyopaque,
SenderDept: ?*anyopaque,
BillingCode: ?*anyopaque,
ScheduleAction: u32,
ScheduleTime: SYSTEMTIME,
DeliveryReportType: u32,
DeliveryReportAddress: ?*anyopaque,
DocumentName: ?*anyopaque,
CallHandle: u32,
Reserved: [3]usize,
};type
SYSTEMTIME {.bycopy.} = object
wYear: uint16
wMonth: uint16
wDayOfWeek: uint16
wDay: uint16
wHour: uint16
wMinute: uint16
wSecond: uint16
wMilliseconds: uint16
FAX_JOB_PARAMA {.bycopy.} = object
SizeOfStruct: uint32
RecipientNumber: pointer
RecipientName: pointer
Tsid: pointer
SenderName: pointer
SenderCompany: pointer
SenderDept: pointer
BillingCode: pointer
ScheduleAction: uint32
ScheduleTime: SYSTEMTIME
DeliveryReportType: uint32
DeliveryReportAddress: pointer
DocumentName: pointer
CallHandle: uint32
Reserved: array[3, uint]struct SYSTEMTIME
{
ushort wYear;
ushort wMonth;
ushort wDayOfWeek;
ushort wDay;
ushort wHour;
ushort wMinute;
ushort wSecond;
ushort wMilliseconds;
}
struct FAX_JOB_PARAMA
{
uint SizeOfStruct;
void* RecipientNumber;
void* RecipientName;
void* Tsid;
void* SenderName;
void* SenderCompany;
void* SenderDept;
void* BillingCode;
uint ScheduleAction;
SYSTEMTIME ScheduleTime;
uint DeliveryReportType;
void* DeliveryReportAddress;
void* DocumentName;
uint CallHandle;
size_t[3] Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FAX_JOB_PARAMA サイズ: 80 バイト(x86)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; RecipientNumber : LPSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; RecipientName : LPSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Tsid : LPSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; SenderName : LPSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; SenderCompany : LPSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; SenderDept : LPSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; BillingCode : LPSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ScheduleAction : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ScheduleTime : SYSTEMTIME (+36, 16byte) varptr(st)+36 を基点に操作(16byte:入れ子/配列)
; DeliveryReportType : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; DeliveryReportAddress : LPSTR (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; DocumentName : LPSTR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; CallHandle : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; Reserved : UINT_PTR (+68, 12byte) varptr(st)+68 を基点に操作(12byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FAX_JOB_PARAMA サイズ: 136 バイト(x64)
dim st, 34 ; 4byte整数×34(構造体サイズ 136 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; RecipientNumber : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; RecipientName : LPSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; Tsid : LPSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; SenderName : LPSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; SenderCompany : LPSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; SenderDept : LPSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; BillingCode : LPSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ScheduleAction : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ScheduleTime : SYSTEMTIME (+68, 16byte) varptr(st)+68 を基点に操作(16byte:入れ子/配列)
; DeliveryReportType : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; DeliveryReportAddress : LPSTR (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; DocumentName : LPSTR (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; CallHandle : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; Reserved : UINT_PTR (+112, 24byte) varptr(st)+112 を基点に操作(24byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global SYSTEMTIME
#field short wYear
#field short wMonth
#field short wDayOfWeek
#field short wDay
#field short wHour
#field short wMinute
#field short wSecond
#field short wMilliseconds
#endstruct
#defstruct global FAX_JOB_PARAMA
#field int SizeOfStruct
#field intptr RecipientNumber
#field intptr RecipientName
#field intptr Tsid
#field intptr SenderName
#field intptr SenderCompany
#field intptr SenderDept
#field intptr BillingCode
#field int ScheduleAction
#field SYSTEMTIME ScheduleTime
#field int DeliveryReportType
#field intptr DeliveryReportAddress
#field intptr DocumentName
#field int CallHandle
#field intptr Reserved 3
#endstruct
stdim st, FAX_JOB_PARAMA ; NSTRUCT 変数を確保
st->SizeOfStruct = 100
mes "SizeOfStruct=" + st->SizeOfStruct