Win32 API 日本語リファレンス
ホームNetworkManagement.NetworkDiagnosticsFramework › NdfCloseIncident

NdfCloseIncident

関数
診断インシデントを閉じて関連リソースを解放する。
DLLNDFAPI.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

HRESULT NdfCloseIncident(
    void* handle
);

パラメーター

名前方向
handlevoid*inout

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT NdfCloseIncident(
    void* handle
);
[DllImport("NDFAPI.dll", ExactSpelling = true)]
static extern int NdfCloseIncident(
    IntPtr handle   // void* in/out
);
<DllImport("NDFAPI.dll", ExactSpelling:=True)>
Public Shared Function NdfCloseIncident(
    handle As IntPtr   ' void* in/out
) As Integer
End Function
' handle : void* in/out
Declare PtrSafe Function NdfCloseIncident Lib "ndfapi" ( _
    ByVal handle As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

NdfCloseIncident = ctypes.windll.ndfapi.NdfCloseIncident
NdfCloseIncident.restype = ctypes.c_int
NdfCloseIncident.argtypes = [
    ctypes.POINTER(None),  # handle : void* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	ndfapi = windows.NewLazySystemDLL("NDFAPI.dll")
	procNdfCloseIncident = ndfapi.NewProc("NdfCloseIncident")
)

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