ホーム › System.Diagnostics.Etw › TdhCleanupPayloadEventFilterDescriptor
TdhCleanupPayloadEventFilterDescriptor
関数ペイロードイベントフィルター記述子の資源を解放する。
シグネチャ
// tdh.dll
#include <windows.h>
DWORD TdhCleanupPayloadEventFilterDescriptor(
EVENT_FILTER_DESCRIPTOR* EventFilterDescriptor
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| EventFilterDescriptor | EVENT_FILTER_DESCRIPTOR* | inout | 解放するペイロード由来のEVENT_FILTER_DESCRIPTOR。 |
戻り値の型: DWORD
各言語での呼び出し定義
// tdh.dll
#include <windows.h>
DWORD TdhCleanupPayloadEventFilterDescriptor(
EVENT_FILTER_DESCRIPTOR* EventFilterDescriptor
);[DllImport("tdh.dll", ExactSpelling = true)]
static extern uint TdhCleanupPayloadEventFilterDescriptor(
IntPtr EventFilterDescriptor // EVENT_FILTER_DESCRIPTOR* in/out
);<DllImport("tdh.dll", ExactSpelling:=True)>
Public Shared Function TdhCleanupPayloadEventFilterDescriptor(
EventFilterDescriptor As IntPtr ' EVENT_FILTER_DESCRIPTOR* in/out
) As UInteger
End Function' EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out
Declare PtrSafe Function TdhCleanupPayloadEventFilterDescriptor Lib "tdh" ( _
ByVal EventFilterDescriptor As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
TdhCleanupPayloadEventFilterDescriptor = ctypes.windll.tdh.TdhCleanupPayloadEventFilterDescriptor
TdhCleanupPayloadEventFilterDescriptor.restype = wintypes.DWORD
TdhCleanupPayloadEventFilterDescriptor.argtypes = [
ctypes.c_void_p, # EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('tdh.dll')
TdhCleanupPayloadEventFilterDescriptor = Fiddle::Function.new(
lib['TdhCleanupPayloadEventFilterDescriptor'],
[
Fiddle::TYPE_VOIDP, # EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out
],
-Fiddle::TYPE_INT)#[link(name = "tdh")]
extern "system" {
fn TdhCleanupPayloadEventFilterDescriptor(
EventFilterDescriptor: *mut EVENT_FILTER_DESCRIPTOR // EVENT_FILTER_DESCRIPTOR* in/out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("tdh.dll")]
public static extern uint TdhCleanupPayloadEventFilterDescriptor(IntPtr EventFilterDescriptor);
"@
$api = Add-Type -MemberDefinition $sig -Name 'tdh_TdhCleanupPayloadEventFilterDescriptor' -Namespace Win32 -PassThru
# $api::TdhCleanupPayloadEventFilterDescriptor(EventFilterDescriptor)#uselib "tdh.dll"
#func global TdhCleanupPayloadEventFilterDescriptor "TdhCleanupPayloadEventFilterDescriptor" sptr
; TdhCleanupPayloadEventFilterDescriptor varptr(EventFilterDescriptor) ; 戻り値は stat
; EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "tdh.dll" #cfunc global TdhCleanupPayloadEventFilterDescriptor "TdhCleanupPayloadEventFilterDescriptor" var ; res = TdhCleanupPayloadEventFilterDescriptor(EventFilterDescriptor) ; EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "tdh.dll" #cfunc global TdhCleanupPayloadEventFilterDescriptor "TdhCleanupPayloadEventFilterDescriptor" sptr ; res = TdhCleanupPayloadEventFilterDescriptor(varptr(EventFilterDescriptor)) ; EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD TdhCleanupPayloadEventFilterDescriptor(EVENT_FILTER_DESCRIPTOR* EventFilterDescriptor) #uselib "tdh.dll" #cfunc global TdhCleanupPayloadEventFilterDescriptor "TdhCleanupPayloadEventFilterDescriptor" var ; res = TdhCleanupPayloadEventFilterDescriptor(EventFilterDescriptor) ; EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD TdhCleanupPayloadEventFilterDescriptor(EVENT_FILTER_DESCRIPTOR* EventFilterDescriptor) #uselib "tdh.dll" #cfunc global TdhCleanupPayloadEventFilterDescriptor "TdhCleanupPayloadEventFilterDescriptor" intptr ; res = TdhCleanupPayloadEventFilterDescriptor(varptr(EventFilterDescriptor)) ; EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
tdh = windows.NewLazySystemDLL("tdh.dll")
procTdhCleanupPayloadEventFilterDescriptor = tdh.NewProc("TdhCleanupPayloadEventFilterDescriptor")
)
// EventFilterDescriptor (EVENT_FILTER_DESCRIPTOR* in/out)
r1, _, err := procTdhCleanupPayloadEventFilterDescriptor.Call(
uintptr(EventFilterDescriptor),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction TdhCleanupPayloadEventFilterDescriptor(
EventFilterDescriptor: Pointer // EVENT_FILTER_DESCRIPTOR* in/out
): DWORD; stdcall;
external 'tdh.dll' name 'TdhCleanupPayloadEventFilterDescriptor';result := DllCall("tdh\TdhCleanupPayloadEventFilterDescriptor"
, "Ptr", EventFilterDescriptor ; EVENT_FILTER_DESCRIPTOR* in/out
, "UInt") ; return: DWORD●TdhCleanupPayloadEventFilterDescriptor(EventFilterDescriptor) = DLL("tdh.dll", "dword TdhCleanupPayloadEventFilterDescriptor(void*)")
# 呼び出し: TdhCleanupPayloadEventFilterDescriptor(EventFilterDescriptor)
# EventFilterDescriptor : EVENT_FILTER_DESCRIPTOR* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。