ホーム › Storage.Cabinets › FDINOTIFICATION
FDINOTIFICATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cb | INT | 4 | +0 | +0 | キャビネット要素のサイズ(バイト単位)です。 | ||||||||||||||||||||||||||
| psz1 | LPSTR | 8/4 | +8 | +4 | null で終わる文字列です。 | ||||||||||||||||||||||||||
| psz2 | LPSTR | 8/4 | +16 | +8 | null で終わる文字列です。 | ||||||||||||||||||||||||||
| psz3 | LPSTR | 8/4 | +24 | +12 | null で終わる文字列です。 | ||||||||||||||||||||||||||
| pv | void* | 8/4 | +32 | +16 | アプリケーション定義の値へのポインターです。 | ||||||||||||||||||||||||||
| hf | INT_PTR | 8/4 | +40 | +20 | 開かれたファイルを識別するために使用される、アプリケーション定義の値です。 | ||||||||||||||||||||||||||
| date | WORD | 2 | +48 | +24 | MS-DOS 形式の日付です。
| ||||||||||||||||||||||||||
| time | WORD | 2 | +50 | +26 | MS-DOS 形式の時刻です。
| ||||||||||||||||||||||||||
| attribs | WORD | 2 | +52 | +28 | ファイルの属性です。指定できる値とその説明については、File Attributes を参照してください。 | ||||||||||||||||||||||||||
| setID | WORD | 2 | +54 | +30 | キャビネットセットの識別子です。 | ||||||||||||||||||||||||||
| iCabinet | WORD | 2 | +56 | +32 | セット内でのキャビネットの番号です。 | ||||||||||||||||||||||||||
| iFolder | WORD | 2 | +58 | +34 | キャビネット内でのフォルダーの番号です。 | ||||||||||||||||||||||||||
| fdie | FDIERROR | 4 | +60 | +36 | FDI のエラーコードです。指定できる値は次のとおりです。
|
公式ドキュメント
FDINOTIFICATION 構造体は、FNFDINOTIFY に情報を提供します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// FDINOTIFICATION (x64 64 / x86 40 バイト)
typedef struct FDINOTIFICATION {
INT cb;
LPSTR psz1;
LPSTR psz2;
LPSTR psz3;
void* pv;
INT_PTR hf;
WORD date;
WORD time;
WORD attribs;
WORD setID;
WORD iCabinet;
WORD iFolder;
FDIERROR fdie;
} FDINOTIFICATION;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FDINOTIFICATION
{
public int cb;
public IntPtr psz1;
public IntPtr psz2;
public IntPtr psz3;
public IntPtr pv;
public IntPtr hf;
public ushort date;
public ushort time;
public ushort attribs;
public ushort setID;
public ushort iCabinet;
public ushort iFolder;
public int fdie;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FDINOTIFICATION
Public cb As Integer
Public psz1 As IntPtr
Public psz2 As IntPtr
Public psz3 As IntPtr
Public pv As IntPtr
Public hf As IntPtr
Public date As UShort
Public time As UShort
Public attribs As UShort
Public setID As UShort
Public iCabinet As UShort
Public iFolder As UShort
Public fdie As Integer
End Structureimport ctypes
from ctypes import wintypes
class FDINOTIFICATION(ctypes.Structure):
_fields_ = [
("cb", ctypes.c_int),
("psz1", ctypes.c_void_p),
("psz2", ctypes.c_void_p),
("psz3", ctypes.c_void_p),
("pv", ctypes.c_void_p),
("hf", ctypes.c_ssize_t),
("date", ctypes.c_ushort),
("time", ctypes.c_ushort),
("attribs", ctypes.c_ushort),
("setID", ctypes.c_ushort),
("iCabinet", ctypes.c_ushort),
("iFolder", ctypes.c_ushort),
("fdie", ctypes.c_int),
]#[repr(C)]
pub struct FDINOTIFICATION {
pub cb: i32,
pub psz1: *mut core::ffi::c_void,
pub psz2: *mut core::ffi::c_void,
pub psz3: *mut core::ffi::c_void,
pub pv: *mut core::ffi::c_void,
pub hf: isize,
pub date: u16,
pub time: u16,
pub attribs: u16,
pub setID: u16,
pub iCabinet: u16,
pub iFolder: u16,
pub fdie: i32,
}import "golang.org/x/sys/windows"
type FDINOTIFICATION struct {
cb int32
psz1 uintptr
psz2 uintptr
psz3 uintptr
pv uintptr
hf uintptr
date uint16
time uint16
attribs uint16
setID uint16
iCabinet uint16
iFolder uint16
fdie int32
}type
FDINOTIFICATION = record
cb: Integer;
psz1: Pointer;
psz2: Pointer;
psz3: Pointer;
pv: Pointer;
hf: NativeInt;
date: Word;
time: Word;
attribs: Word;
setID: Word;
iCabinet: Word;
iFolder: Word;
fdie: Integer;
end;const FDINOTIFICATION = extern struct {
cb: i32,
psz1: ?*anyopaque,
psz2: ?*anyopaque,
psz3: ?*anyopaque,
pv: ?*anyopaque,
hf: isize,
date: u16,
time: u16,
attribs: u16,
setID: u16,
iCabinet: u16,
iFolder: u16,
fdie: i32,
};type
FDINOTIFICATION {.bycopy.} = object
cb: int32
psz1: pointer
psz2: pointer
psz3: pointer
pv: pointer
hf: int
date: uint16
time: uint16
attribs: uint16
setID: uint16
iCabinet: uint16
iFolder: uint16
fdie: int32struct FDINOTIFICATION
{
int cb;
void* psz1;
void* psz2;
void* psz3;
void* pv;
ptrdiff_t hf;
ushort date;
ushort time;
ushort attribs;
ushort setID;
ushort iCabinet;
ushort iFolder;
int fdie;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FDINOTIFICATION サイズ: 40 バイト(x86)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; cb : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; psz1 : LPSTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; psz2 : LPSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; psz3 : LPSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pv : void* (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; hf : INT_PTR (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; date : WORD (+24, 2byte) wpoke st,24,値 / 値 = wpeek(st,24)
; time : WORD (+26, 2byte) wpoke st,26,値 / 値 = wpeek(st,26)
; attribs : WORD (+28, 2byte) wpoke st,28,値 / 値 = wpeek(st,28)
; setID : WORD (+30, 2byte) wpoke st,30,値 / 値 = wpeek(st,30)
; iCabinet : WORD (+32, 2byte) wpoke st,32,値 / 値 = wpeek(st,32)
; iFolder : WORD (+34, 2byte) wpoke st,34,値 / 値 = wpeek(st,34)
; fdie : FDIERROR (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FDINOTIFICATION サイズ: 64 バイト(x64)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; cb : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; psz1 : LPSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; psz2 : LPSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; psz3 : LPSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; pv : void* (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; hf : INT_PTR (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; date : WORD (+48, 2byte) wpoke st,48,値 / 値 = wpeek(st,48)
; time : WORD (+50, 2byte) wpoke st,50,値 / 値 = wpeek(st,50)
; attribs : WORD (+52, 2byte) wpoke st,52,値 / 値 = wpeek(st,52)
; setID : WORD (+54, 2byte) wpoke st,54,値 / 値 = wpeek(st,54)
; iCabinet : WORD (+56, 2byte) wpoke st,56,値 / 値 = wpeek(st,56)
; iFolder : WORD (+58, 2byte) wpoke st,58,値 / 値 = wpeek(st,58)
; fdie : FDIERROR (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FDINOTIFICATION
#field int cb
#field intptr psz1
#field intptr psz2
#field intptr psz3
#field intptr pv
#field intptr hf
#field short date
#field short time
#field short attribs
#field short setID
#field short iCabinet
#field short iFolder
#field int fdie
#endstruct
stdim st, FDINOTIFICATION ; NSTRUCT 変数を確保
st->cb = 100
mes "cb=" + st->cb