ホーム › System.ComponentServices › ApplicationProcessStatistics
ApplicationProcessStatistics
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NumCallsOutstanding | DWORD | 4 | +0 | +0 | 未完了の呼び出し数。 |
| NumTrackedComponents | DWORD | 4 | +4 | +4 | 追跡中のコンポーネント数。 |
| NumComponentInstances | DWORD | 4 | +8 | +8 | コンポーネントインスタンスの総数。 |
| AvgCallsPerSecond | DWORD | 4 | +12 | +12 | 1秒あたりの平均呼び出し回数。 |
| Reserved1 | DWORD | 4 | +16 | +16 | 予約フィールド1。将来の使用のため確保される。 |
| Reserved2 | DWORD | 4 | +20 | +20 | 予約フィールド2。将来の使用のため確保される。 |
| Reserved3 | DWORD | 4 | +24 | +24 | 予約フィールド3。将来の使用のため確保される。 |
| Reserved4 | DWORD | 4 | +28 | +28 | 予約フィールド4。将来の使用のため確保される。 |
各言語での定義
#include <windows.h>
// ApplicationProcessStatistics (x64 32 / x86 32 バイト)
typedef struct ApplicationProcessStatistics {
DWORD NumCallsOutstanding;
DWORD NumTrackedComponents;
DWORD NumComponentInstances;
DWORD AvgCallsPerSecond;
DWORD Reserved1;
DWORD Reserved2;
DWORD Reserved3;
DWORD Reserved4;
} ApplicationProcessStatistics;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ApplicationProcessStatistics
{
public uint NumCallsOutstanding;
public uint NumTrackedComponents;
public uint NumComponentInstances;
public uint AvgCallsPerSecond;
public uint Reserved1;
public uint Reserved2;
public uint Reserved3;
public uint Reserved4;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ApplicationProcessStatistics
Public NumCallsOutstanding As UInteger
Public NumTrackedComponents As UInteger
Public NumComponentInstances As UInteger
Public AvgCallsPerSecond As UInteger
Public Reserved1 As UInteger
Public Reserved2 As UInteger
Public Reserved3 As UInteger
Public Reserved4 As UInteger
End Structureimport ctypes
from ctypes import wintypes
class ApplicationProcessStatistics(ctypes.Structure):
_fields_ = [
("NumCallsOutstanding", wintypes.DWORD),
("NumTrackedComponents", wintypes.DWORD),
("NumComponentInstances", wintypes.DWORD),
("AvgCallsPerSecond", wintypes.DWORD),
("Reserved1", wintypes.DWORD),
("Reserved2", wintypes.DWORD),
("Reserved3", wintypes.DWORD),
("Reserved4", wintypes.DWORD),
]#[repr(C)]
pub struct ApplicationProcessStatistics {
pub NumCallsOutstanding: u32,
pub NumTrackedComponents: u32,
pub NumComponentInstances: u32,
pub AvgCallsPerSecond: u32,
pub Reserved1: u32,
pub Reserved2: u32,
pub Reserved3: u32,
pub Reserved4: u32,
}import "golang.org/x/sys/windows"
type ApplicationProcessStatistics struct {
NumCallsOutstanding uint32
NumTrackedComponents uint32
NumComponentInstances uint32
AvgCallsPerSecond uint32
Reserved1 uint32
Reserved2 uint32
Reserved3 uint32
Reserved4 uint32
}type
ApplicationProcessStatistics = record
NumCallsOutstanding: DWORD;
NumTrackedComponents: DWORD;
NumComponentInstances: DWORD;
AvgCallsPerSecond: DWORD;
Reserved1: DWORD;
Reserved2: DWORD;
Reserved3: DWORD;
Reserved4: DWORD;
end;const ApplicationProcessStatistics = extern struct {
NumCallsOutstanding: u32,
NumTrackedComponents: u32,
NumComponentInstances: u32,
AvgCallsPerSecond: u32,
Reserved1: u32,
Reserved2: u32,
Reserved3: u32,
Reserved4: u32,
};type
ApplicationProcessStatistics {.bycopy.} = object
NumCallsOutstanding: uint32
NumTrackedComponents: uint32
NumComponentInstances: uint32
AvgCallsPerSecond: uint32
Reserved1: uint32
Reserved2: uint32
Reserved3: uint32
Reserved4: uint32struct ApplicationProcessStatistics
{
uint NumCallsOutstanding;
uint NumTrackedComponents;
uint NumComponentInstances;
uint AvgCallsPerSecond;
uint Reserved1;
uint Reserved2;
uint Reserved3;
uint Reserved4;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ApplicationProcessStatistics サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; NumCallsOutstanding : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; NumTrackedComponents : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; NumComponentInstances : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; AvgCallsPerSecond : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; Reserved1 : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Reserved2 : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Reserved3 : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; Reserved4 : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ApplicationProcessStatistics
#field int NumCallsOutstanding
#field int NumTrackedComponents
#field int NumComponentInstances
#field int AvgCallsPerSecond
#field int Reserved1
#field int Reserved2
#field int Reserved3
#field int Reserved4
#endstruct
stdim st, ApplicationProcessStatistics ; NSTRUCT 変数を確保
st->NumCallsOutstanding = 100
mes "NumCallsOutstanding=" + st->NumCallsOutstanding