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