GDIINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ulVersion | DWORD | 4 | +0 | +0 | ドライバーのバージョン番号を指定します。ulVersion のバイト順序は次の形式になります。
上位 16 ビットは 0 に設定しなければなりません。ビット 8 から 15 は、そのドライバーが対象とする Microsoft オペレーティングシステムのバージョン番号を指定します。この範囲の上位 4 ビットはバージョンのメジャー番号を指定し、下位 4 ビットはマイナー番号を格納します。ulVersion の下位 8 ビットはディスプレイドライバーのバージョン番号を指定します。この値は、ディスプレイドライバーのバイナリファイルをリリースするたびに増分してください。 コントロールパネルの [画面] プログラムは、ulVersion に含まれるバージョン番号を、その他のドライバー固有の情報とともに表示します。 | ||||||||||||||||||||||||||||||
| ulTechnology | DWORD | 4 | +4 | +4 | デバイスの技術方式を指定します。このメンバーには、次の表に示す値のいずれかを指定できます。
| ||||||||||||||||||||||||||||||
| ulHorzSize | DWORD | 4 | +8 | +8 | 物理サーフェスの幅を指定します。正の値は幅の単位がミリメートルであることを示し、負の値は幅の単位がマイクロメートルであることを示します。 | ||||||||||||||||||||||||||||||
| ulVertSize | DWORD | 4 | +12 | +12 | 物理サーフェスの高さを指定します。正の値は高さの単位がミリメートルであることを示し、負の値は高さの単位がマイクロメートルであることを示します。 | ||||||||||||||||||||||||||||||
| ulHorzRes | DWORD | 4 | +16 | +16 | 物理サーフェス (ディスプレイデバイスの場合)、または印刷可能なサーフェス (プリンターの場合) の幅をピクセル単位で指定します。 ulDesktopHorzRes も参照してください。 | ||||||||||||||||||||||||||||||
| ulVertRes | DWORD | 4 | +20 | +20 | 物理サーフェス (ディスプレイデバイスの場合)、または印刷可能なサーフェス (プリンターの場合) の高さをピクセル単位で指定します。 | ||||||||||||||||||||||||||||||
| cBitsPixel | DWORD | 4 | +24 | +24 | 各カラープレーン内の隣接するビット数を指定します。1 ピクセルあたりの総ビット数は、cBitsPixel と cPlanes の積になります。 | ||||||||||||||||||||||||||||||
| cPlanes | DWORD | 4 | +28 | +28 | カラープレーンの数を指定します。 | ||||||||||||||||||||||||||||||
| ulNumColors | DWORD | 4 | +32 | +32 | パレット方式のデバイスの場合、ulNumColors は既定のカラーパレット内のエントリ数を指定します。パレット方式でないデバイス (プリンターは含まれません) の場合、ulNumColors は -1 に設定されます。 | ||||||||||||||||||||||||||||||
| flRaster | DWORD | 4 | +36 | +36 | 予約済みであり、0 に設定したままにしなければなりません。 | ||||||||||||||||||||||||||||||
| ulLogPixelsX | DWORD | 4 | +40 | +40 | デバイスの幅方向の解像度を、1 インチあたりの論理ピクセル数で指定します。 プリンターの場合、このメンバーにはプリンターの解像度を dpi 単位で設定してください。 ディスプレイの場合、このメンバーは 96 に設定しなければなりません。 | ||||||||||||||||||||||||||||||
| ulLogPixelsY | DWORD | 4 | +44 | +44 | デバイスの高さ方向の解像度を、1 インチあたりの論理ピクセル数で指定します。 プリンターの場合、このメンバーにはプリンターの解像度を dpi 単位で設定してください。 ディスプレイの場合、このメンバーは 96 に設定しなければなりません。 | ||||||||||||||||||||||||||||||
| flTextCaps | DWORD | 4 | +48 | +48 | Windows 3.1 のテキスト機能を表すフラグを指定します。このメンバーにドライバーの TC_SCROLLBLT フラグが設定されている場合、コンソールが、ドライバー提供の DrvTextOut 関数を使用して画面全体を再描画することでテキストのスクロールを実行すべきであり、DrvBitBlt 関数や DrvCopyBits 関数を使用すべきでないことを示します。画面間のビットブロック転送が遅い場合、ドライバーはこのフラグを設定してください。このフラグが設定されていない場合、ドライバーは DrvBitBlt/DrvCopyBits を通じてコンソールがテキストのスクロールを実行することを暗黙的に要求していることになります。 | ||||||||||||||||||||||||||||||
| ulDACRed | DWORD | 4 | +52 | +52 | DACの赤チャネル分解能(ビット数)。 | ||||||||||||||||||||||||||||||
| ulDACGreen | DWORD | 4 | +56 | +56 | DACの緑チャネル分解能。 | ||||||||||||||||||||||||||||||
| ulDACBlue | DWORD | 4 | +60 | +60 | 指定された色に対するディスプレイの DAC ビット数を指定します。 | ||||||||||||||||||||||||||||||
| ulAspectX | DWORD | 4 | +64 | +64 | デバイスピクセルの相対的な幅を、1 から 1000 の範囲で指定します。 | ||||||||||||||||||||||||||||||
| ulAspectY | DWORD | 4 | +68 | +68 | デバイスピクセルの相対的な高さを、1 から 1000 の範囲で指定します。 | ||||||||||||||||||||||||||||||
| ulAspectXY | DWORD | 4 | +72 | +72 | ulAspectX と ulAspectY のそれぞれの二乗和の平方根を指定します。 | ||||||||||||||||||||||||||||||
| xStyleStep | INT | 4 | +76 | +76 | x 方向優位の線に対するスタイル送り量の分子 dx を指定します。詳細については、後述の 解説 セクションおよび Styled Cosmetic Lines を参照してください。 | ||||||||||||||||||||||||||||||
| yStyleStep | INT | 4 | +80 | +80 | y 方向優位の線に対するスタイル送り量の分子 dy を指定します。詳細については、後述の 解説 セクションおよび Styled Cosmetic Lines を参照してください。 | ||||||||||||||||||||||||||||||
| denStyleStep | INT | 4 | +84 | +84 | スタイル送り量の分母 D を指定します。詳細については、後述の 解説 セクションおよび Styled Cosmetic Lines を参照してください。 | ||||||||||||||||||||||||||||||
| ptlPhysOffset | POINTL | 8 | +88 | +88 | サーフェスの書き込み不可能なマージンのサイズをピクセル単位で格納する POINTL 構造体を指定します。 | ||||||||||||||||||||||||||||||
| szlPhysSize | SIZE | 8 | +96 | +96 | 書き込み不可能なマージンを含むサーフェス全体のサイズをピクセル単位で格納する SIZEL 構造体を指定します。SIZEL 構造体は SIZE 構造体と同一です。 | ||||||||||||||||||||||||||||||
| ulNumPalReg | DWORD | 4 | +104 | +104 | インデックス方式のデバイスにおけるパレットレジスタの数を指定します。 | ||||||||||||||||||||||||||||||
| ciDevice | COLORINFO | 120 | +108 | +108 | デバイスの色を CIE 座標空間で定義する COLORINFO 構造体です。 | ||||||||||||||||||||||||||||||
| ulDevicePelsDPI | DWORD | 4 | +228 | +228 | プリンターの場合、ピクセルが重なりや間隔なしに並べて配置されたと仮定したときの、1 インチあたりのピクセル数 (ドット数、またはノズル数) を指定します。たとえばピクセルのサイズが 0.001 インチであれば、この値は 1 を 0.001 で割った値になります。このメンバーが 0 の場合、GDI のハーフトーン処理は、すべてのピクセルが重なりなく連続しているという前提でこの数値を計算します。 ほとんどのプリンターでは物理的なドットサイズが実測のドットサイズよりも大きいため、GDI はこの値を使用して、セルサイズ (パターンサイズ) に基づいて何個の物理ドットを配置できるかを近似します。次に対数回帰を行い、最も線形性が高くなる状態、すなわち重なり合ったデバイスピクセルの被覆 (ドットゲイン) を最適化するために最良の被覆となるドットの配置位置を決定します。 ディスプレイの場合、このメンバーは 0 に設定してください。 | ||||||||||||||||||||||||||||||
| ulPrimaryOrder | DWORD | 4 | +232 | +232 | ハーフトーン出力に対する、デバイスの原色のビット順序またはプレーン番号を指定します。このメンバーには、次の表に示す値のいずれかを指定できます。
| ||||||||||||||||||||||||||||||
| ulHTPatternSize | DWORD | 4 | +236 | +236 | ハーフトーンパターンのサイズを指定します。AxBM で終わる値は、AxB パターンの変種です。つまり、SIZEAxB と SIZE_AxB_M は、A x B のパターン内でどのピクセルを点灯させるかが異なります。このメンバーには次の値のいずれかを指定できます。
| ||||||||||||||||||||||||||||||
| ulHTOutputFormat | DWORD | 4 | +240 | +240 | ハーフトーンに適した出力形式を指定します。HT_FORMAT_4BPP は全強度の 8 色のみを使用しますが、HT_FORMATP_IRGB は半強度の色を含む 16 色すべてを使用します。HT_FORMAT_16BPP では 5 x 5 x 5 形式 (1 色あたり 5 ビット) が使用されるものと想定されます。このメンバーには次の値のいずれかを指定できます。 | ||||||||||||||||||||||||||||||
| flHTFlags | DWORD | 4 | +244 | +244 | デバイスを記述するフラグの組み合わせを指定します。これらのフラグはハーフトーン処理に必要です。このメンバーには次の値の組み合わせを指定できます。
| ||||||||||||||||||||||||||||||
| ulVRefresh | DWORD | 4 | +248 | +248 | 現在の表示モードにおけるビデオのリフレッシュレートです。これは、現在のモードのリフレッシュレートとしてミニポートドライバーが返した値です。 コントロールパネルの [画面] プログラムは、ulVRefresh メンバーに含まれるリフレッシュレートを表示します。 | ||||||||||||||||||||||||||||||
| ulBltAlignment | DWORD | 4 | +252 | +252 | このメンバーは、デバイスへのビットブロック転送に適した x 方向のアラインメントを示します。値が 0 の場合はビットブロック転送がアクセラレートされていることを示し、それ以外の非負の値はビットブロック転送がアクセラレートされていないことを示すとともに、推奨される水平方向のアラインメントをピクセルの倍数で示します。 この値は、ウィンドウ位置の既定のアラインメントを決定するためにシステムによって使用され、またセットアップ時のフルドラッグの初期既定値を設定するためにも使用されます。値が 0 の場合はフルドラッグを既定でオンにすべきであることを示し、0 以外の値はフルドラッグを既定でオフにすべきであることを示します。 | ||||||||||||||||||||||||||||||
| ulPanningHorzRes | DWORD | 4 | +256 | +256 | パンニング時の横解像度。 | ||||||||||||||||||||||||||||||
| ulPanningVertRes | DWORD | 4 | +260 | +260 | ドライバーはこのメンバーを無視し、0 で初期化されたままにしてください。 | ||||||||||||||||||||||||||||||
| xPanningAlignment | DWORD | 4 | +264 | +264 | パンニングの水平アライメント。 | ||||||||||||||||||||||||||||||
| yPanningAlignment | DWORD | 4 | +268 | +268 | ドライバーはこのメンバーを無視し、0 で初期化されたままにしてください。 | ||||||||||||||||||||||||||||||
| cxHTPat | DWORD | 4 | +272 | +272 | ハーフトーンパターンの幅。 | ||||||||||||||||||||||||||||||
| cyHTPat | DWORD | 4 | +276 | +276 | ユーザーが指定したハーフトーンディザリングパターンの幅と高さを、それぞれピクセル単位で指定します。cxHTPat の値は HT_USERPAT_CX_MIN から HT_USERPAT_CX_MAX までの範囲 (両端を含む) でなければなりません。cyHTPat の値は HT_USERPAT_CY_MIN から HT_USERPAT_CY_MAX までの範囲 (両端を含む) でなければなりません。これらの定数は winddi.h で定義されています。詳細については、後述の 解説 セクションを参照してください。 | ||||||||||||||||||||||||||||||
| pHTPatA | BYTE* | 8/4 | +280 | +280 | ハーフトーンパターンAへのバイトポインタ。 | ||||||||||||||||||||||||||||||
| pHTPatB | BYTE* | 8/4 | +288 | +284 | ハーフトーンパターンBへのバイトポインタ。 | ||||||||||||||||||||||||||||||
| pHTPatC | BYTE* | 8/4 | +296 | +288 | ulPrimaryOrder メンバーの PRIMARY_ORDER_XXX 値で定義される原色 A、B、C それぞれに対応する、ユーザー定義のハーフトーンディザリングパターンを指すポインターです。各ディザリングパターンは、cxHTPat x cyHTPat のサイズを持つ有効な 2 次元バイト配列でなければなりません。詳細については、後述の 解説 セクションを参照してください。 | ||||||||||||||||||||||||||||||
| flShadeBlend | DWORD | 4 | +304 | +292 | デバイスのシェーディングおよびブレンディング機能を示すフラグの集合を指定します。ディスプレイドライバーはこのメンバーを無視し、0 に設定したままにしてください。プリンタードライバーの場合、ドライバーがこのメンバーに設定した値は、アプリケーションが GetDeviceCaps(hdc, SHADEBLENDCAPS) を呼び出したときに GDI が報告する値になります。GetDeviceCaps 関数については、Microsoft Windows SDK のドキュメントで説明されています。 | ||||||||||||||||||||||||||||||
| ulPhysicalPixelCharacteristics | DWORD | 4 | +308 | +296 | ディスプレイデバイス上でピクセルを構成する色フラグメントの配置方法を指定します。ディスプレイデバイス上の色フラグメントは、フレームバッファー 内の RGB の並び順とはまったく独立に、RGB 順または BGR 順で配置できます。色フラグメントは、1 行内のすべてのフラグメントが同じ色となる水平ストライプ状に構成できます。あるいは、1 列内のすべてのフラグメントが同じ色となる垂直ストライプ状に構成することもできます。垂直ストライプは、各ピクセルについて 1 行内に実質的に 3 つの独立したフラグメントを提供し、水平方向のサブピクセル解像度をより高くできるため推奨されます。 ulPhysicalPixelCharacteristics メンバーは、次の表に示す値のいずれかに設定しなければなりません。
| ||||||||||||||||||||||||||||||
| ulPhysicalPixelGamma | DWORD | 4 | +312 | +300 | ディスプレイデバイスのガンマを指定します。このメンバーには、物理ピクセルのガンマを 1000 倍した値、または次のいずれかの値を設定してください。たとえば、ガンマ値 2.2 は 2200 として表されます。
|
公式ドキュメント
GDIINFO 構造体は、指定されたデバイスのグラフィックス機能を記述します。
解説(Remarks)
GDI は、ドライバー提供の DrvEnablePDEV 関数を呼び出す前に、この構造体を 0 で初期化します。
xStyleStep、yStyleStep、denStyleStep の各メンバーは、コスメティック線の各ピクセルを描画する際に線スタイルをどのように進めるかを定義します。1 ピクセルごとにスタイル上を進む量は、その線が x スタイルか y スタイルかによって決まる分数として定義されます。線が x スタイルの場合、x 方向に 1 ピクセル進むごとにスタイルは dx/D の分数分だけ進みます。そうでない場合は、y 方向に 1 ピクセル進むごとにスタイルが dy/D だけ進みます。
定義済みの線スタイル PS_DOT のドットは、それぞれ長さ 1 単位です。ドライバーが xStyleStep を 1、denStyleStep を 5 と定義した場合、水平方向の点線は 5 ピクセルのオンと 5 ピクセルのオフの繰り返しになります。
これら 3 つの数値は、対応するケイパビリティメンバーが LONG 値であっても、それぞれ 65536 未満でなければなりません。これらのスタイルステップは、線内のドットやダッシュが出力デバイス上で見栄えのよいサイズになるようドライバーが定義します。単純でないアスペクト比を補正するために、水平方向と垂直方向のステップは異なる値にできます。たとえば、ピクセルの高さが幅より 33 パーセント大きい EGA ディスプレイでは、次のように設定できます。
pdevcaps->xStyleStep = 3; // For an EGA
pdevcaps->yStyleStep = 4;
pdevcaps->denStyleStep = 12;
この場合、1 ピクセルごとにスタイルが 3/12 すなわち 1/4 ずつ進むため、水平方向の点線は 4 ピクセルのオンと 4 ピクセルのオフになります。垂直方向の点線は 3 ピクセルのオンと 3 ピクセルのオフになります。
上の例のように、x と y のスタイルステップがいずれもスタイルの分母を割り切れる場合、スタイル付きの線はより美しく表示されます。これにより、ダッシュやドットの長さが常に一定になります。
GDI がこの情報を必要とするのは、そのビットマップ関数がデバイス自身のサーフェス上での動作を正確に再現できるようにするためです。アプリケーションはこの情報を参照して、スタイル付きの線でどのピクセルが点灯するかを正確に判断できます。Styled Cosmetic Lines も参照してください。
ハーフトーン関連のメンバーである cxHTPat、cyHTPat、pHTPatA、pHTPatB、pHTPatC は、OEM の Unidrv レンダリングプラグインにおいて、1 色または 3 色から成るカスタムのハーフトーンパターンを定義するために使用できます。これらのメンバーは、ulHTPatternSize メンバーが HT_PATSIZE_USER に設定されている場合にのみ参照されます。この場合、OEM はこれらのメンバーを使用して、リソースファイルに格納されたデータ、または OEM のカスタマイズモジュールが生成したデータに基づくカスタムのハーフトーンパターンを定義できます。cxHTPat および cyHTPat メンバーは、3 つの 2 次元ハーフトーンパターン配列それぞれのサイズを定義します。pHTPatA、pHTPatB、pHTPatC の各メンバーは、各色に対応するパターン配列を指します。パターン配列を 1 つだけ使用する場合は、pHTPatA、pHTPatB、 pHTPatC がすべてその配列を指します。
ハーフトーンディザリングパターン内の特定位置にある各バイトのしきい値は、対応する出力プレーン上の位置のピクセルをオンにするかオフにするかを決定します。パターン配列内の特定位置のしきい値が 0 の場合、対応するピクセル位置は無視される (黒になる) ことを示します。1 から 255 のしきい値は、ディザリングパターンに 255 段階のグレーを与えます。出力プレーン内のピクセル値がその位置のしきい値以上であれば、そのピクセルはオンになります。ピクセル値が対応するしきい値未満の場合、出力プレーン内でそのピクセルはオフになります。詳細については、Customizing Microsoft's Printer Drivers の Customized Halftoning を参照してください。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// POINTL (x64 8 / x86 8 バイト)
typedef struct POINTL {
INT x;
INT y;
} POINTL;
// SIZE (x64 8 / x86 8 バイト)
typedef struct SIZE {
INT cx;
INT cy;
} SIZE;
// CIECHROMA (x64 12 / x86 12 バイト)
typedef struct CIECHROMA {
INT x;
INT y;
INT Y;
} CIECHROMA;
// COLORINFO (x64 120 / x86 120 バイト)
typedef struct COLORINFO {
CIECHROMA Red;
CIECHROMA Green;
CIECHROMA Blue;
CIECHROMA Cyan;
CIECHROMA Magenta;
CIECHROMA Yellow;
CIECHROMA AlignmentWhite;
INT RedGamma;
INT GreenGamma;
INT BlueGamma;
INT MagentaInCyanDye;
INT YellowInCyanDye;
INT CyanInMagentaDye;
INT YellowInMagentaDye;
INT CyanInYellowDye;
INT MagentaInYellowDye;
} COLORINFO;
// GDIINFO (x64 320 / x86 304 バイト)
typedef struct GDIINFO {
DWORD ulVersion;
DWORD ulTechnology;
DWORD ulHorzSize;
DWORD ulVertSize;
DWORD ulHorzRes;
DWORD ulVertRes;
DWORD cBitsPixel;
DWORD cPlanes;
DWORD ulNumColors;
DWORD flRaster;
DWORD ulLogPixelsX;
DWORD ulLogPixelsY;
DWORD flTextCaps;
DWORD ulDACRed;
DWORD ulDACGreen;
DWORD ulDACBlue;
DWORD ulAspectX;
DWORD ulAspectY;
DWORD ulAspectXY;
INT xStyleStep;
INT yStyleStep;
INT denStyleStep;
POINTL ptlPhysOffset;
SIZE szlPhysSize;
DWORD ulNumPalReg;
COLORINFO ciDevice;
DWORD ulDevicePelsDPI;
DWORD ulPrimaryOrder;
DWORD ulHTPatternSize;
DWORD ulHTOutputFormat;
DWORD flHTFlags;
DWORD ulVRefresh;
DWORD ulBltAlignment;
DWORD ulPanningHorzRes;
DWORD ulPanningVertRes;
DWORD xPanningAlignment;
DWORD yPanningAlignment;
DWORD cxHTPat;
DWORD cyHTPat;
BYTE* pHTPatA;
BYTE* pHTPatB;
BYTE* pHTPatC;
DWORD flShadeBlend;
DWORD ulPhysicalPixelCharacteristics;
DWORD ulPhysicalPixelGamma;
} GDIINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct POINTL
{
public int x;
public int y;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIZE
{
public int cx;
public int cy;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CIECHROMA
{
public int x;
public int y;
public int Y;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct COLORINFO
{
public CIECHROMA Red;
public CIECHROMA Green;
public CIECHROMA Blue;
public CIECHROMA Cyan;
public CIECHROMA Magenta;
public CIECHROMA Yellow;
public CIECHROMA AlignmentWhite;
public int RedGamma;
public int GreenGamma;
public int BlueGamma;
public int MagentaInCyanDye;
public int YellowInCyanDye;
public int CyanInMagentaDye;
public int YellowInMagentaDye;
public int CyanInYellowDye;
public int MagentaInYellowDye;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GDIINFO
{
public uint ulVersion;
public uint ulTechnology;
public uint ulHorzSize;
public uint ulVertSize;
public uint ulHorzRes;
public uint ulVertRes;
public uint cBitsPixel;
public uint cPlanes;
public uint ulNumColors;
public uint flRaster;
public uint ulLogPixelsX;
public uint ulLogPixelsY;
public uint flTextCaps;
public uint ulDACRed;
public uint ulDACGreen;
public uint ulDACBlue;
public uint ulAspectX;
public uint ulAspectY;
public uint ulAspectXY;
public int xStyleStep;
public int yStyleStep;
public int denStyleStep;
public POINTL ptlPhysOffset;
public SIZE szlPhysSize;
public uint ulNumPalReg;
public COLORINFO ciDevice;
public uint ulDevicePelsDPI;
public uint ulPrimaryOrder;
public uint ulHTPatternSize;
public uint ulHTOutputFormat;
public uint flHTFlags;
public uint ulVRefresh;
public uint ulBltAlignment;
public uint ulPanningHorzRes;
public uint ulPanningVertRes;
public uint xPanningAlignment;
public uint yPanningAlignment;
public uint cxHTPat;
public uint cyHTPat;
public IntPtr pHTPatA;
public IntPtr pHTPatB;
public IntPtr pHTPatC;
public uint flShadeBlend;
public uint ulPhysicalPixelCharacteristics;
public uint ulPhysicalPixelGamma;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure POINTL
Public x As Integer
Public y As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SIZE
Public cx As Integer
Public cy As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CIECHROMA
Public x As Integer
Public y As Integer
Public Y As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure COLORINFO
Public Red As CIECHROMA
Public Green As CIECHROMA
Public Blue As CIECHROMA
Public Cyan As CIECHROMA
Public Magenta As CIECHROMA
Public Yellow As CIECHROMA
Public AlignmentWhite As CIECHROMA
Public RedGamma As Integer
Public GreenGamma As Integer
Public BlueGamma As Integer
Public MagentaInCyanDye As Integer
Public YellowInCyanDye As Integer
Public CyanInMagentaDye As Integer
Public YellowInMagentaDye As Integer
Public CyanInYellowDye As Integer
Public MagentaInYellowDye As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure GDIINFO
Public ulVersion As UInteger
Public ulTechnology As UInteger
Public ulHorzSize As UInteger
Public ulVertSize As UInteger
Public ulHorzRes As UInteger
Public ulVertRes As UInteger
Public cBitsPixel As UInteger
Public cPlanes As UInteger
Public ulNumColors As UInteger
Public flRaster As UInteger
Public ulLogPixelsX As UInteger
Public ulLogPixelsY As UInteger
Public flTextCaps As UInteger
Public ulDACRed As UInteger
Public ulDACGreen As UInteger
Public ulDACBlue As UInteger
Public ulAspectX As UInteger
Public ulAspectY As UInteger
Public ulAspectXY As UInteger
Public xStyleStep As Integer
Public yStyleStep As Integer
Public denStyleStep As Integer
Public ptlPhysOffset As POINTL
Public szlPhysSize As SIZE
Public ulNumPalReg As UInteger
Public ciDevice As COLORINFO
Public ulDevicePelsDPI As UInteger
Public ulPrimaryOrder As UInteger
Public ulHTPatternSize As UInteger
Public ulHTOutputFormat As UInteger
Public flHTFlags As UInteger
Public ulVRefresh As UInteger
Public ulBltAlignment As UInteger
Public ulPanningHorzRes As UInteger
Public ulPanningVertRes As UInteger
Public xPanningAlignment As UInteger
Public yPanningAlignment As UInteger
Public cxHTPat As UInteger
Public cyHTPat As UInteger
Public pHTPatA As IntPtr
Public pHTPatB As IntPtr
Public pHTPatC As IntPtr
Public flShadeBlend As UInteger
Public ulPhysicalPixelCharacteristics As UInteger
Public ulPhysicalPixelGamma As UInteger
End Structureimport ctypes
from ctypes import wintypes
class POINTL(ctypes.Structure):
_fields_ = [
("x", ctypes.c_int),
("y", ctypes.c_int),
]
class SIZE(ctypes.Structure):
_fields_ = [
("cx", ctypes.c_int),
("cy", ctypes.c_int),
]
class CIECHROMA(ctypes.Structure):
_fields_ = [
("x", ctypes.c_int),
("y", ctypes.c_int),
("Y", ctypes.c_int),
]
class COLORINFO(ctypes.Structure):
_fields_ = [
("Red", CIECHROMA),
("Green", CIECHROMA),
("Blue", CIECHROMA),
("Cyan", CIECHROMA),
("Magenta", CIECHROMA),
("Yellow", CIECHROMA),
("AlignmentWhite", CIECHROMA),
("RedGamma", ctypes.c_int),
("GreenGamma", ctypes.c_int),
("BlueGamma", ctypes.c_int),
("MagentaInCyanDye", ctypes.c_int),
("YellowInCyanDye", ctypes.c_int),
("CyanInMagentaDye", ctypes.c_int),
("YellowInMagentaDye", ctypes.c_int),
("CyanInYellowDye", ctypes.c_int),
("MagentaInYellowDye", ctypes.c_int),
]
class GDIINFO(ctypes.Structure):
_fields_ = [
("ulVersion", wintypes.DWORD),
("ulTechnology", wintypes.DWORD),
("ulHorzSize", wintypes.DWORD),
("ulVertSize", wintypes.DWORD),
("ulHorzRes", wintypes.DWORD),
("ulVertRes", wintypes.DWORD),
("cBitsPixel", wintypes.DWORD),
("cPlanes", wintypes.DWORD),
("ulNumColors", wintypes.DWORD),
("flRaster", wintypes.DWORD),
("ulLogPixelsX", wintypes.DWORD),
("ulLogPixelsY", wintypes.DWORD),
("flTextCaps", wintypes.DWORD),
("ulDACRed", wintypes.DWORD),
("ulDACGreen", wintypes.DWORD),
("ulDACBlue", wintypes.DWORD),
("ulAspectX", wintypes.DWORD),
("ulAspectY", wintypes.DWORD),
("ulAspectXY", wintypes.DWORD),
("xStyleStep", ctypes.c_int),
("yStyleStep", ctypes.c_int),
("denStyleStep", ctypes.c_int),
("ptlPhysOffset", POINTL),
("szlPhysSize", SIZE),
("ulNumPalReg", wintypes.DWORD),
("ciDevice", COLORINFO),
("ulDevicePelsDPI", wintypes.DWORD),
("ulPrimaryOrder", wintypes.DWORD),
("ulHTPatternSize", wintypes.DWORD),
("ulHTOutputFormat", wintypes.DWORD),
("flHTFlags", wintypes.DWORD),
("ulVRefresh", wintypes.DWORD),
("ulBltAlignment", wintypes.DWORD),
("ulPanningHorzRes", wintypes.DWORD),
("ulPanningVertRes", wintypes.DWORD),
("xPanningAlignment", wintypes.DWORD),
("yPanningAlignment", wintypes.DWORD),
("cxHTPat", wintypes.DWORD),
("cyHTPat", wintypes.DWORD),
("pHTPatA", ctypes.c_void_p),
("pHTPatB", ctypes.c_void_p),
("pHTPatC", ctypes.c_void_p),
("flShadeBlend", wintypes.DWORD),
("ulPhysicalPixelCharacteristics", wintypes.DWORD),
("ulPhysicalPixelGamma", wintypes.DWORD),
]#[repr(C)]
pub struct POINTL {
pub x: i32,
pub y: i32,
}
#[repr(C)]
pub struct SIZE {
pub cx: i32,
pub cy: i32,
}
#[repr(C)]
pub struct CIECHROMA {
pub x: i32,
pub y: i32,
pub Y: i32,
}
#[repr(C)]
pub struct COLORINFO {
pub Red: CIECHROMA,
pub Green: CIECHROMA,
pub Blue: CIECHROMA,
pub Cyan: CIECHROMA,
pub Magenta: CIECHROMA,
pub Yellow: CIECHROMA,
pub AlignmentWhite: CIECHROMA,
pub RedGamma: i32,
pub GreenGamma: i32,
pub BlueGamma: i32,
pub MagentaInCyanDye: i32,
pub YellowInCyanDye: i32,
pub CyanInMagentaDye: i32,
pub YellowInMagentaDye: i32,
pub CyanInYellowDye: i32,
pub MagentaInYellowDye: i32,
}
#[repr(C)]
pub struct GDIINFO {
pub ulVersion: u32,
pub ulTechnology: u32,
pub ulHorzSize: u32,
pub ulVertSize: u32,
pub ulHorzRes: u32,
pub ulVertRes: u32,
pub cBitsPixel: u32,
pub cPlanes: u32,
pub ulNumColors: u32,
pub flRaster: u32,
pub ulLogPixelsX: u32,
pub ulLogPixelsY: u32,
pub flTextCaps: u32,
pub ulDACRed: u32,
pub ulDACGreen: u32,
pub ulDACBlue: u32,
pub ulAspectX: u32,
pub ulAspectY: u32,
pub ulAspectXY: u32,
pub xStyleStep: i32,
pub yStyleStep: i32,
pub denStyleStep: i32,
pub ptlPhysOffset: POINTL,
pub szlPhysSize: SIZE,
pub ulNumPalReg: u32,
pub ciDevice: COLORINFO,
pub ulDevicePelsDPI: u32,
pub ulPrimaryOrder: u32,
pub ulHTPatternSize: u32,
pub ulHTOutputFormat: u32,
pub flHTFlags: u32,
pub ulVRefresh: u32,
pub ulBltAlignment: u32,
pub ulPanningHorzRes: u32,
pub ulPanningVertRes: u32,
pub xPanningAlignment: u32,
pub yPanningAlignment: u32,
pub cxHTPat: u32,
pub cyHTPat: u32,
pub pHTPatA: *mut core::ffi::c_void,
pub pHTPatB: *mut core::ffi::c_void,
pub pHTPatC: *mut core::ffi::c_void,
pub flShadeBlend: u32,
pub ulPhysicalPixelCharacteristics: u32,
pub ulPhysicalPixelGamma: u32,
}import "golang.org/x/sys/windows"
type POINTL struct {
x int32
y int32
}
type SIZE struct {
cx int32
cy int32
}
type CIECHROMA struct {
x int32
y int32
Y int32
}
type COLORINFO struct {
Red CIECHROMA
Green CIECHROMA
Blue CIECHROMA
Cyan CIECHROMA
Magenta CIECHROMA
Yellow CIECHROMA
AlignmentWhite CIECHROMA
RedGamma int32
GreenGamma int32
BlueGamma int32
MagentaInCyanDye int32
YellowInCyanDye int32
CyanInMagentaDye int32
YellowInMagentaDye int32
CyanInYellowDye int32
MagentaInYellowDye int32
}
type GDIINFO struct {
ulVersion uint32
ulTechnology uint32
ulHorzSize uint32
ulVertSize uint32
ulHorzRes uint32
ulVertRes uint32
cBitsPixel uint32
cPlanes uint32
ulNumColors uint32
flRaster uint32
ulLogPixelsX uint32
ulLogPixelsY uint32
flTextCaps uint32
ulDACRed uint32
ulDACGreen uint32
ulDACBlue uint32
ulAspectX uint32
ulAspectY uint32
ulAspectXY uint32
xStyleStep int32
yStyleStep int32
denStyleStep int32
ptlPhysOffset POINTL
szlPhysSize SIZE
ulNumPalReg uint32
ciDevice COLORINFO
ulDevicePelsDPI uint32
ulPrimaryOrder uint32
ulHTPatternSize uint32
ulHTOutputFormat uint32
flHTFlags uint32
ulVRefresh uint32
ulBltAlignment uint32
ulPanningHorzRes uint32
ulPanningVertRes uint32
xPanningAlignment uint32
yPanningAlignment uint32
cxHTPat uint32
cyHTPat uint32
pHTPatA uintptr
pHTPatB uintptr
pHTPatC uintptr
flShadeBlend uint32
ulPhysicalPixelCharacteristics uint32
ulPhysicalPixelGamma uint32
}type
POINTL = record
x: Integer;
y: Integer;
end;
SIZE = record
cx: Integer;
cy: Integer;
end;
CIECHROMA = record
x: Integer;
y: Integer;
Y: Integer;
end;
COLORINFO = record
Red: CIECHROMA;
Green: CIECHROMA;
Blue: CIECHROMA;
Cyan: CIECHROMA;
Magenta: CIECHROMA;
Yellow: CIECHROMA;
AlignmentWhite: CIECHROMA;
RedGamma: Integer;
GreenGamma: Integer;
BlueGamma: Integer;
MagentaInCyanDye: Integer;
YellowInCyanDye: Integer;
CyanInMagentaDye: Integer;
YellowInMagentaDye: Integer;
CyanInYellowDye: Integer;
MagentaInYellowDye: Integer;
end;
GDIINFO = record
ulVersion: DWORD;
ulTechnology: DWORD;
ulHorzSize: DWORD;
ulVertSize: DWORD;
ulHorzRes: DWORD;
ulVertRes: DWORD;
cBitsPixel: DWORD;
cPlanes: DWORD;
ulNumColors: DWORD;
flRaster: DWORD;
ulLogPixelsX: DWORD;
ulLogPixelsY: DWORD;
flTextCaps: DWORD;
ulDACRed: DWORD;
ulDACGreen: DWORD;
ulDACBlue: DWORD;
ulAspectX: DWORD;
ulAspectY: DWORD;
ulAspectXY: DWORD;
xStyleStep: Integer;
yStyleStep: Integer;
denStyleStep: Integer;
ptlPhysOffset: POINTL;
szlPhysSize: SIZE;
ulNumPalReg: DWORD;
ciDevice: COLORINFO;
ulDevicePelsDPI: DWORD;
ulPrimaryOrder: DWORD;
ulHTPatternSize: DWORD;
ulHTOutputFormat: DWORD;
flHTFlags: DWORD;
ulVRefresh: DWORD;
ulBltAlignment: DWORD;
ulPanningHorzRes: DWORD;
ulPanningVertRes: DWORD;
xPanningAlignment: DWORD;
yPanningAlignment: DWORD;
cxHTPat: DWORD;
cyHTPat: DWORD;
pHTPatA: Pointer;
pHTPatB: Pointer;
pHTPatC: Pointer;
flShadeBlend: DWORD;
ulPhysicalPixelCharacteristics: DWORD;
ulPhysicalPixelGamma: DWORD;
end;const POINTL = extern struct {
x: i32,
y: i32,
};
const SIZE = extern struct {
cx: i32,
cy: i32,
};
const CIECHROMA = extern struct {
x: i32,
y: i32,
Y: i32,
};
const COLORINFO = extern struct {
Red: CIECHROMA,
Green: CIECHROMA,
Blue: CIECHROMA,
Cyan: CIECHROMA,
Magenta: CIECHROMA,
Yellow: CIECHROMA,
AlignmentWhite: CIECHROMA,
RedGamma: i32,
GreenGamma: i32,
BlueGamma: i32,
MagentaInCyanDye: i32,
YellowInCyanDye: i32,
CyanInMagentaDye: i32,
YellowInMagentaDye: i32,
CyanInYellowDye: i32,
MagentaInYellowDye: i32,
};
const GDIINFO = extern struct {
ulVersion: u32,
ulTechnology: u32,
ulHorzSize: u32,
ulVertSize: u32,
ulHorzRes: u32,
ulVertRes: u32,
cBitsPixel: u32,
cPlanes: u32,
ulNumColors: u32,
flRaster: u32,
ulLogPixelsX: u32,
ulLogPixelsY: u32,
flTextCaps: u32,
ulDACRed: u32,
ulDACGreen: u32,
ulDACBlue: u32,
ulAspectX: u32,
ulAspectY: u32,
ulAspectXY: u32,
xStyleStep: i32,
yStyleStep: i32,
denStyleStep: i32,
ptlPhysOffset: POINTL,
szlPhysSize: SIZE,
ulNumPalReg: u32,
ciDevice: COLORINFO,
ulDevicePelsDPI: u32,
ulPrimaryOrder: u32,
ulHTPatternSize: u32,
ulHTOutputFormat: u32,
flHTFlags: u32,
ulVRefresh: u32,
ulBltAlignment: u32,
ulPanningHorzRes: u32,
ulPanningVertRes: u32,
xPanningAlignment: u32,
yPanningAlignment: u32,
cxHTPat: u32,
cyHTPat: u32,
pHTPatA: ?*anyopaque,
pHTPatB: ?*anyopaque,
pHTPatC: ?*anyopaque,
flShadeBlend: u32,
ulPhysicalPixelCharacteristics: u32,
ulPhysicalPixelGamma: u32,
};type
POINTL {.bycopy.} = object
x: int32
y: int32
SIZE {.bycopy.} = object
cx: int32
cy: int32
CIECHROMA {.bycopy.} = object
x: int32
y: int32
Y: int32
COLORINFO {.bycopy.} = object
Red: CIECHROMA
Green: CIECHROMA
Blue: CIECHROMA
Cyan: CIECHROMA
Magenta: CIECHROMA
Yellow: CIECHROMA
AlignmentWhite: CIECHROMA
RedGamma: int32
GreenGamma: int32
BlueGamma: int32
MagentaInCyanDye: int32
YellowInCyanDye: int32
CyanInMagentaDye: int32
YellowInMagentaDye: int32
CyanInYellowDye: int32
MagentaInYellowDye: int32
GDIINFO {.bycopy.} = object
ulVersion: uint32
ulTechnology: uint32
ulHorzSize: uint32
ulVertSize: uint32
ulHorzRes: uint32
ulVertRes: uint32
cBitsPixel: uint32
cPlanes: uint32
ulNumColors: uint32
flRaster: uint32
ulLogPixelsX: uint32
ulLogPixelsY: uint32
flTextCaps: uint32
ulDACRed: uint32
ulDACGreen: uint32
ulDACBlue: uint32
ulAspectX: uint32
ulAspectY: uint32
ulAspectXY: uint32
xStyleStep: int32
yStyleStep: int32
denStyleStep: int32
ptlPhysOffset: POINTL
szlPhysSize: SIZE
ulNumPalReg: uint32
ciDevice: COLORINFO
ulDevicePelsDPI: uint32
ulPrimaryOrder: uint32
ulHTPatternSize: uint32
ulHTOutputFormat: uint32
flHTFlags: uint32
ulVRefresh: uint32
ulBltAlignment: uint32
ulPanningHorzRes: uint32
ulPanningVertRes: uint32
xPanningAlignment: uint32
yPanningAlignment: uint32
cxHTPat: uint32
cyHTPat: uint32
pHTPatA: pointer
pHTPatB: pointer
pHTPatC: pointer
flShadeBlend: uint32
ulPhysicalPixelCharacteristics: uint32
ulPhysicalPixelGamma: uint32struct POINTL
{
int x;
int y;
}
struct SIZE
{
int cx;
int cy;
}
struct CIECHROMA
{
int x;
int y;
int Y;
}
struct COLORINFO
{
CIECHROMA Red;
CIECHROMA Green;
CIECHROMA Blue;
CIECHROMA Cyan;
CIECHROMA Magenta;
CIECHROMA Yellow;
CIECHROMA AlignmentWhite;
int RedGamma;
int GreenGamma;
int BlueGamma;
int MagentaInCyanDye;
int YellowInCyanDye;
int CyanInMagentaDye;
int YellowInMagentaDye;
int CyanInYellowDye;
int MagentaInYellowDye;
}
struct GDIINFO
{
uint ulVersion;
uint ulTechnology;
uint ulHorzSize;
uint ulVertSize;
uint ulHorzRes;
uint ulVertRes;
uint cBitsPixel;
uint cPlanes;
uint ulNumColors;
uint flRaster;
uint ulLogPixelsX;
uint ulLogPixelsY;
uint flTextCaps;
uint ulDACRed;
uint ulDACGreen;
uint ulDACBlue;
uint ulAspectX;
uint ulAspectY;
uint ulAspectXY;
int xStyleStep;
int yStyleStep;
int denStyleStep;
POINTL ptlPhysOffset;
SIZE szlPhysSize;
uint ulNumPalReg;
COLORINFO ciDevice;
uint ulDevicePelsDPI;
uint ulPrimaryOrder;
uint ulHTPatternSize;
uint ulHTOutputFormat;
uint flHTFlags;
uint ulVRefresh;
uint ulBltAlignment;
uint ulPanningHorzRes;
uint ulPanningVertRes;
uint xPanningAlignment;
uint yPanningAlignment;
uint cxHTPat;
uint cyHTPat;
void* pHTPatA;
void* pHTPatB;
void* pHTPatC;
uint flShadeBlend;
uint ulPhysicalPixelCharacteristics;
uint ulPhysicalPixelGamma;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; GDIINFO サイズ: 304 バイト(x86)
dim st, 76 ; 4byte整数×76(構造体サイズ 304 / 4 切り上げ)
; ulVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ulTechnology : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ulHorzSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ulVertSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulHorzRes : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ulVertRes : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; cBitsPixel : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cPlanes : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ulNumColors : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; flRaster : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ulLogPixelsX : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ulLogPixelsY : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; flTextCaps : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ulDACRed : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ulDACGreen : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ulDACBlue : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ulAspectX : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ulAspectY : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ulAspectXY : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; xStyleStep : INT (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; yStyleStep : INT (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; denStyleStep : INT (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ptlPhysOffset : POINTL (+88, 8byte) varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; szlPhysSize : SIZE (+96, 8byte) varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; ulNumPalReg : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; ciDevice : COLORINFO (+108, 120byte) varptr(st)+108 を基点に操作(120byte:入れ子/配列)
; ulDevicePelsDPI : DWORD (+228, 4byte) st.57 = 値 / 値 = st.57 (lpoke/lpeek も可)
; ulPrimaryOrder : DWORD (+232, 4byte) st.58 = 値 / 値 = st.58 (lpoke/lpeek も可)
; ulHTPatternSize : DWORD (+236, 4byte) st.59 = 値 / 値 = st.59 (lpoke/lpeek も可)
; ulHTOutputFormat : DWORD (+240, 4byte) st.60 = 値 / 値 = st.60 (lpoke/lpeek も可)
; flHTFlags : DWORD (+244, 4byte) st.61 = 値 / 値 = st.61 (lpoke/lpeek も可)
; ulVRefresh : DWORD (+248, 4byte) st.62 = 値 / 値 = st.62 (lpoke/lpeek も可)
; ulBltAlignment : DWORD (+252, 4byte) st.63 = 値 / 値 = st.63 (lpoke/lpeek も可)
; ulPanningHorzRes : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; ulPanningVertRes : DWORD (+260, 4byte) st.65 = 値 / 値 = st.65 (lpoke/lpeek も可)
; xPanningAlignment : DWORD (+264, 4byte) st.66 = 値 / 値 = st.66 (lpoke/lpeek も可)
; yPanningAlignment : DWORD (+268, 4byte) st.67 = 値 / 値 = st.67 (lpoke/lpeek も可)
; cxHTPat : DWORD (+272, 4byte) st.68 = 値 / 値 = st.68 (lpoke/lpeek も可)
; cyHTPat : DWORD (+276, 4byte) st.69 = 値 / 値 = st.69 (lpoke/lpeek も可)
; pHTPatA : BYTE* (+280, 4byte) st.70 = 値 / 値 = st.70 (lpoke/lpeek も可)
; pHTPatB : BYTE* (+284, 4byte) st.71 = 値 / 値 = st.71 (lpoke/lpeek も可)
; pHTPatC : BYTE* (+288, 4byte) st.72 = 値 / 値 = st.72 (lpoke/lpeek も可)
; flShadeBlend : DWORD (+292, 4byte) st.73 = 値 / 値 = st.73 (lpoke/lpeek も可)
; ulPhysicalPixelCharacteristics : DWORD (+296, 4byte) st.74 = 値 / 値 = st.74 (lpoke/lpeek も可)
; ulPhysicalPixelGamma : DWORD (+300, 4byte) st.75 = 値 / 値 = st.75 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; GDIINFO サイズ: 320 バイト(x64)
dim st, 80 ; 4byte整数×80(構造体サイズ 320 / 4 切り上げ)
; ulVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ulTechnology : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ulHorzSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ulVertSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulHorzRes : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ulVertRes : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; cBitsPixel : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cPlanes : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ulNumColors : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; flRaster : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ulLogPixelsX : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ulLogPixelsY : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; flTextCaps : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ulDACRed : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ulDACGreen : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ulDACBlue : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ulAspectX : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ulAspectY : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ulAspectXY : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; xStyleStep : INT (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; yStyleStep : INT (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; denStyleStep : INT (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ptlPhysOffset : POINTL (+88, 8byte) varptr(st)+88 を基点に操作(8byte:入れ子/配列)
; szlPhysSize : SIZE (+96, 8byte) varptr(st)+96 を基点に操作(8byte:入れ子/配列)
; ulNumPalReg : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; ciDevice : COLORINFO (+108, 120byte) varptr(st)+108 を基点に操作(120byte:入れ子/配列)
; ulDevicePelsDPI : DWORD (+228, 4byte) st.57 = 値 / 値 = st.57 (lpoke/lpeek も可)
; ulPrimaryOrder : DWORD (+232, 4byte) st.58 = 値 / 値 = st.58 (lpoke/lpeek も可)
; ulHTPatternSize : DWORD (+236, 4byte) st.59 = 値 / 値 = st.59 (lpoke/lpeek も可)
; ulHTOutputFormat : DWORD (+240, 4byte) st.60 = 値 / 値 = st.60 (lpoke/lpeek も可)
; flHTFlags : DWORD (+244, 4byte) st.61 = 値 / 値 = st.61 (lpoke/lpeek も可)
; ulVRefresh : DWORD (+248, 4byte) st.62 = 値 / 値 = st.62 (lpoke/lpeek も可)
; ulBltAlignment : DWORD (+252, 4byte) st.63 = 値 / 値 = st.63 (lpoke/lpeek も可)
; ulPanningHorzRes : DWORD (+256, 4byte) st.64 = 値 / 値 = st.64 (lpoke/lpeek も可)
; ulPanningVertRes : DWORD (+260, 4byte) st.65 = 値 / 値 = st.65 (lpoke/lpeek も可)
; xPanningAlignment : DWORD (+264, 4byte) st.66 = 値 / 値 = st.66 (lpoke/lpeek も可)
; yPanningAlignment : DWORD (+268, 4byte) st.67 = 値 / 値 = st.67 (lpoke/lpeek も可)
; cxHTPat : DWORD (+272, 4byte) st.68 = 値 / 値 = st.68 (lpoke/lpeek も可)
; cyHTPat : DWORD (+276, 4byte) st.69 = 値 / 値 = st.69 (lpoke/lpeek も可)
; pHTPatA : BYTE* (+280, 8byte) qpoke st,280,値 / qpeek(st,280) ※IronHSPのみ。3.7/3.8は lpoke st,280,下位 : lpoke st,284,上位
; pHTPatB : BYTE* (+288, 8byte) qpoke st,288,値 / qpeek(st,288) ※IronHSPのみ。3.7/3.8は lpoke st,288,下位 : lpoke st,292,上位
; pHTPatC : BYTE* (+296, 8byte) qpoke st,296,値 / qpeek(st,296) ※IronHSPのみ。3.7/3.8は lpoke st,296,下位 : lpoke st,300,上位
; flShadeBlend : DWORD (+304, 4byte) st.76 = 値 / 値 = st.76 (lpoke/lpeek も可)
; ulPhysicalPixelCharacteristics : DWORD (+308, 4byte) st.77 = 値 / 値 = st.77 (lpoke/lpeek も可)
; ulPhysicalPixelGamma : DWORD (+312, 4byte) st.78 = 値 / 値 = st.78 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global POINTL
#field int x
#field int y
#endstruct
#defstruct global SIZE
#field int cx
#field int cy
#endstruct
#defstruct global CIECHROMA
#field int x
#field int y
#field int Y
#endstruct
#defstruct global COLORINFO
#field CIECHROMA Red
#field CIECHROMA Green
#field CIECHROMA Blue
#field CIECHROMA Cyan
#field CIECHROMA Magenta
#field CIECHROMA Yellow
#field CIECHROMA AlignmentWhite
#field int RedGamma
#field int GreenGamma
#field int BlueGamma
#field int MagentaInCyanDye
#field int YellowInCyanDye
#field int CyanInMagentaDye
#field int YellowInMagentaDye
#field int CyanInYellowDye
#field int MagentaInYellowDye
#endstruct
#defstruct global GDIINFO
#field int ulVersion
#field int ulTechnology
#field int ulHorzSize
#field int ulVertSize
#field int ulHorzRes
#field int ulVertRes
#field int cBitsPixel
#field int cPlanes
#field int ulNumColors
#field int flRaster
#field int ulLogPixelsX
#field int ulLogPixelsY
#field int flTextCaps
#field int ulDACRed
#field int ulDACGreen
#field int ulDACBlue
#field int ulAspectX
#field int ulAspectY
#field int ulAspectXY
#field int xStyleStep
#field int yStyleStep
#field int denStyleStep
#field POINTL ptlPhysOffset
#field SIZE szlPhysSize
#field int ulNumPalReg
#field COLORINFO ciDevice
#field int ulDevicePelsDPI
#field int ulPrimaryOrder
#field int ulHTPatternSize
#field int ulHTOutputFormat
#field int flHTFlags
#field int ulVRefresh
#field int ulBltAlignment
#field int ulPanningHorzRes
#field int ulPanningVertRes
#field int xPanningAlignment
#field int yPanningAlignment
#field int cxHTPat
#field int cyHTPat
#field intptr pHTPatA
#field intptr pHTPatB
#field intptr pHTPatC
#field int flShadeBlend
#field int ulPhysicalPixelCharacteristics
#field int ulPhysicalPixelGamma
#endstruct
stdim st, GDIINFO ; NSTRUCT 変数を確保
st->ulVersion = 100
mes "ulVersion=" + st->ulVersion