ホーム › Security.DiagnosticDataQuery › DdqFreeDiagnosticRecordProducers
DdqFreeDiagnosticRecordProducers
関数診断レコードのプロデューサー記述を解放する。
シグネチャ
// DiagnosticDataQuery.dll
#include <windows.h>
HRESULT DdqFreeDiagnosticRecordProducers(
HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION hProducerDescription
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hProducerDescription | HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION | in | 解放対象のイベントプロデューサー記述ハンドル。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// DiagnosticDataQuery.dll
#include <windows.h>
HRESULT DdqFreeDiagnosticRecordProducers(
HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION hProducerDescription
);[DllImport("DiagnosticDataQuery.dll", ExactSpelling = true)]
static extern int DdqFreeDiagnosticRecordProducers(
IntPtr hProducerDescription // HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
);<DllImport("DiagnosticDataQuery.dll", ExactSpelling:=True)>
Public Shared Function DdqFreeDiagnosticRecordProducers(
hProducerDescription As IntPtr ' HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
) As Integer
End Function' hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
Declare PtrSafe Function DdqFreeDiagnosticRecordProducers Lib "diagnosticdataquery" ( _
ByVal hProducerDescription As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DdqFreeDiagnosticRecordProducers = ctypes.windll.diagnosticdataquery.DdqFreeDiagnosticRecordProducers
DdqFreeDiagnosticRecordProducers.restype = ctypes.c_int
DdqFreeDiagnosticRecordProducers.argtypes = [
wintypes.HANDLE, # hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('DiagnosticDataQuery.dll')
DdqFreeDiagnosticRecordProducers = Fiddle::Function.new(
lib['DdqFreeDiagnosticRecordProducers'],
[
Fiddle::TYPE_VOIDP, # hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
],
Fiddle::TYPE_INT)#[link(name = "diagnosticdataquery")]
extern "system" {
fn DdqFreeDiagnosticRecordProducers(
hProducerDescription: *mut core::ffi::c_void // HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("DiagnosticDataQuery.dll")]
public static extern int DdqFreeDiagnosticRecordProducers(IntPtr hProducerDescription);
"@
$api = Add-Type -MemberDefinition $sig -Name 'DiagnosticDataQuery_DdqFreeDiagnosticRecordProducers' -Namespace Win32 -PassThru
# $api::DdqFreeDiagnosticRecordProducers(hProducerDescription)#uselib "DiagnosticDataQuery.dll"
#func global DdqFreeDiagnosticRecordProducers "DdqFreeDiagnosticRecordProducers" sptr
; DdqFreeDiagnosticRecordProducers hProducerDescription ; 戻り値は stat
; hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "DiagnosticDataQuery.dll"
#cfunc global DdqFreeDiagnosticRecordProducers "DdqFreeDiagnosticRecordProducers" sptr
; res = DdqFreeDiagnosticRecordProducers(hProducerDescription)
; hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION -> "sptr"; HRESULT DdqFreeDiagnosticRecordProducers(HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION hProducerDescription)
#uselib "DiagnosticDataQuery.dll"
#cfunc global DdqFreeDiagnosticRecordProducers "DdqFreeDiagnosticRecordProducers" intptr
; res = DdqFreeDiagnosticRecordProducers(hProducerDescription)
; hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
diagnosticdataquery = windows.NewLazySystemDLL("DiagnosticDataQuery.dll")
procDdqFreeDiagnosticRecordProducers = diagnosticdataquery.NewProc("DdqFreeDiagnosticRecordProducers")
)
// hProducerDescription (HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION)
r1, _, err := procDdqFreeDiagnosticRecordProducers.Call(
uintptr(hProducerDescription),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction DdqFreeDiagnosticRecordProducers(
hProducerDescription: THandle // HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
): Integer; stdcall;
external 'DiagnosticDataQuery.dll' name 'DdqFreeDiagnosticRecordProducers';result := DllCall("DiagnosticDataQuery\DdqFreeDiagnosticRecordProducers"
, "Ptr", hProducerDescription ; HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION
, "Int") ; return: HRESULT●DdqFreeDiagnosticRecordProducers(hProducerDescription) = DLL("DiagnosticDataQuery.dll", "int DdqFreeDiagnosticRecordProducers(void*)")
# 呼び出し: DdqFreeDiagnosticRecordProducers(hProducerDescription)
# hProducerDescription : HDIAGNOSTIC_EVENT_PRODUCER_DESCRIPTION -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。