ホーム › System.ComponentServices › ComponentSummary
ComponentSummary
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ApplicationInstanceId | GUID | 16 | +0 | +0 | アプリケーションインスタンスのID(GUID)。 |
| PartitionId | GUID | 16 | +16 | +16 | コンポーネントが属するパーティションのID(GUID)。 |
| ApplicationId | GUID | 16 | +32 | +32 | コンポーネントが属するアプリケーションのID(GUID)。 |
| Clsid | GUID | 16 | +48 | +48 | コンポーネントのクラスID(CLSID)。 |
| ClassName | LPWSTR | 8/4 | +64 | +64 | コンポーネントのクラス名(ワイド文字列)。 |
| ApplicationName | LPWSTR | 8/4 | +72 | +68 | コンポーネントが属するアプリケーション名(ワイド文字列)。 |
各言語での定義
#include <windows.h>
// ComponentSummary (x64 80 / x86 72 バイト)
typedef struct ComponentSummary {
GUID ApplicationInstanceId;
GUID PartitionId;
GUID ApplicationId;
GUID Clsid;
LPWSTR ClassName;
LPWSTR ApplicationName;
} ComponentSummary;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ComponentSummary
{
public Guid ApplicationInstanceId;
public Guid PartitionId;
public Guid ApplicationId;
public Guid Clsid;
public IntPtr ClassName;
public IntPtr ApplicationName;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ComponentSummary
Public ApplicationInstanceId As Guid
Public PartitionId As Guid
Public ApplicationId As Guid
Public Clsid As Guid
Public ClassName As IntPtr
Public ApplicationName As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class ComponentSummary(ctypes.Structure):
_fields_ = [
("ApplicationInstanceId", GUID),
("PartitionId", GUID),
("ApplicationId", GUID),
("Clsid", GUID),
("ClassName", ctypes.c_void_p),
("ApplicationName", ctypes.c_void_p),
]#[repr(C)]
pub struct ComponentSummary {
pub ApplicationInstanceId: GUID,
pub PartitionId: GUID,
pub ApplicationId: GUID,
pub Clsid: GUID,
pub ClassName: *mut core::ffi::c_void,
pub ApplicationName: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type ComponentSummary struct {
ApplicationInstanceId windows.GUID
PartitionId windows.GUID
ApplicationId windows.GUID
Clsid windows.GUID
ClassName uintptr
ApplicationName uintptr
}type
ComponentSummary = record
ApplicationInstanceId: TGUID;
PartitionId: TGUID;
ApplicationId: TGUID;
Clsid: TGUID;
ClassName: Pointer;
ApplicationName: Pointer;
end;const ComponentSummary = extern struct {
ApplicationInstanceId: GUID,
PartitionId: GUID,
ApplicationId: GUID,
Clsid: GUID,
ClassName: ?*anyopaque,
ApplicationName: ?*anyopaque,
};type
ComponentSummary {.bycopy.} = object
ApplicationInstanceId: GUID
PartitionId: GUID
ApplicationId: GUID
Clsid: GUID
ClassName: pointer
ApplicationName: pointerstruct ComponentSummary
{
GUID ApplicationInstanceId;
GUID PartitionId;
GUID ApplicationId;
GUID Clsid;
void* ClassName;
void* ApplicationName;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; ComponentSummary サイズ: 72 バイト(x86)
dim st, 18 ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; ApplicationInstanceId : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; PartitionId : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ApplicationId : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; Clsid : GUID (+48, 16byte) varptr(st)+48 を基点に操作(16byte:入れ子/配列)
; ClassName : LPWSTR (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; ApplicationName : LPWSTR (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ComponentSummary サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; ApplicationInstanceId : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; PartitionId : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; ApplicationId : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; Clsid : GUID (+48, 16byte) varptr(st)+48 を基点に操作(16byte:入れ子/配列)
; ClassName : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ApplicationName : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ※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 ComponentSummary
#field GUID ApplicationInstanceId
#field GUID PartitionId
#field GUID ApplicationId
#field GUID Clsid
#field intptr ClassName
#field intptr ApplicationName
#endstruct
stdim st, ComponentSummary ; NSTRUCT 変数を確保