ホーム › Storage.ProjectedFileSystem › PRJ_STARTVIRTUALIZING_OPTIONS
PRJ_STARTVIRTUALIZING_OPTIONS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Flags | PRJ_STARTVIRTUALIZING_FLAGS | 4 | +0 | +0 | 仮想化開始時の動作を制御するフラグ(PRJ_STARTVIRTUALIZING_FLAGS)である。 |
| PoolThreadCount | DWORD | 4 | +4 | +4 | コールバック処理用スレッドプールのスレッド数(Pool Thread Count)を表す32ビット値である。 |
| ConcurrentThreadCount | DWORD | 4 | +8 | +8 | 同時にコールバックを処理する最大スレッド数(Concurrent Thread Count)を表す32ビット値である。 |
| NotificationMappings | PRJ_NOTIFICATION_MAPPING* | 8/4 | +16 | +12 | 通知マッピング配列を指すPRJ_NOTIFICATION_MAPPINGポインタである。 |
| NotificationMappingsCount | DWORD | 4 | +24 | +16 | NotificationMappings配列の要素数を表す32ビット値である。 |
各言語での定義
#include <windows.h>
// PRJ_STARTVIRTUALIZING_OPTIONS (x64 32 / x86 20 バイト)
typedef struct PRJ_STARTVIRTUALIZING_OPTIONS {
PRJ_STARTVIRTUALIZING_FLAGS Flags;
DWORD PoolThreadCount;
DWORD ConcurrentThreadCount;
PRJ_NOTIFICATION_MAPPING* NotificationMappings;
DWORD NotificationMappingsCount;
} PRJ_STARTVIRTUALIZING_OPTIONS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PRJ_STARTVIRTUALIZING_OPTIONS
{
public int Flags;
public uint PoolThreadCount;
public uint ConcurrentThreadCount;
public IntPtr NotificationMappings;
public uint NotificationMappingsCount;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PRJ_STARTVIRTUALIZING_OPTIONS
Public Flags As Integer
Public PoolThreadCount As UInteger
Public ConcurrentThreadCount As UInteger
Public NotificationMappings As IntPtr
Public NotificationMappingsCount As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PRJ_STARTVIRTUALIZING_OPTIONS(ctypes.Structure):
_fields_ = [
("Flags", ctypes.c_int),
("PoolThreadCount", wintypes.DWORD),
("ConcurrentThreadCount", wintypes.DWORD),
("NotificationMappings", ctypes.c_void_p),
("NotificationMappingsCount", wintypes.DWORD),
]#[repr(C)]
pub struct PRJ_STARTVIRTUALIZING_OPTIONS {
pub Flags: i32,
pub PoolThreadCount: u32,
pub ConcurrentThreadCount: u32,
pub NotificationMappings: *mut core::ffi::c_void,
pub NotificationMappingsCount: u32,
}import "golang.org/x/sys/windows"
type PRJ_STARTVIRTUALIZING_OPTIONS struct {
Flags int32
PoolThreadCount uint32
ConcurrentThreadCount uint32
NotificationMappings uintptr
NotificationMappingsCount uint32
}type
PRJ_STARTVIRTUALIZING_OPTIONS = record
Flags: Integer;
PoolThreadCount: DWORD;
ConcurrentThreadCount: DWORD;
NotificationMappings: Pointer;
NotificationMappingsCount: DWORD;
end;const PRJ_STARTVIRTUALIZING_OPTIONS = extern struct {
Flags: i32,
PoolThreadCount: u32,
ConcurrentThreadCount: u32,
NotificationMappings: ?*anyopaque,
NotificationMappingsCount: u32,
};type
PRJ_STARTVIRTUALIZING_OPTIONS {.bycopy.} = object
Flags: int32
PoolThreadCount: uint32
ConcurrentThreadCount: uint32
NotificationMappings: pointer
NotificationMappingsCount: uint32struct PRJ_STARTVIRTUALIZING_OPTIONS
{
int Flags;
uint PoolThreadCount;
uint ConcurrentThreadCount;
void* NotificationMappings;
uint NotificationMappingsCount;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; PRJ_STARTVIRTUALIZING_OPTIONS サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; Flags : PRJ_STARTVIRTUALIZING_FLAGS (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; PoolThreadCount : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ConcurrentThreadCount : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; NotificationMappings : PRJ_NOTIFICATION_MAPPING* (+12, 4byte) varptr(st)+12 を基点に操作(4byte:入れ子/配列)
; NotificationMappingsCount : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PRJ_STARTVIRTUALIZING_OPTIONS サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; Flags : PRJ_STARTVIRTUALIZING_FLAGS (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; PoolThreadCount : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ConcurrentThreadCount : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; NotificationMappings : PRJ_NOTIFICATION_MAPPING* (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; NotificationMappingsCount : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PRJ_STARTVIRTUALIZING_OPTIONS
#field int Flags
#field int PoolThreadCount
#field int ConcurrentThreadCount
#field intptr NotificationMappings
#field int NotificationMappingsCount
#endstruct
stdim st, PRJ_STARTVIRTUALIZING_OPTIONS ; NSTRUCT 変数を確保
st->Flags = 100
mes "Flags=" + st->Flags