ホーム › System.Wmi › MI_PropertySetFT
MI_PropertySetFT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| GetElementCount | INT_PTR | 8/4 | +0 | +0 | 指定されたプロパティ セット内の要素数を取得します。 MI_PropertySet_GetElementCount を参照してください。 |
| ContainsElement | INT_PTR | 8/4 | +8 | +4 | プロパティ リストに指定されたプロパティが含まれているかどうかを判定します。 MI_PropertySet_ContainsElement を参照してください。 |
| AddElement | INT_PTR | 8/4 | +16 | +8 | プロパティ リストに名前を追加します。 MI_PropertySet_AddElement を参照してください。 |
| GetElementAt | INT_PTR | 8/4 | +24 | +12 | 指定されたインデックスにあるプロパティ セットの要素を取得します。 MI_PropertySet_GetElementAt を参照してください。 |
| Clear | INT_PTR | 8/4 | +32 | +16 | プロパティ リストからすべての名前を削除します。 MI_PropertySet_Clear を参照してください。 |
| Destruct | INT_PTR | 8/4 | +40 | +20 | スタック上に構築された、指定のプロパティ リストを削除します。 MI_PropertySet_Destruct を参照してください。 |
| Delete | INT_PTR | 8/4 | +48 | +24 | ヒープ上に構築された、指定のプロパティ リストを削除します。 MI_PropertySet_Delete を参照してください。 |
| Clone | INT_PTR | 8/4 | +56 | +28 | 指定されたプロパティ セットのコピーをヒープ上に作成します。 MI_PropertySet_Clone を参照してください。 |
公式ドキュメント
<a href="/windows/desktop/api/mi/ns-mi-mi_propertyset">MI_PropertySet</a> 構造体で使用されるサポート構造体です。これらの構造体を操作するには、名前が "MI_PropertySet_" で始まる関数を使用します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// MI_PropertySetFT (x64 64 / x86 32 バイト)
typedef struct MI_PropertySetFT {
INT_PTR GetElementCount;
INT_PTR ContainsElement;
INT_PTR AddElement;
INT_PTR GetElementAt;
INT_PTR Clear;
INT_PTR Destruct;
INT_PTR Delete;
INT_PTR Clone;
} MI_PropertySetFT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MI_PropertySetFT
{
public IntPtr GetElementCount;
public IntPtr ContainsElement;
public IntPtr AddElement;
public IntPtr GetElementAt;
public IntPtr Clear;
public IntPtr Destruct;
public IntPtr Delete;
public IntPtr Clone;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MI_PropertySetFT
Public GetElementCount As IntPtr
Public ContainsElement As IntPtr
Public AddElement As IntPtr
Public GetElementAt As IntPtr
Public Clear As IntPtr
Public Destruct As IntPtr
Public Delete As IntPtr
Public Clone As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class MI_PropertySetFT(ctypes.Structure):
_fields_ = [
("GetElementCount", ctypes.c_ssize_t),
("ContainsElement", ctypes.c_ssize_t),
("AddElement", ctypes.c_ssize_t),
("GetElementAt", ctypes.c_ssize_t),
("Clear", ctypes.c_ssize_t),
("Destruct", ctypes.c_ssize_t),
("Delete", ctypes.c_ssize_t),
("Clone", ctypes.c_ssize_t),
]#[repr(C)]
pub struct MI_PropertySetFT {
pub GetElementCount: isize,
pub ContainsElement: isize,
pub AddElement: isize,
pub GetElementAt: isize,
pub Clear: isize,
pub Destruct: isize,
pub Delete: isize,
pub Clone: isize,
}import "golang.org/x/sys/windows"
type MI_PropertySetFT struct {
GetElementCount uintptr
ContainsElement uintptr
AddElement uintptr
GetElementAt uintptr
Clear uintptr
Destruct uintptr
Delete uintptr
Clone uintptr
}type
MI_PropertySetFT = record
GetElementCount: NativeInt;
ContainsElement: NativeInt;
AddElement: NativeInt;
GetElementAt: NativeInt;
Clear: NativeInt;
Destruct: NativeInt;
Delete: NativeInt;
Clone: NativeInt;
end;const MI_PropertySetFT = extern struct {
GetElementCount: isize,
ContainsElement: isize,
AddElement: isize,
GetElementAt: isize,
Clear: isize,
Destruct: isize,
Delete: isize,
Clone: isize,
};type
MI_PropertySetFT {.bycopy.} = object
GetElementCount: int
ContainsElement: int
AddElement: int
GetElementAt: int
Clear: int
Destruct: int
Delete: int
Clone: intstruct MI_PropertySetFT
{
ptrdiff_t GetElementCount;
ptrdiff_t ContainsElement;
ptrdiff_t AddElement;
ptrdiff_t GetElementAt;
ptrdiff_t Clear;
ptrdiff_t Destruct;
ptrdiff_t Delete;
ptrdiff_t Clone;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; MI_PropertySetFT サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; GetElementCount : INT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ContainsElement : INT_PTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; AddElement : INT_PTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; GetElementAt : INT_PTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; Clear : INT_PTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Destruct : INT_PTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Delete : INT_PTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Clone : INT_PTR (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MI_PropertySetFT サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; GetElementCount : INT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ContainsElement : INT_PTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; AddElement : INT_PTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; GetElementAt : INT_PTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; Clear : INT_PTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; Destruct : INT_PTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; Delete : INT_PTR (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; Clone : INT_PTR (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MI_PropertySetFT
#field intptr GetElementCount
#field intptr ContainsElement
#field intptr AddElement
#field intptr GetElementAt
#field intptr Clear
#field intptr Destruct
#field intptr Delete
#field intptr Clone
#endstruct
stdim st, MI_PropertySetFT ; NSTRUCT 変数を確保
st->GetElementCount = 100
mes "GetElementCount=" + st->GetElementCount