ホーム › NetworkManagement.NetworkDiagnosticsFramework › NdfCancelIncident
NdfCancelIncident
関数進行中の診断インシデント処理をキャンセルする。
シグネチャ
// NDFAPI.dll
#include <windows.h>
HRESULT NdfCancelIncident(
void* Handle
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Handle | void* | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// NDFAPI.dll
#include <windows.h>
HRESULT NdfCancelIncident(
void* Handle
);[DllImport("NDFAPI.dll", ExactSpelling = true)]
static extern int NdfCancelIncident(
IntPtr Handle // void*
);<DllImport("NDFAPI.dll", ExactSpelling:=True)>
Public Shared Function NdfCancelIncident(
Handle As IntPtr ' void*
) As Integer
End Function' Handle : void*
Declare PtrSafe Function NdfCancelIncident 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
NdfCancelIncident = ctypes.windll.ndfapi.NdfCancelIncident
NdfCancelIncident.restype = ctypes.c_int
NdfCancelIncident.argtypes = [
ctypes.POINTER(None), # Handle : void*
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('NDFAPI.dll')
NdfCancelIncident = Fiddle::Function.new(
lib['NdfCancelIncident'],
[
Fiddle::TYPE_VOIDP, # Handle : void*
],
Fiddle::TYPE_INT)#[link(name = "ndfapi")]
extern "system" {
fn NdfCancelIncident(
Handle: *mut () // void*
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("NDFAPI.dll")]
public static extern int NdfCancelIncident(IntPtr Handle);
"@
$api = Add-Type -MemberDefinition $sig -Name 'NDFAPI_NdfCancelIncident' -Namespace Win32 -PassThru
# $api::NdfCancelIncident(Handle)#uselib "NDFAPI.dll"
#func global NdfCancelIncident "NdfCancelIncident" sptr
; NdfCancelIncident Handle ; 戻り値は stat
; Handle : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "NDFAPI.dll"
#cfunc global NdfCancelIncident "NdfCancelIncident" sptr
; res = NdfCancelIncident(Handle)
; Handle : void* -> "sptr"; HRESULT NdfCancelIncident(void* Handle)
#uselib "NDFAPI.dll"
#cfunc global NdfCancelIncident "NdfCancelIncident" intptr
; res = NdfCancelIncident(Handle)
; Handle : void* -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
ndfapi = windows.NewLazySystemDLL("NDFAPI.dll")
procNdfCancelIncident = ndfapi.NewProc("NdfCancelIncident")
)
// Handle (void*)
r1, _, err := procNdfCancelIncident.Call(
uintptr(Handle),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction NdfCancelIncident(
Handle: Pointer // void*
): Integer; stdcall;
external 'NDFAPI.dll' name 'NdfCancelIncident';result := DllCall("NDFAPI\NdfCancelIncident"
, "Ptr", Handle ; void*
, "Int") ; return: HRESULT●NdfCancelIncident(Handle) = DLL("NDFAPI.dll", "int NdfCancelIncident(void*)")
# 呼び出し: NdfCancelIncident(Handle)
# Handle : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。