ホーム › System.ComponentServices › CLSIDDATA2
CLSIDDATA2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| m_clsid | GUID | 16 | +0 | +0 | 対象コンポーネントのクラスID(CLSID)。 |
| m_appid | GUID | 16 | +16 | +16 | コンポーネントが属するアプリケーションのID(GUID)。 |
| m_partid | GUID | 16 | +32 | +32 | コンポーネントが属するパーティションのID(GUID)。 |
| m_pwszAppName | LPWSTR | 8/4 | +48 | +48 | アプリケーション名(ワイド文字列)。 |
| m_pwszCtxName | LPWSTR | 8/4 | +56 | +52 | コンテキスト名(ワイド文字列)。 |
| m_eAppType | COMPLUS_APPTYPE | 4 | +64 | +56 | アプリケーションの種類を示すCOMPLUS_APPTYPE。 |
| m_cReferences | DWORD | 4 | +68 | +60 | 現在の参照数。 |
| m_cBound | DWORD | 4 | +72 | +64 | バインド済みオブジェクトの数。 |
| m_cPooled | DWORD | 4 | +76 | +68 | プール内に保持されているオブジェクト数。 |
| m_cInCall | DWORD | 4 | +80 | +72 | 現在呼び出し処理中のオブジェクト数。 |
| m_dwRespTime | DWORD | 4 | +84 | +76 | 平均応答時間(ミリ秒)。 |
| m_cCallsCompleted | DWORD | 4 | +88 | +80 | 完了した呼び出し回数。 |
| m_cCallsFailed | DWORD | 4 | +92 | +84 | 失敗した呼び出し回数。 |
各言語での定義
#include <windows.h>
// CLSIDDATA2 (x64 96 / x86 88 バイト)
typedef struct CLSIDDATA2 {
GUID m_clsid;
GUID m_appid;
GUID m_partid;
LPWSTR m_pwszAppName;
LPWSTR m_pwszCtxName;
COMPLUS_APPTYPE m_eAppType;
DWORD m_cReferences;
DWORD m_cBound;
DWORD m_cPooled;
DWORD m_cInCall;
DWORD m_dwRespTime;
DWORD m_cCallsCompleted;
DWORD m_cCallsFailed;
} CLSIDDATA2;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CLSIDDATA2
{
public Guid m_clsid;
public Guid m_appid;
public Guid m_partid;
public IntPtr m_pwszAppName;
public IntPtr m_pwszCtxName;
public int m_eAppType;
public uint m_cReferences;
public uint m_cBound;
public uint m_cPooled;
public uint m_cInCall;
public uint m_dwRespTime;
public uint m_cCallsCompleted;
public uint m_cCallsFailed;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CLSIDDATA2
Public m_clsid As Guid
Public m_appid As Guid
Public m_partid As Guid
Public m_pwszAppName As IntPtr
Public m_pwszCtxName As IntPtr
Public m_eAppType As Integer
Public m_cReferences As UInteger
Public m_cBound As UInteger
Public m_cPooled As UInteger
Public m_cInCall As UInteger
Public m_dwRespTime As UInteger
Public m_cCallsCompleted As UInteger
Public m_cCallsFailed As UInteger
End Structureimport ctypes
from ctypes import wintypes
class CLSIDDATA2(ctypes.Structure):
_fields_ = [
("m_clsid", GUID),
("m_appid", GUID),
("m_partid", GUID),
("m_pwszAppName", ctypes.c_void_p),
("m_pwszCtxName", ctypes.c_void_p),
("m_eAppType", ctypes.c_int),
("m_cReferences", wintypes.DWORD),
("m_cBound", wintypes.DWORD),
("m_cPooled", wintypes.DWORD),
("m_cInCall", wintypes.DWORD),
("m_dwRespTime", wintypes.DWORD),
("m_cCallsCompleted", wintypes.DWORD),
("m_cCallsFailed", wintypes.DWORD),
]#[repr(C)]
pub struct CLSIDDATA2 {
pub m_clsid: GUID,
pub m_appid: GUID,
pub m_partid: GUID,
pub m_pwszAppName: *mut core::ffi::c_void,
pub m_pwszCtxName: *mut core::ffi::c_void,
pub m_eAppType: i32,
pub m_cReferences: u32,
pub m_cBound: u32,
pub m_cPooled: u32,
pub m_cInCall: u32,
pub m_dwRespTime: u32,
pub m_cCallsCompleted: u32,
pub m_cCallsFailed: u32,
}import "golang.org/x/sys/windows"
type CLSIDDATA2 struct {
m_clsid windows.GUID
m_appid windows.GUID
m_partid windows.GUID
m_pwszAppName uintptr
m_pwszCtxName uintptr
m_eAppType int32
m_cReferences uint32
m_cBound uint32
m_cPooled uint32
m_cInCall uint32
m_dwRespTime uint32
m_cCallsCompleted uint32
m_cCallsFailed uint32
}type
CLSIDDATA2 = record
m_clsid: TGUID;
m_appid: TGUID;
m_partid: TGUID;
m_pwszAppName: Pointer;
m_pwszCtxName: Pointer;
m_eAppType: Integer;
m_cReferences: DWORD;
m_cBound: DWORD;
m_cPooled: DWORD;
m_cInCall: DWORD;
m_dwRespTime: DWORD;
m_cCallsCompleted: DWORD;
m_cCallsFailed: DWORD;
end;const CLSIDDATA2 = extern struct {
m_clsid: GUID,
m_appid: GUID,
m_partid: GUID,
m_pwszAppName: ?*anyopaque,
m_pwszCtxName: ?*anyopaque,
m_eAppType: i32,
m_cReferences: u32,
m_cBound: u32,
m_cPooled: u32,
m_cInCall: u32,
m_dwRespTime: u32,
m_cCallsCompleted: u32,
m_cCallsFailed: u32,
};type
CLSIDDATA2 {.bycopy.} = object
m_clsid: GUID
m_appid: GUID
m_partid: GUID
m_pwszAppName: pointer
m_pwszCtxName: pointer
m_eAppType: int32
m_cReferences: uint32
m_cBound: uint32
m_cPooled: uint32
m_cInCall: uint32
m_dwRespTime: uint32
m_cCallsCompleted: uint32
m_cCallsFailed: uint32struct CLSIDDATA2
{
GUID m_clsid;
GUID m_appid;
GUID m_partid;
void* m_pwszAppName;
void* m_pwszCtxName;
int m_eAppType;
uint m_cReferences;
uint m_cBound;
uint m_cPooled;
uint m_cInCall;
uint m_dwRespTime;
uint m_cCallsCompleted;
uint m_cCallsFailed;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; CLSIDDATA2 サイズ: 88 バイト(x86)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; m_clsid : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; m_appid : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; m_partid : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; m_pwszAppName : LPWSTR (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; m_pwszCtxName : LPWSTR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; m_eAppType : COMPLUS_APPTYPE (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; m_cReferences : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; m_cBound : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; m_cPooled : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; m_cInCall : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; m_dwRespTime : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; m_cCallsCompleted : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; m_cCallsFailed : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CLSIDDATA2 サイズ: 96 バイト(x64)
dim st, 24 ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; m_clsid : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; m_appid : GUID (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; m_partid : GUID (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; m_pwszAppName : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; m_pwszCtxName : LPWSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; m_eAppType : COMPLUS_APPTYPE (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; m_cReferences : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; m_cBound : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; m_cPooled : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; m_cInCall : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; m_dwRespTime : DWORD (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; m_cCallsCompleted : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; m_cCallsFailed : DWORD (+92, 4byte) st.23 = 値 / 値 = st.23 (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 CLSIDDATA2
#field GUID m_clsid
#field GUID m_appid
#field GUID m_partid
#field intptr m_pwszAppName
#field intptr m_pwszCtxName
#field int m_eAppType
#field int m_cReferences
#field int m_cBound
#field int m_cPooled
#field int m_cInCall
#field int m_dwRespTime
#field int m_cCallsCompleted
#field int m_cCallsFailed
#endstruct
stdim st, CLSIDDATA2 ; NSTRUCT 変数を確保
st->m_eAppType = 100
mes "m_eAppType=" + st->m_eAppType