ホーム › System.Wmi › SWbemAssocQueryInf
SWbemAssocQueryInf
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| m_uVersion | DWORD | 4 | +0 | +0 | この構造体のバージョン番号。 |
| m_uAnalysisType | DWORD | 4 | +4 | +4 | 解析の種類を示す値。 |
| m_uFeatureMask | DWORD | 4 | +8 | +8 | 検出された関連クエリ機能を示すビットマスク。 |
| m_pPath | IWbemPath* | 8/4 | +16 | +12 | 対象オブジェクトのパスを表すIWbemPathインターフェイスへのポインタ。 |
| m_pszPath | LPWSTR | 8/4 | +24 | +16 | 対象オブジェクトのパス文字列。NULL可。 |
| m_pszQueryText | LPWSTR | 8/4 | +32 | +20 | 元のクエリテキスト。 |
| m_pszResultClass | LPWSTR | 8/4 | +40 | +24 | ResultClass句で指定された結果クラス名。NULL可。 |
| m_pszAssocClass | LPWSTR | 8/4 | +48 | +28 | AssocClass句で指定された関連クラス名。NULL可。 |
| m_pszRole | LPWSTR | 8/4 | +56 | +32 | Role句で指定されたロール名。NULL可。 |
| m_pszResultRole | LPWSTR | 8/4 | +64 | +36 | ResultRole句で指定された結果ロール名。NULL可。 |
| m_pszRequiredQualifier | LPWSTR | 8/4 | +72 | +40 | RequiredQualifier句で指定された必須修飾子名。NULL可。 |
| m_pszRequiredAssocQualifier | LPWSTR | 8/4 | +80 | +44 | RequiredAssocQualifier句で指定された必須関連修飾子名。NULL可。 |
各言語での定義
#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