ホーム › Devices.Fax › FAX_GLOBAL_ROUTING_INFOA
FAX_GLOBAL_ROUTING_INFOA
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| SizeOfStruct | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で示すDWORD。 |
| Priority | DWORD | 4 | +4 | +4 | このルーティング方式のグローバル優先順位を示すDWORD。 |
| Guid | LPSTR | 8/4 | +8 | +8 | ルーティング方式を識別するGUID文字列を指すANSI文字列。 |
| FriendlyName | LPSTR | 8/4 | +16 | +12 | ルーティング方式の表示名を指すANSI文字列。 |
| FunctionName | LPSTR | 8/4 | +24 | +16 | ルーティング処理を行う関数名を指すANSI文字列。 |
| ExtensionImageName | LPSTR | 8/4 | +32 | +20 | 拡張DLLのイメージ名を指すANSI文字列。 |
| ExtensionFriendlyName | LPSTR | 8/4 | +40 | +24 | 拡張の表示名を指すANSI文字列。 |
各言語での定義
#include <windows.h>
// FAX_GLOBAL_ROUTING_INFOA (x64 48 / x86 28 バイト)
typedef struct FAX_GLOBAL_ROUTING_INFOA {
DWORD SizeOfStruct;
DWORD Priority;
LPSTR Guid;
LPSTR FriendlyName;
LPSTR FunctionName;
LPSTR ExtensionImageName;
LPSTR ExtensionFriendlyName;
} FAX_GLOBAL_ROUTING_INFOA;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FAX_GLOBAL_ROUTING_INFOA
{
public uint SizeOfStruct;
public uint Priority;
public IntPtr Guid;
public IntPtr FriendlyName;
public IntPtr FunctionName;
public IntPtr ExtensionImageName;
public IntPtr ExtensionFriendlyName;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FAX_GLOBAL_ROUTING_INFOA
Public SizeOfStruct As UInteger
Public Priority As UInteger
Public Guid As IntPtr
Public FriendlyName As IntPtr
Public FunctionName As IntPtr
Public ExtensionImageName As IntPtr
Public ExtensionFriendlyName As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class FAX_GLOBAL_ROUTING_INFOA(ctypes.Structure):
_fields_ = [
("SizeOfStruct", wintypes.DWORD),
("Priority", wintypes.DWORD),
("Guid", ctypes.c_void_p),
("FriendlyName", ctypes.c_void_p),
("FunctionName", ctypes.c_void_p),
("ExtensionImageName", ctypes.c_void_p),
("ExtensionFriendlyName", ctypes.c_void_p),
]#[repr(C)]
pub struct FAX_GLOBAL_ROUTING_INFOA {
pub SizeOfStruct: u32,
pub Priority: u32,
pub Guid: *mut core::ffi::c_void,
pub FriendlyName: *mut core::ffi::c_void,
pub FunctionName: *mut core::ffi::c_void,
pub ExtensionImageName: *mut core::ffi::c_void,
pub ExtensionFriendlyName: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type FAX_GLOBAL_ROUTING_INFOA struct {
SizeOfStruct uint32
Priority uint32
Guid uintptr
FriendlyName uintptr
FunctionName uintptr
ExtensionImageName uintptr
ExtensionFriendlyName uintptr
}type
FAX_GLOBAL_ROUTING_INFOA = record
SizeOfStruct: DWORD;
Priority: DWORD;
Guid: Pointer;
FriendlyName: Pointer;
FunctionName: Pointer;
ExtensionImageName: Pointer;
ExtensionFriendlyName: Pointer;
end;const FAX_GLOBAL_ROUTING_INFOA = extern struct {
SizeOfStruct: u32,
Priority: u32,
Guid: ?*anyopaque,
FriendlyName: ?*anyopaque,
FunctionName: ?*anyopaque,
ExtensionImageName: ?*anyopaque,
ExtensionFriendlyName: ?*anyopaque,
};type
FAX_GLOBAL_ROUTING_INFOA {.bycopy.} = object
SizeOfStruct: uint32
Priority: uint32
Guid: pointer
FriendlyName: pointer
FunctionName: pointer
ExtensionImageName: pointer
ExtensionFriendlyName: pointerstruct FAX_GLOBAL_ROUTING_INFOA
{
uint SizeOfStruct;
uint Priority;
void* Guid;
void* FriendlyName;
void* FunctionName;
void* ExtensionImageName;
void* ExtensionFriendlyName;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FAX_GLOBAL_ROUTING_INFOA サイズ: 28 バイト(x86)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Priority : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Guid : LPSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; FriendlyName : LPSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; FunctionName : LPSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ExtensionImageName : LPSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ExtensionFriendlyName : LPSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FAX_GLOBAL_ROUTING_INFOA サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; SizeOfStruct : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Priority : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Guid : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; FriendlyName : LPSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; FunctionName : LPSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ExtensionImageName : LPSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ExtensionFriendlyName : LPSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FAX_GLOBAL_ROUTING_INFOA
#field int SizeOfStruct
#field int Priority
#field intptr Guid
#field intptr FriendlyName
#field intptr FunctionName
#field intptr ExtensionImageName
#field intptr ExtensionFriendlyName
#endstruct
stdim st, FAX_GLOBAL_ROUTING_INFOA ; NSTRUCT 変数を確保
st->SizeOfStruct = 100
mes "SizeOfStruct=" + st->SizeOfStruct