ホーム › System.ApplicationInstallationAndServicing › FUSION_INSTALL_REFERENCE
FUSION_INSTALL_REFERENCE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| dwFlags | DWORD | 4 | +4 | +4 | 参照に関するフラグ。現在は予約済みで0を指定する。 |
| guidScheme | GUID | 16 | +8 | +8 | インストール参照のスキームを識別するGUID。 |
| szIdentifier | LPWSTR | 8/4 | +24 | +24 | スキーム内で参照を一意に識別する文字列。 |
| szNonCannonicalData | LPWSTR | 8/4 | +32 | +28 | GACが解釈しない自由形式の追加データ文字列。NULL可。 |
各言語での定義
#include <windows.h>
// FUSION_INSTALL_REFERENCE (x64 40 / x86 32 バイト)
typedef struct FUSION_INSTALL_REFERENCE {
DWORD cbSize;
DWORD dwFlags;
GUID guidScheme;
LPWSTR szIdentifier;
LPWSTR szNonCannonicalData;
} FUSION_INSTALL_REFERENCE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FUSION_INSTALL_REFERENCE
{
public uint cbSize;
public uint dwFlags;
public Guid guidScheme;
public IntPtr szIdentifier;
public IntPtr szNonCannonicalData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FUSION_INSTALL_REFERENCE
Public cbSize As UInteger
Public dwFlags As UInteger
Public guidScheme As Guid
Public szIdentifier As IntPtr
Public szNonCannonicalData As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class FUSION_INSTALL_REFERENCE(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("dwFlags", wintypes.DWORD),
("guidScheme", GUID),
("szIdentifier", ctypes.c_void_p),
("szNonCannonicalData", ctypes.c_void_p),
]#[repr(C)]
pub struct FUSION_INSTALL_REFERENCE {
pub cbSize: u32,
pub dwFlags: u32,
pub guidScheme: GUID,
pub szIdentifier: *mut core::ffi::c_void,
pub szNonCannonicalData: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type FUSION_INSTALL_REFERENCE struct {
cbSize uint32
dwFlags uint32
guidScheme windows.GUID
szIdentifier uintptr
szNonCannonicalData uintptr
}type
FUSION_INSTALL_REFERENCE = record
cbSize: DWORD;
dwFlags: DWORD;
guidScheme: TGUID;
szIdentifier: Pointer;
szNonCannonicalData: Pointer;
end;const FUSION_INSTALL_REFERENCE = extern struct {
cbSize: u32,
dwFlags: u32,
guidScheme: GUID,
szIdentifier: ?*anyopaque,
szNonCannonicalData: ?*anyopaque,
};type
FUSION_INSTALL_REFERENCE {.bycopy.} = object
cbSize: uint32
dwFlags: uint32
guidScheme: GUID
szIdentifier: pointer
szNonCannonicalData: pointerstruct FUSION_INSTALL_REFERENCE
{
uint cbSize;
uint dwFlags;
GUID guidScheme;
void* szIdentifier;
void* szNonCannonicalData;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FUSION_INSTALL_REFERENCE サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; guidScheme : GUID (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; szIdentifier : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; szNonCannonicalData : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FUSION_INSTALL_REFERENCE サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; guidScheme : GUID (+8, 16byte) varptr(st)+8 を基点に操作(16byte:入れ子/配列)
; szIdentifier : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; szNonCannonicalData : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ※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 FUSION_INSTALL_REFERENCE
#field int cbSize
#field int dwFlags
#field GUID guidScheme
#field intptr szIdentifier
#field intptr szNonCannonicalData
#endstruct
stdim st, FUSION_INSTALL_REFERENCE ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize