SHFlushSFCache
関数特殊フォルダーの内部キャッシュをクリアする。
シグネチャ
// SHELL32.dll
#include <windows.h>
void SHFlushSFCache(void);パラメーターなし。戻り値: void
各言語での呼び出し定義
// SHELL32.dll
#include <windows.h>
void SHFlushSFCache(void);[DllImport("SHELL32.dll", ExactSpelling = true)]
static extern void SHFlushSFCache();<DllImport("SHELL32.dll", ExactSpelling:=True)>
Public Shared Sub SHFlushSFCache()
End SubDeclare PtrSafe Sub SHFlushSFCache Lib "shell32" ()
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SHFlushSFCache = ctypes.windll.shell32.SHFlushSFCache
SHFlushSFCache.restype = None
SHFlushSFCache.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SHELL32.dll')
SHFlushSFCache = Fiddle::Function.new(
lib['SHFlushSFCache'],
[],
Fiddle::TYPE_VOID)#[link(name = "shell32")]
extern "system" {
fn SHFlushSFCache();
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("SHELL32.dll")]
public static extern void SHFlushSFCache();
"@
$api = Add-Type -MemberDefinition $sig -Name 'SHELL32_SHFlushSFCache' -Namespace Win32 -PassThru
# $api::SHFlushSFCache()#uselib "SHELL32.dll"
#func global SHFlushSFCache "SHFlushSFCache"
; SHFlushSFCache#uselib "SHELL32.dll"
#func global SHFlushSFCache "SHFlushSFCache"
; SHFlushSFCache; void SHFlushSFCache()
#uselib "SHELL32.dll"
#func global SHFlushSFCache "SHFlushSFCache"
; SHFlushSFCacheimport (
"golang.org/x/sys/windows"
"unsafe"
)
var (
shell32 = windows.NewLazySystemDLL("SHELL32.dll")
procSHFlushSFCache = shell32.NewProc("SHFlushSFCache")
)
r1, _, err := procSHFlushSFCache.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure SHFlushSFCache; stdcall;
external 'SHELL32.dll' name 'SHFlushSFCache';result := DllCall("SHELL32\SHFlushSFCache", "Int")●SHFlushSFCache() = DLL("SHELL32.dll", "int SHFlushSFCache()")
# 呼び出し: SHFlushSFCache()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。