ホーム › System.Wmi › SWbemAssocQueryInf
SWbemAssocQueryInf
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| m_uVersion | DWORD | 4 | +0 | +0 | 値は 2 でなければなりません。 |
| m_uAnalysisType | DWORD | 4 | +4 | +4 | 値は 2 でなければなりません。 |
| m_uFeatureMask | DWORD | 4 | +8 | +8 | クエリに含まれる機能を示すビット値です。 WMIQ_ASSOCQ_ASSOCIATORS (1 (0x1))クエリに Associators が存在します。 WMIQ_ASSOCQ_REFERENCES (2 (0x2))クエリに References が存在します。 WMIQ_ASSOCQ_RESULTCLASS (4 (0x4))クエリで結果クラスが指定されています。 WMIQ_ASSOCQ_ASSOCCLASS (8 (0x8))クエリで関連付けクラスが指定されています。 WMIQ_ASSOCQ_ROLE (16 (0x10))クエリでロールが指定されています。 WMIQ_ASSOCQ_RESULTROLE (32 (0x20))クエリで結果ロールが指定されています。 WMIQ_ASSOCQ_REQUIREDQUALIFIER (64 (0x40))クエリで必須の修飾子が指定されています。 WMIQ_ASSOCQ_REQUIREDASSOCQUALIFIER (128 (0x80))クエリで必須の関連付け修飾子が指定されています。 WMIQ_ASSOCQ_CLASSDEFONLY (256 (0x100))クエリはクラス定義のみを指定します。 WMIQ_ASSOCQ_KEYSONLY (512 (0x200))クエリに KEYSONLY キーワードが含まれています。 WMIQ_ASSOCQ_SCHEMAONLY (1024 (0x400))クエリはスキーマのみを返します。 WMIQ_ASSOCQ_CLASSREFSONLY (2048 (0x800))クエリはクラス参照のみを返します。 |
| m_pPath | IWbemPath* | 8/4 | +16 | +12 | IWbemPath オブジェクトへのポインターです。 |
| m_pszPath | LPWSTR | 8/4 | +24 | +16 | クエリで使用されたオブジェクトパスの文字列表現です。 |
| m_pszQueryText | LPWSTR | 8/4 | +32 | +20 | 元のクエリのテキストです。 |
| m_pszResultClass | LPWSTR | 8/4 | +40 | +24 | 結果クラスの文字列表現です。結果クラスが無い場合、このフィールドは NULL です。 |
| m_pszAssocClass | LPWSTR | 8/4 | +48 | +28 | 関連付けクラスの文字列表現です。結果クラスが無い場合、このフィールドは NULL です。 |
| m_pszRole | LPWSTR | 8/4 | +56 | +32 | ロールの文字列表現です。ロールが無い場合、このフィールドは NULL です。 |
| m_pszResultRole | LPWSTR | 8/4 | +64 | +36 | 結果ロールの文字列表現です。結果ロールが無い場合、このフィールドは NULL です。 |
| m_pszRequiredQualifier | LPWSTR | 8/4 | +72 | +40 | 必須の修飾子の文字列表現です。必須の修飾子が無い場合、このフィールドは NULL です。 |
| m_pszRequiredAssocQualifier | LPWSTR | 8/4 | +80 | +44 | 必須の関連付け修飾子のリストへのポインターです。 |
公式ドキュメント
SWbemAssocQueryInf 構造体は、WMIQ_ANALYSIS_ASSOC_QUERY 解析タイプを使用したときに IWbemQuery::GetAnalysis メソッドから得られる情報を格納します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// SWbemAssocQueryInf (x64 88 / x86 48 バイト)
typedef struct SWbemAssocQueryInf {
DWORD m_uVersion;
DWORD m_uAnalysisType;
DWORD m_uFeatureMask;
IWbemPath* m_pPath;
LPWSTR m_pszPath;
LPWSTR m_pszQueryText;
LPWSTR m_pszResultClass;
LPWSTR m_pszAssocClass;
LPWSTR m_pszRole;
LPWSTR m_pszResultRole;
LPWSTR m_pszRequiredQualifier;
LPWSTR m_pszRequiredAssocQualifier;
} SWbemAssocQueryInf;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SWbemAssocQueryInf
{
public uint m_uVersion;
public uint m_uAnalysisType;
public uint m_uFeatureMask;
public IntPtr m_pPath;
public IntPtr m_pszPath;
public IntPtr m_pszQueryText;
public IntPtr m_pszResultClass;
public IntPtr m_pszAssocClass;
public IntPtr m_pszRole;
public IntPtr m_pszResultRole;
public IntPtr m_pszRequiredQualifier;
public IntPtr m_pszRequiredAssocQualifier;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SWbemAssocQueryInf
Public m_uVersion As UInteger
Public m_uAnalysisType As UInteger
Public m_uFeatureMask As UInteger
Public m_pPath As IntPtr
Public m_pszPath As IntPtr
Public m_pszQueryText As IntPtr
Public m_pszResultClass As IntPtr
Public m_pszAssocClass As IntPtr
Public m_pszRole As IntPtr
Public m_pszResultRole As IntPtr
Public m_pszRequiredQualifier As IntPtr
Public m_pszRequiredAssocQualifier As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class SWbemAssocQueryInf(ctypes.Structure):
_fields_ = [
("m_uVersion", wintypes.DWORD),
("m_uAnalysisType", wintypes.DWORD),
("m_uFeatureMask", wintypes.DWORD),
("m_pPath", ctypes.c_void_p),
("m_pszPath", ctypes.c_void_p),
("m_pszQueryText", ctypes.c_void_p),
("m_pszResultClass", ctypes.c_void_p),
("m_pszAssocClass", ctypes.c_void_p),
("m_pszRole", ctypes.c_void_p),
("m_pszResultRole", ctypes.c_void_p),
("m_pszRequiredQualifier", ctypes.c_void_p),
("m_pszRequiredAssocQualifier", ctypes.c_void_p),
]#[repr(C)]
pub struct SWbemAssocQueryInf {
pub m_uVersion: u32,
pub m_uAnalysisType: u32,
pub m_uFeatureMask: u32,
pub m_pPath: *mut core::ffi::c_void,
pub m_pszPath: *mut core::ffi::c_void,
pub m_pszQueryText: *mut core::ffi::c_void,
pub m_pszResultClass: *mut core::ffi::c_void,
pub m_pszAssocClass: *mut core::ffi::c_void,
pub m_pszRole: *mut core::ffi::c_void,
pub m_pszResultRole: *mut core::ffi::c_void,
pub m_pszRequiredQualifier: *mut core::ffi::c_void,
pub m_pszRequiredAssocQualifier: *mut core::ffi::c_void,
}import "golang.org/x/sys/windows"
type SWbemAssocQueryInf struct {
m_uVersion uint32
m_uAnalysisType uint32
m_uFeatureMask uint32
m_pPath uintptr
m_pszPath uintptr
m_pszQueryText uintptr
m_pszResultClass uintptr
m_pszAssocClass uintptr
m_pszRole uintptr
m_pszResultRole uintptr
m_pszRequiredQualifier uintptr
m_pszRequiredAssocQualifier uintptr
}type
SWbemAssocQueryInf = record
m_uVersion: DWORD;
m_uAnalysisType: DWORD;
m_uFeatureMask: DWORD;
m_pPath: Pointer;
m_pszPath: Pointer;
m_pszQueryText: Pointer;
m_pszResultClass: Pointer;
m_pszAssocClass: Pointer;
m_pszRole: Pointer;
m_pszResultRole: Pointer;
m_pszRequiredQualifier: Pointer;
m_pszRequiredAssocQualifier: Pointer;
end;const SWbemAssocQueryInf = extern struct {
m_uVersion: u32,
m_uAnalysisType: u32,
m_uFeatureMask: u32,
m_pPath: ?*anyopaque,
m_pszPath: ?*anyopaque,
m_pszQueryText: ?*anyopaque,
m_pszResultClass: ?*anyopaque,
m_pszAssocClass: ?*anyopaque,
m_pszRole: ?*anyopaque,
m_pszResultRole: ?*anyopaque,
m_pszRequiredQualifier: ?*anyopaque,
m_pszRequiredAssocQualifier: ?*anyopaque,
};type
SWbemAssocQueryInf {.bycopy.} = object
m_uVersion: uint32
m_uAnalysisType: uint32
m_uFeatureMask: uint32
m_pPath: pointer
m_pszPath: pointer
m_pszQueryText: pointer
m_pszResultClass: pointer
m_pszAssocClass: pointer
m_pszRole: pointer
m_pszResultRole: pointer
m_pszRequiredQualifier: pointer
m_pszRequiredAssocQualifier: pointerstruct SWbemAssocQueryInf
{
uint m_uVersion;
uint m_uAnalysisType;
uint m_uFeatureMask;
void* m_pPath;
void* m_pszPath;
void* m_pszQueryText;
void* m_pszResultClass;
void* m_pszAssocClass;
void* m_pszRole;
void* m_pszResultRole;
void* m_pszRequiredQualifier;
void* m_pszRequiredAssocQualifier;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; SWbemAssocQueryInf サイズ: 48 バイト(x86)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; m_uVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; m_uAnalysisType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; m_uFeatureMask : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; m_pPath : IWbemPath* (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; m_pszPath : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; m_pszQueryText : LPWSTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; m_pszResultClass : LPWSTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; m_pszAssocClass : LPWSTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; m_pszRole : LPWSTR (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; m_pszResultRole : LPWSTR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; m_pszRequiredQualifier : LPWSTR (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; m_pszRequiredAssocQualifier : LPWSTR (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SWbemAssocQueryInf サイズ: 88 バイト(x64)
dim st, 22 ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; m_uVersion : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; m_uAnalysisType : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; m_uFeatureMask : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; m_pPath : IWbemPath* (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; m_pszPath : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; m_pszQueryText : LPWSTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; m_pszResultClass : LPWSTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; m_pszAssocClass : LPWSTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; m_pszRole : LPWSTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; m_pszResultRole : LPWSTR (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; m_pszRequiredQualifier : LPWSTR (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; m_pszRequiredAssocQualifier : LPWSTR (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SWbemAssocQueryInf
#field int m_uVersion
#field int m_uAnalysisType
#field int m_uFeatureMask
#field intptr m_pPath
#field intptr m_pszPath
#field intptr m_pszQueryText
#field intptr m_pszResultClass
#field intptr m_pszAssocClass
#field intptr m_pszRole
#field intptr m_pszResultRole
#field intptr m_pszRequiredQualifier
#field intptr m_pszRequiredAssocQualifier
#endstruct
stdim st, SWbemAssocQueryInf ; NSTRUCT 変数を確保
st->m_uVersion = 100
mes "m_uVersion=" + st->m_uVersion