Win32 API 日本語リファレンス
ホームStorage.OperationRecorder › OperationEnd

OperationEnd

関数
プリフェッチ最適化用に操作記録の終了を通知する。
DLLADVAPI32.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// ADVAPI32.dll
#include <windows.h>

BOOL OperationEnd(
    OPERATION_END_PARAMETERS* OperationEndParams
);

パラメーター

名前方向
OperationEndParamsOPERATION_END_PARAMETERS*in

戻り値の型: BOOL

各言語での呼び出し定義

// ADVAPI32.dll
#include <windows.h>

BOOL OperationEnd(
    OPERATION_END_PARAMETERS* OperationEndParams
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("ADVAPI32.dll", ExactSpelling = true)]
static extern bool OperationEnd(
    IntPtr OperationEndParams   // OPERATION_END_PARAMETERS*
);
<DllImport("ADVAPI32.dll", ExactSpelling:=True)>
Public Shared Function OperationEnd(
    OperationEndParams As IntPtr   ' OPERATION_END_PARAMETERS*
) As Boolean
End Function
' OperationEndParams : OPERATION_END_PARAMETERS*
Declare PtrSafe Function OperationEnd Lib "advapi32" ( _
    ByVal OperationEndParams As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

OperationEnd = ctypes.windll.advapi32.OperationEnd
OperationEnd.restype = wintypes.BOOL
OperationEnd.argtypes = [
    ctypes.c_void_p,  # OperationEndParams : OPERATION_END_PARAMETERS*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ADVAPI32.dll')
OperationEnd = Fiddle::Function.new(
  lib['OperationEnd'],
  [
    Fiddle::TYPE_VOIDP,  # OperationEndParams : OPERATION_END_PARAMETERS*
  ],
  Fiddle::TYPE_INT)
#[link(name = "advapi32")]
extern "system" {
    fn OperationEnd(
        OperationEndParams: *mut OPERATION_END_PARAMETERS  // OPERATION_END_PARAMETERS*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("ADVAPI32.dll")]
public static extern bool OperationEnd(IntPtr OperationEndParams);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ADVAPI32_OperationEnd' -Namespace Win32 -PassThru
# $api::OperationEnd(OperationEndParams)
#uselib "ADVAPI32.dll"
#func global OperationEnd "OperationEnd" sptr
; OperationEnd varptr(OperationEndParams)   ; 戻り値は stat
; OperationEndParams : OPERATION_END_PARAMETERS* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "ADVAPI32.dll"
#cfunc global OperationEnd "OperationEnd" var
; res = OperationEnd(OperationEndParams)
; OperationEndParams : OPERATION_END_PARAMETERS* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; BOOL OperationEnd(OPERATION_END_PARAMETERS* OperationEndParams)
#uselib "ADVAPI32.dll"
#cfunc global OperationEnd "OperationEnd" var
; res = OperationEnd(OperationEndParams)
; OperationEndParams : OPERATION_END_PARAMETERS* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	advapi32 = windows.NewLazySystemDLL("ADVAPI32.dll")
	procOperationEnd = advapi32.NewProc("OperationEnd")
)

// OperationEndParams (OPERATION_END_PARAMETERS*)
r1, _, err := procOperationEnd.Call(
	uintptr(OperationEndParams),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function OperationEnd(
  OperationEndParams: Pointer   // OPERATION_END_PARAMETERS*
): BOOL; stdcall;
  external 'ADVAPI32.dll' name 'OperationEnd';
result := DllCall("ADVAPI32\OperationEnd"
    , "Ptr", OperationEndParams   ; OPERATION_END_PARAMETERS*
    , "Int")   ; return: BOOL
●OperationEnd(OperationEndParams) = DLL("ADVAPI32.dll", "bool OperationEnd(void*)")
# 呼び出し: OperationEnd(OperationEndParams)
# OperationEndParams : OPERATION_END_PARAMETERS* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。