Win32 API 日本語リファレンス
ホームGraphics.Printing › BranchOfficeJobData

BranchOfficeJobData

構造体
サイズx64: 96 バイト / x86: 72 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
eEventTypeEBranchOfficeJobEventType4+0+0ブランチオフィスのジョブイベント種別を示す列挙値(EBranchOfficeJobEventType)。
JobIdDWORD4+4+4対象の印刷ジョブID。
JobInfo_JobInfo_e__Union88/64+8+8イベント種別に応じたジョブ情報を保持する共用体。

共用体: _JobInfo_e__Union x64 88B / x86 64B

フィールドサイズx64x86
LogJobPrintedBranchOfficeJobDataPrinted64/40+0+0
LogJobRenderedBranchOfficeJobDataRendered24+0+0
LogJobErrorBranchOfficeJobDataError88/64+0+0
LogPipelineFailedBranchOfficeJobDataPipelineFailed24/12+0+0
LogOfflineFileFullBranchOfficeLogOfflineFileFull8/4+0+0

各言語での定義

#include <windows.h>

// BranchOfficeJobData  (x64 96 / x86 72 バイト)
typedef struct BranchOfficeJobData {
    EBranchOfficeJobEventType eEventType;
    DWORD JobId;
    _JobInfo_e__Union JobInfo;
} BranchOfficeJobData;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct BranchOfficeJobData
{
    public int eEventType;
    public uint JobId;
    public _JobInfo_e__Union JobInfo;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure BranchOfficeJobData
    Public eEventType As Integer
    Public JobId As UInteger
    Public JobInfo As _JobInfo_e__Union
End Structure
import ctypes
from ctypes import wintypes

class BranchOfficeJobData(ctypes.Structure):
    _fields_ = [
        ("eEventType", ctypes.c_int),
        ("JobId", wintypes.DWORD),
        ("JobInfo", _JobInfo_e__Union),
    ]
#[repr(C)]
pub struct BranchOfficeJobData {
    pub eEventType: i32,
    pub JobId: u32,
    pub JobInfo: _JobInfo_e__Union,
}
import "golang.org/x/sys/windows"

type BranchOfficeJobData struct {
	eEventType int32
	JobId uint32
	JobInfo _JobInfo_e__Union
}
type
  BranchOfficeJobData = record
    eEventType: Integer;
    JobId: DWORD;
    JobInfo: _JobInfo_e__Union;
  end;
const BranchOfficeJobData = extern struct {
    eEventType: i32,
    JobId: u32,
    JobInfo: _JobInfo_e__Union,
};
type
  BranchOfficeJobData {.bycopy.} = object
    eEventType: int32
    JobId: uint32
    JobInfo: _JobInfo_e__Union
struct BranchOfficeJobData
{
    int eEventType;
    uint JobId;
    _JobInfo_e__Union JobInfo;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; BranchOfficeJobData サイズ: 72 バイト(x86)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; eEventType : EBranchOfficeJobEventType (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; JobId : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; JobInfo : _JobInfo_e__Union (+8, 64byte)  varptr(st)+8 を基点に操作(64byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; BranchOfficeJobData サイズ: 96 バイト(x64)
dim st, 24    ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; eEventType : EBranchOfficeJobEventType (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; JobId : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; JobInfo : _JobInfo_e__Union (+8, 88byte)  varptr(st)+8 を基点に操作(88byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global BranchOfficeJobData
    #field int eEventType
    #field int JobId
    #field byte JobInfo 88
#endstruct

stdim st, BranchOfficeJobData        ; NSTRUCT 変数を確保
st->eEventType = 100
mes "eEventType=" + st->eEventType
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。