ホーム › Globalization › MAPPING_SERVICE_INFO
MAPPING_SERVICE_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | UINT_PTR | 8/4 | +0 | +0 | この構造体のバイトサイズ。 |
| pszCopyright | LPWSTR | 8/4 | +8 | +4 | サービスの著作権表示文字列。 |
| wMajorVersion | WORD | 2 | +16 | +8 | サービスのメジャーバージョン。 |
| wMinorVersion | WORD | 2 | +18 | +10 | サービスのマイナーバージョン。 |
| wBuildVersion | WORD | 2 | +20 | +12 | サービスのビルドバージョン。 |
| wStepVersion | WORD | 2 | +22 | +14 | サービスのステップ(リビジョン)バージョン。 |
| dwInputContentTypesCount | DWORD | 4 | +24 | +16 | サポートする入力コンテンツタイプの数。 |
| prgInputContentTypes | LPWSTR* | 8/4 | +32 | +20 | 入力コンテンツタイプ文字列の配列。 |
| dwOutputContentTypesCount | DWORD | 4 | +40 | +24 | サポートする出力コンテンツタイプの数。 |
| prgOutputContentTypes | LPWSTR* | 8/4 | +48 | +28 | 出力コンテンツタイプ文字列の配列。 |
| dwInputLanguagesCount | DWORD | 4 | +56 | +32 | サポートする入力言語の数。 |
| prgInputLanguages | LPWSTR* | 8/4 | +64 | +36 | 入力言語タグ文字列の配列。 |
| dwOutputLanguagesCount | DWORD | 4 | +72 | +40 | サポートする出力言語の数。 |
| prgOutputLanguages | LPWSTR* | 8/4 | +80 | +44 | 出力言語タグ文字列の配列。 |
| dwInputScriptsCount | DWORD | 4 | +88 | +48 | サポートする入力スクリプトの数。 |
| prgInputScripts | LPWSTR* | 8/4 | +96 | +52 | 入力スクリプト名の配列。 |
| dwOutputScriptsCount | DWORD | 4 | +104 | +56 | サポートする出力スクリプトの数。 |
| prgOutputScripts | LPWSTR* | 8/4 | +112 | +60 | 出力スクリプト名の配列。 |
| guid | GUID | 16 | +120 | +64 | サービスを一意に識別するGUID。 |
| pszCategory | LPWSTR | 8/4 | +136 | +80 | サービスのカテゴリ文字列。 |
| pszDescription | LPWSTR | 8/4 | +144 | +84 | サービスの説明文字列。 |
| dwPrivateDataSize | DWORD | 4 | +152 | +88 | サービス固有のプライベートデータのバイトサイズ。 |
| pPrivateData | void* | 8/4 | +160 | +92 | サービス固有のプライベートデータへのポインタ。 |
| pContext | void* | 8/4 | +168 | +96 | サービスのコンテキストデータへのポインタ。 |
| _bitfield | DWORD | 4 | +176 | +100 | 各種フラグを格納するビットフィールド(IsOneToOneLanguageProvider等)。 |
各言語での定義
#include <windows.h>
// MAPPING_SERVICE_INFO (x64 184 / x86 104 バイト)
typedef struct MAPPING_SERVICE_INFO {
UINT_PTR Size;
LPWSTR pszCopyright;
WORD wMajorVersion;
WORD wMinorVersion;
WORD wBuildVersion;
WORD wStepVersion;
DWORD dwInputContentTypesCount;
LPWSTR* prgInputContentTypes;
DWORD dwOutputContentTypesCount;
LPWSTR* prgOutputContentTypes;
DWORD dwInputLanguagesCount;
LPWSTR* prgInputLanguages;
DWORD dwOutputLanguagesCount;
LPWSTR* prgOutputLanguages;
DWORD dwInputScriptsCount;
LPWSTR* prgInputScripts;
DWORD dwOutputScriptsCount;
LPWSTR* prgOutputScripts;
GUID guid;
LPWSTR pszCategory;
LPWSTR pszDescription;
DWORD dwPrivateDataSize;
void* pPrivateData;
void* pContext;
DWORD _bitfield;
} MAPPING_SERVICE_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MAPPING_SERVICE_INFO
{
public UIntPtr Size;
public IntPtr pszCopyright;
public ushort wMajorVersion;
public ushort wMinorVersion;
public ushort wBuildVersion;
public ushort wStepVersion;
public uint dwInputContentTypesCount;
public IntPtr prgInputContentTypes;
public uint dwOutputContentTypesCount;
public IntPtr prgOutputContentTypes;
public uint dwInputLanguagesCount;
public IntPtr prgInputLanguages;
public uint dwOutputLanguagesCount;
public IntPtr prgOutputLanguages;
public uint dwInputScriptsCount;
public IntPtr prgInputScripts;
public uint dwOutputScriptsCount;
public IntPtr prgOutputScripts;
public Guid guid;
public IntPtr pszCategory;
public IntPtr pszDescription;
public uint dwPrivateDataSize;
public IntPtr pPrivateData;
public IntPtr pContext;
public uint _bitfield;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MAPPING_SERVICE_INFO
Public Size As UIntPtr
Public pszCopyright As IntPtr
Public wMajorVersion As UShort
Public wMinorVersion As UShort
Public wBuildVersion As UShort
Public wStepVersion As UShort
Public dwInputContentTypesCount As UInteger
Public prgInputContentTypes As IntPtr
Public dwOutputContentTypesCount As UInteger
Public prgOutputContentTypes As IntPtr
Public dwInputLanguagesCount As UInteger
Public prgInputLanguages As IntPtr
Public dwOutputLanguagesCount As UInteger
Public prgOutputLanguages As IntPtr
Public dwInputScriptsCount As UInteger
Public prgInputScripts As IntPtr
Public dwOutputScriptsCount As UInteger
Public prgOutputScripts As IntPtr
Public guid As Guid
Public pszCategory As IntPtr
Public pszDescription As IntPtr
Public dwPrivateDataSize As UInteger
Public pPrivateData As IntPtr
Public pContext As IntPtr
Public _bitfield As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MAPPING_SERVICE_INFO(ctypes.Structure):
_fields_ = [
("Size", ctypes.c_size_t),
("pszCopyright", ctypes.c_void_p),
("wMajorVersion", ctypes.c_ushort),
("wMinorVersion", ctypes.c_ushort),
("wBuildVersion", ctypes.c_ushort),
("wStepVersion", ctypes.c_ushort),
("dwInputContentTypesCount", wintypes.DWORD),
("prgInputContentTypes", ctypes.c_void_p),
("dwOutputContentTypesCount", wintypes.DWORD),
("prgOutputContentTypes", ctypes.c_void_p),
("dwInputLanguagesCount", wintypes.DWORD),
("prgInputLanguages", ctypes.c_void_p),
("dwOutputLanguagesCount", wintypes.DWORD),
("prgOutputLanguages", ctypes.c_void_p),
("dwInputScriptsCount", wintypes.DWORD),
("prgInputScripts", ctypes.c_void_p),
("dwOutputScriptsCount", wintypes.DWORD),
("prgOutputScripts", ctypes.c_void_p),
("guid", GUID),
("pszCategory", ctypes.c_void_p),
("pszDescription", ctypes.c_void_p),
("dwPrivateDataSize", wintypes.DWORD),
("pPrivateData", ctypes.c_void_p),
("pContext", ctypes.c_void_p),
("_bitfield", wintypes.DWORD),
]#[repr(C)]
pub struct MAPPING_SERVICE_INFO {
pub Size: usize,
pub pszCopyright: *mut core::ffi::c_void,
pub wMajorVersion: u16,
pub wMinorVersion: u16,
pub wBuildVersion: u16,
pub wStepVersion: u16,
pub dwInputContentTypesCount: u32,
pub prgInputContentTypes: *mut core::ffi::c_void,
pub dwOutputContentTypesCount: u32,
pub prgOutputContentTypes: *mut core::ffi::c_void,
pub dwInputLanguagesCount: u32,
pub prgInputLanguages: *mut core::ffi::c_void,
pub dwOutputLanguagesCount: u32,
pub prgOutputLanguages: *mut core::ffi::c_void,
pub dwInputScriptsCount: u32,
pub prgInputScripts: *mut core::ffi::c_void,
pub dwOutputScriptsCount: u32,
pub prgOutputScripts: *mut core::ffi::c_void,
pub guid: GUID,
pub pszCategory: *mut core::ffi::c_void,
pub pszDescription: *mut core::ffi::c_void,
pub dwPrivateDataSize: u32,
pub pPrivateData: *mut core::ffi::c_void,
pub pContext: *mut core::ffi::c_void,
pub _bitfield: u32,
}import "golang.org/x/sys/windows"
type MAPPING_SERVICE_INFO struct {
Size uintptr
pszCopyright uintptr
wMajorVersion uint16
wMinorVersion uint16
wBuildVersion uint16
wStepVersion uint16
dwInputContentTypesCount uint32
prgInputContentTypes uintptr
dwOutputContentTypesCount uint32
prgOutputContentTypes uintptr
dwInputLanguagesCount uint32
prgInputLanguages uintptr
dwOutputLanguagesCount uint32
prgOutputLanguages uintptr
dwInputScriptsCount uint32
prgInputScripts uintptr
dwOutputScriptsCount uint32
prgOutputScripts uintptr
guid windows.GUID
pszCategory uintptr
pszDescription uintptr
dwPrivateDataSize uint32
pPrivateData uintptr
pContext uintptr
_bitfield uint32
}type
MAPPING_SERVICE_INFO = record
Size: NativeUInt;
pszCopyright: Pointer;
wMajorVersion: Word;
wMinorVersion: Word;
wBuildVersion: Word;
wStepVersion: Word;
dwInputContentTypesCount: DWORD;
prgInputContentTypes: Pointer;
dwOutputContentTypesCount: DWORD;
prgOutputContentTypes: Pointer;
dwInputLanguagesCount: DWORD;
prgInputLanguages: Pointer;
dwOutputLanguagesCount: DWORD;
prgOutputLanguages: Pointer;
dwInputScriptsCount: DWORD;
prgInputScripts: Pointer;
dwOutputScriptsCount: DWORD;
prgOutputScripts: Pointer;
guid: TGUID;
pszCategory: Pointer;
pszDescription: Pointer;
dwPrivateDataSize: DWORD;
pPrivateData: Pointer;
pContext: Pointer;
_bitfield: DWORD;
end;const MAPPING_SERVICE_INFO = extern struct {
Size: usize,
pszCopyright: ?*anyopaque,
wMajorVersion: u16,
wMinorVersion: u16,
wBuildVersion: u16,
wStepVersion: u16,
dwInputContentTypesCount: u32,
prgInputContentTypes: ?*anyopaque,
dwOutputContentTypesCount: u32,
prgOutputContentTypes: ?*anyopaque,
dwInputLanguagesCount: u32,
prgInputLanguages: ?*anyopaque,
dwOutputLanguagesCount: u32,
prgOutputLanguages: ?*anyopaque,
dwInputScriptsCount: u32,
prgInputScripts: ?*anyopaque,
dwOutputScriptsCount: u32,
prgOutputScripts: ?*anyopaque,
guid: GUID,
pszCategory: ?*anyopaque,
pszDescription: ?*anyopaque,
dwPrivateDataSize: u32,
pPrivateData: ?*anyopaque,
pContext: ?*anyopaque,
_bitfield: u32,
};type
MAPPING_SERVICE_INFO {.bycopy.} = object
Size: uint
pszCopyright: pointer
wMajorVersion: uint16
wMinorVersion: uint16
wBuildVersion: uint16
wStepVersion: uint16
dwInputContentTypesCount: uint32
prgInputContentTypes: pointer
dwOutputContentTypesCount: uint32
prgOutputContentTypes: pointer
dwInputLanguagesCount: uint32
prgInputLanguages: pointer
dwOutputLanguagesCount: uint32
prgOutputLanguages: pointer
dwInputScriptsCount: uint32
prgInputScripts: pointer
dwOutputScriptsCount: uint32
prgOutputScripts: pointer
guid: GUID
pszCategory: pointer
pszDescription: pointer
dwPrivateDataSize: uint32
pPrivateData: pointer
pContext: pointer
_bitfield: uint32struct MAPPING_SERVICE_INFO
{
size_t Size;
void* pszCopyright;
ushort wMajorVersion;
ushort wMinorVersion;
ushort wBuildVersion;
ushort wStepVersion;
uint dwInputContentTypesCount;
void* prgInputContentTypes;
uint dwOutputContentTypesCount;
void* prgOutputContentTypes;
uint dwInputLanguagesCount;
void* prgInputLanguages;
uint dwOutputLanguagesCount;
void* prgOutputLanguages;
uint dwInputScriptsCount;
void* prgInputScripts;
uint dwOutputScriptsCount;
void* prgOutputScripts;
GUID guid;
void* pszCategory;
void* pszDescription;
uint dwPrivateDataSize;
void* pPrivateData;
void* pContext;
uint _bitfield;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MAPPING_SERVICE_INFO サイズ: 104 バイト(x86)
dim st, 26 ; 4byte整数×26(構造体サイズ 104 / 4 切り上げ)
; Size : UINT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; pszCopyright : LPWSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; wMajorVersion : WORD (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; wMinorVersion : WORD (+10, 2byte) wpoke st,10,値 / 値 = wpeek(st,10)
; wBuildVersion : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; wStepVersion : WORD (+14, 2byte) wpoke st,14,値 / 値 = wpeek(st,14)
; dwInputContentTypesCount : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; prgInputContentTypes : LPWSTR* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwOutputContentTypesCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; prgOutputContentTypes : LPWSTR* (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwInputLanguagesCount : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; prgInputLanguages : LPWSTR* (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwOutputLanguagesCount : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; prgOutputLanguages : LPWSTR* (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; dwInputScriptsCount : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; prgInputScripts : LPWSTR* (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; dwOutputScriptsCount : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; prgOutputScripts : LPWSTR* (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; guid : GUID (+64, 16byte) varptr(st)+64 を基点に操作(16byte:入れ子/配列)
; pszCategory : LPWSTR (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; pszDescription : LPWSTR (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; dwPrivateDataSize : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; pPrivateData : void* (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; pContext : void* (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; _bitfield : DWORD (+100, 4byte) st.25 = 値 / 値 = st.25 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MAPPING_SERVICE_INFO サイズ: 184 バイト(x64)
dim st, 46 ; 4byte整数×46(構造体サイズ 184 / 4 切り上げ)
; Size : UINT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pszCopyright : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; wMajorVersion : WORD (+16, 2byte) wpoke st,16,値 / 値 = wpeek(st,16)
; wMinorVersion : WORD (+18, 2byte) wpoke st,18,値 / 値 = wpeek(st,18)
; wBuildVersion : WORD (+20, 2byte) wpoke st,20,値 / 値 = wpeek(st,20)
; wStepVersion : WORD (+22, 2byte) wpoke st,22,値 / 値 = wpeek(st,22)
; dwInputContentTypesCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; prgInputContentTypes : LPWSTR* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; dwOutputContentTypesCount : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; prgOutputContentTypes : LPWSTR* (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; dwInputLanguagesCount : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; prgInputLanguages : LPWSTR* (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; dwOutputLanguagesCount : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; prgOutputLanguages : LPWSTR* (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; dwInputScriptsCount : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; prgInputScripts : LPWSTR* (+96, 8byte) qpoke st,96,値 / qpeek(st,96) ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; dwOutputScriptsCount : DWORD (+104, 4byte) st.26 = 値 / 値 = st.26 (lpoke/lpeek も可)
; prgOutputScripts : LPWSTR* (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; guid : GUID (+120, 16byte) varptr(st)+120 を基点に操作(16byte:入れ子/配列)
; pszCategory : LPWSTR (+136, 8byte) qpoke st,136,値 / qpeek(st,136) ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; pszDescription : LPWSTR (+144, 8byte) qpoke st,144,値 / qpeek(st,144) ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; dwPrivateDataSize : DWORD (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; pPrivateData : void* (+160, 8byte) qpoke st,160,値 / qpeek(st,160) ※IronHSPのみ。3.7/3.8は lpoke st,160,下位 : lpoke st,164,上位
; pContext : void* (+168, 8byte) qpoke st,168,値 / qpeek(st,168) ※IronHSPのみ。3.7/3.8は lpoke st,168,下位 : lpoke st,172,上位
; _bitfield : DWORD (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global MAPPING_SERVICE_INFO
#field intptr Size
#field intptr pszCopyright
#field short wMajorVersion
#field short wMinorVersion
#field short wBuildVersion
#field short wStepVersion
#field int dwInputContentTypesCount
#field intptr prgInputContentTypes
#field int dwOutputContentTypesCount
#field intptr prgOutputContentTypes
#field int dwInputLanguagesCount
#field intptr prgInputLanguages
#field int dwOutputLanguagesCount
#field intptr prgOutputLanguages
#field int dwInputScriptsCount
#field intptr prgInputScripts
#field int dwOutputScriptsCount
#field intptr prgOutputScripts
#field GUID guid
#field intptr pszCategory
#field intptr pszDescription
#field int dwPrivateDataSize
#field intptr pPrivateData
#field intptr pContext
#field int _bitfield
#endstruct
stdim st, MAPPING_SERVICE_INFO ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size