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

FhServiceReloadConfiguration

関数
ファイル履歴サービスの構成を再読み込みする。
DLLfhsvcctl.dll呼出規約winapi対応OSwindows8.0

シグネチャ

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

HRESULT FhServiceReloadConfiguration(
    FH_SERVICE_PIPE_HANDLE Pipe
);

パラメーター

名前方向
PipeFH_SERVICE_PIPE_HANDLEin

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT FhServiceReloadConfiguration(
    FH_SERVICE_PIPE_HANDLE Pipe
);
[DllImport("fhsvcctl.dll", ExactSpelling = true)]
static extern int FhServiceReloadConfiguration(
    IntPtr Pipe   // FH_SERVICE_PIPE_HANDLE
);
<DllImport("fhsvcctl.dll", ExactSpelling:=True)>
Public Shared Function FhServiceReloadConfiguration(
    Pipe As IntPtr   ' FH_SERVICE_PIPE_HANDLE
) As Integer
End Function
' Pipe : FH_SERVICE_PIPE_HANDLE
Declare PtrSafe Function FhServiceReloadConfiguration Lib "fhsvcctl" ( _
    ByVal Pipe As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

FhServiceReloadConfiguration = ctypes.windll.fhsvcctl.FhServiceReloadConfiguration
FhServiceReloadConfiguration.restype = ctypes.c_int
FhServiceReloadConfiguration.argtypes = [
    wintypes.HANDLE,  # Pipe : FH_SERVICE_PIPE_HANDLE
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('fhsvcctl.dll')
FhServiceReloadConfiguration = Fiddle::Function.new(
  lib['FhServiceReloadConfiguration'],
  [
    Fiddle::TYPE_VOIDP,  # Pipe : FH_SERVICE_PIPE_HANDLE
  ],
  Fiddle::TYPE_INT)
#[link(name = "fhsvcctl")]
extern "system" {
    fn FhServiceReloadConfiguration(
        Pipe: *mut core::ffi::c_void  // FH_SERVICE_PIPE_HANDLE
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("fhsvcctl.dll")]
public static extern int FhServiceReloadConfiguration(IntPtr Pipe);
"@
$api = Add-Type -MemberDefinition $sig -Name 'fhsvcctl_FhServiceReloadConfiguration' -Namespace Win32 -PassThru
# $api::FhServiceReloadConfiguration(Pipe)
#uselib "fhsvcctl.dll"
#func global FhServiceReloadConfiguration "FhServiceReloadConfiguration" sptr
; FhServiceReloadConfiguration Pipe   ; 戻り値は stat
; Pipe : FH_SERVICE_PIPE_HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "fhsvcctl.dll"
#cfunc global FhServiceReloadConfiguration "FhServiceReloadConfiguration" sptr
; res = FhServiceReloadConfiguration(Pipe)
; Pipe : FH_SERVICE_PIPE_HANDLE -> "sptr"
; HRESULT FhServiceReloadConfiguration(FH_SERVICE_PIPE_HANDLE Pipe)
#uselib "fhsvcctl.dll"
#cfunc global FhServiceReloadConfiguration "FhServiceReloadConfiguration" intptr
; res = FhServiceReloadConfiguration(Pipe)
; Pipe : FH_SERVICE_PIPE_HANDLE -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	fhsvcctl = windows.NewLazySystemDLL("fhsvcctl.dll")
	procFhServiceReloadConfiguration = fhsvcctl.NewProc("FhServiceReloadConfiguration")
)

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