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

DeleteLogMarshallingArea

関数
CLFSログのマーシャリング領域を削除する。
DLLclfsw32.dll呼出規約winapiSetLastErrorあり対応OSWindows Vista 以降

シグネチャ

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

BOOL DeleteLogMarshallingArea(
    void* pvMarshal
);

パラメーター

名前方向
pvMarshalvoid*inout

戻り値の型: BOOL

各言語での呼び出し定義

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

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

DeleteLogMarshallingArea = ctypes.windll.clfsw32.DeleteLogMarshallingArea
DeleteLogMarshallingArea.restype = wintypes.BOOL
DeleteLogMarshallingArea.argtypes = [
    ctypes.POINTER(None),  # pvMarshal : void* in/out
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('clfsw32.dll')
DeleteLogMarshallingArea = Fiddle::Function.new(
  lib['DeleteLogMarshallingArea'],
  [
    Fiddle::TYPE_VOIDP,  # pvMarshal : void* in/out
  ],
  Fiddle::TYPE_INT)
#[link(name = "clfsw32")]
extern "system" {
    fn DeleteLogMarshallingArea(
        pvMarshal: *mut ()  // void* in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("clfsw32.dll", SetLastError = true)]
public static extern bool DeleteLogMarshallingArea(IntPtr pvMarshal);
"@
$api = Add-Type -MemberDefinition $sig -Name 'clfsw32_DeleteLogMarshallingArea' -Namespace Win32 -PassThru
# $api::DeleteLogMarshallingArea(pvMarshal)
#uselib "clfsw32.dll"
#func global DeleteLogMarshallingArea "DeleteLogMarshallingArea" sptr
; DeleteLogMarshallingArea pvMarshal   ; 戻り値は stat
; pvMarshal : void* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "clfsw32.dll"
#cfunc global DeleteLogMarshallingArea "DeleteLogMarshallingArea" sptr
; res = DeleteLogMarshallingArea(pvMarshal)
; pvMarshal : void* in/out -> "sptr"
; BOOL DeleteLogMarshallingArea(void* pvMarshal)
#uselib "clfsw32.dll"
#cfunc global DeleteLogMarshallingArea "DeleteLogMarshallingArea" intptr
; res = DeleteLogMarshallingArea(pvMarshal)
; pvMarshal : void* in/out -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	clfsw32 = windows.NewLazySystemDLL("clfsw32.dll")
	procDeleteLogMarshallingArea = clfsw32.NewProc("DeleteLogMarshallingArea")
)

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