ホーム › Graphics.Printing › PRINTPROCESSOR_CAPS_2
PRINTPROCESSOR_CAPS_2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwLevel | DWORD | 4 | +0 | +0 | この機能情報構造体のレベル番号。 |
| dwNupOptions | DWORD | 4 | +4 | +4 | サポートするN-up(集約印刷)枚数を示すビットマスク。 |
| dwPageOrderFlags | DWORD | 4 | +8 | +8 | サポートするページ順序を示すビットフラグ(正順/逆順)。 |
| dwNumberOfCopies | DWORD | 4 | +12 | +12 | サポートする最大部数。 |
| dwDuplexHandlingCaps | DWORD | 4 | +16 | +16 | 両面印刷の処理能力を示すビットフラグ。 |
| dwNupDirectionCaps | DWORD | 4 | +20 | +20 | N-up配置方向の対応能力を示すビットフラグ。 |
| dwNupBorderCaps | DWORD | 4 | +24 | +24 | N-up境界線描画の対応能力を示すビットフラグ。 |
| dwBookletHandlingCaps | DWORD | 4 | +28 | +28 | ブックレット印刷の対応能力を示すビットフラグ。 |
| dwScalingCaps | DWORD | 4 | +32 | +32 | 拡大縮小の対応能力を示すビットフラグ。 |
各言語での定義
#include <windows.h>
// PRINTPROCESSOR_CAPS_2 (x64 36 / x86 36 バイト)
typedef struct PRINTPROCESSOR_CAPS_2 {
DWORD dwLevel;
DWORD dwNupOptions;
DWORD dwPageOrderFlags;
DWORD dwNumberOfCopies;
DWORD dwDuplexHandlingCaps;
DWORD dwNupDirectionCaps;
DWORD dwNupBorderCaps;
DWORD dwBookletHandlingCaps;
DWORD dwScalingCaps;
} PRINTPROCESSOR_CAPS_2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PRINTPROCESSOR_CAPS_2
{
public uint dwLevel;
public uint dwNupOptions;
public uint dwPageOrderFlags;
public uint dwNumberOfCopies;
public uint dwDuplexHandlingCaps;
public uint dwNupDirectionCaps;
public uint dwNupBorderCaps;
public uint dwBookletHandlingCaps;
public uint dwScalingCaps;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PRINTPROCESSOR_CAPS_2
Public dwLevel As UInteger
Public dwNupOptions As UInteger
Public dwPageOrderFlags As UInteger
Public dwNumberOfCopies As UInteger
Public dwDuplexHandlingCaps As UInteger
Public dwNupDirectionCaps As UInteger
Public dwNupBorderCaps As UInteger
Public dwBookletHandlingCaps As UInteger
Public dwScalingCaps As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PRINTPROCESSOR_CAPS_2(ctypes.Structure):
_fields_ = [
("dwLevel", wintypes.DWORD),
("dwNupOptions", wintypes.DWORD),
("dwPageOrderFlags", wintypes.DWORD),
("dwNumberOfCopies", wintypes.DWORD),
("dwDuplexHandlingCaps", wintypes.DWORD),
("dwNupDirectionCaps", wintypes.DWORD),
("dwNupBorderCaps", wintypes.DWORD),
("dwBookletHandlingCaps", wintypes.DWORD),
("dwScalingCaps", wintypes.DWORD),
]#[repr(C)]
pub struct PRINTPROCESSOR_CAPS_2 {
pub dwLevel: u32,
pub dwNupOptions: u32,
pub dwPageOrderFlags: u32,
pub dwNumberOfCopies: u32,
pub dwDuplexHandlingCaps: u32,
pub dwNupDirectionCaps: u32,
pub dwNupBorderCaps: u32,
pub dwBookletHandlingCaps: u32,
pub dwScalingCaps: u32,
}import "golang.org/x/sys/windows"
type PRINTPROCESSOR_CAPS_2 struct {
dwLevel uint32
dwNupOptions uint32
dwPageOrderFlags uint32
dwNumberOfCopies uint32
dwDuplexHandlingCaps uint32
dwNupDirectionCaps uint32
dwNupBorderCaps uint32
dwBookletHandlingCaps uint32
dwScalingCaps uint32
}type
PRINTPROCESSOR_CAPS_2 = record
dwLevel: DWORD;
dwNupOptions: DWORD;
dwPageOrderFlags: DWORD;
dwNumberOfCopies: DWORD;
dwDuplexHandlingCaps: DWORD;
dwNupDirectionCaps: DWORD;
dwNupBorderCaps: DWORD;
dwBookletHandlingCaps: DWORD;
dwScalingCaps: DWORD;
end;const PRINTPROCESSOR_CAPS_2 = extern struct {
dwLevel: u32,
dwNupOptions: u32,
dwPageOrderFlags: u32,
dwNumberOfCopies: u32,
dwDuplexHandlingCaps: u32,
dwNupDirectionCaps: u32,
dwNupBorderCaps: u32,
dwBookletHandlingCaps: u32,
dwScalingCaps: u32,
};type
PRINTPROCESSOR_CAPS_2 {.bycopy.} = object
dwLevel: uint32
dwNupOptions: uint32
dwPageOrderFlags: uint32
dwNumberOfCopies: uint32
dwDuplexHandlingCaps: uint32
dwNupDirectionCaps: uint32
dwNupBorderCaps: uint32
dwBookletHandlingCaps: uint32
dwScalingCaps: uint32struct PRINTPROCESSOR_CAPS_2
{
uint dwLevel;
uint dwNupOptions;
uint dwPageOrderFlags;
uint dwNumberOfCopies;
uint dwDuplexHandlingCaps;
uint dwNupDirectionCaps;
uint dwNupBorderCaps;
uint dwBookletHandlingCaps;
uint dwScalingCaps;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PRINTPROCESSOR_CAPS_2 サイズ: 36 バイト(x64)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; dwLevel : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwNupOptions : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwPageOrderFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwNumberOfCopies : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwDuplexHandlingCaps : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwNupDirectionCaps : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwNupBorderCaps : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwBookletHandlingCaps : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwScalingCaps : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PRINTPROCESSOR_CAPS_2
#field int dwLevel
#field int dwNupOptions
#field int dwPageOrderFlags
#field int dwNumberOfCopies
#field int dwDuplexHandlingCaps
#field int dwNupDirectionCaps
#field int dwNupBorderCaps
#field int dwBookletHandlingCaps
#field int dwScalingCaps
#endstruct
stdim st, PRINTPROCESSOR_CAPS_2 ; NSTRUCT 変数を確保
st->dwLevel = 100
mes "dwLevel=" + st->dwLevel