ホーム › Storage.FileSystem › CLFS_MGMT_NOTIFICATION
CLFS_MGMT_NOTIFICATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Notification | CLFS_MGMT_NOTIFICATION_TYPE | 4 | +0 | +0 | 発生した管理通知の種類を示す値。 |
| Lsn | CLS_LSN | 8 | +8 | +8 | 通知に関連するLSN。 |
| LogIsPinned | WORD | 2 | +16 | +16 | ログがピン留めされているかを示す値。非0でピン状態。 |
各言語での定義
#include <windows.h>
// CLS_LSN (x64 8 / x86 8 バイト)
typedef struct CLS_LSN {
ULONGLONG Internal;
} CLS_LSN;
// CLFS_MGMT_NOTIFICATION (x64 24 / x86 24 バイト)
typedef struct CLFS_MGMT_NOTIFICATION {
CLFS_MGMT_NOTIFICATION_TYPE Notification;
CLS_LSN Lsn;
WORD LogIsPinned;
} CLFS_MGMT_NOTIFICATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CLS_LSN
{
public ulong Internal;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct CLFS_MGMT_NOTIFICATION
{
public int Notification;
public CLS_LSN Lsn;
public ushort LogIsPinned;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CLS_LSN
Public Internal As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure CLFS_MGMT_NOTIFICATION
Public Notification As Integer
Public Lsn As CLS_LSN
Public LogIsPinned As UShort
End Structureimport ctypes
from ctypes import wintypes
class CLS_LSN(ctypes.Structure):
_fields_ = [
("Internal", ctypes.c_ulonglong),
]
class CLFS_MGMT_NOTIFICATION(ctypes.Structure):
_fields_ = [
("Notification", ctypes.c_int),
("Lsn", CLS_LSN),
("LogIsPinned", ctypes.c_ushort),
]#[repr(C)]
pub struct CLS_LSN {
pub Internal: u64,
}
#[repr(C)]
pub struct CLFS_MGMT_NOTIFICATION {
pub Notification: i32,
pub Lsn: CLS_LSN,
pub LogIsPinned: u16,
}import "golang.org/x/sys/windows"
type CLS_LSN struct {
Internal uint64
}
type CLFS_MGMT_NOTIFICATION struct {
Notification int32
Lsn CLS_LSN
LogIsPinned uint16
}type
CLS_LSN = record
Internal: UInt64;
end;
CLFS_MGMT_NOTIFICATION = record
Notification: Integer;
Lsn: CLS_LSN;
LogIsPinned: Word;
end;const CLS_LSN = extern struct {
Internal: u64,
};
const CLFS_MGMT_NOTIFICATION = extern struct {
Notification: i32,
Lsn: CLS_LSN,
LogIsPinned: u16,
};type
CLS_LSN {.bycopy.} = object
Internal: uint64
CLFS_MGMT_NOTIFICATION {.bycopy.} = object
Notification: int32
Lsn: CLS_LSN
LogIsPinned: uint16struct CLS_LSN
{
ulong Internal;
}
struct CLFS_MGMT_NOTIFICATION
{
int Notification;
CLS_LSN Lsn;
ushort LogIsPinned;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; CLFS_MGMT_NOTIFICATION サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; Notification : CLFS_MGMT_NOTIFICATION_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Lsn : CLS_LSN (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; LogIsPinned : WORD (+16, 2byte) wpoke st,16,値 / 値 = wpeek(st,16)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global CLS_LSN
#field int64 Internal
#endstruct
#defstruct global CLFS_MGMT_NOTIFICATION
#field int Notification
#field CLS_LSN Lsn
#field short LogIsPinned
#endstruct
stdim st, CLFS_MGMT_NOTIFICATION ; NSTRUCT 変数を確保
st->Notification = 100
mes "Notification=" + st->Notification