ホーム › NetworkManagement.Snmp › SnmpCleanupEx
SnmpCleanupEx
関数WinSNMP APIの拡張版終了処理を行いリソースを解放する。
シグネチャ
// wsnmp32.dll
#include <windows.h>
DWORD SnmpCleanupEx(void);パラメーターなし。戻り値: DWORD
各言語での呼び出し定義
// wsnmp32.dll
#include <windows.h>
DWORD SnmpCleanupEx(void);[DllImport("wsnmp32.dll", ExactSpelling = true)]
static extern uint SnmpCleanupEx();<DllImport("wsnmp32.dll", ExactSpelling:=True)>
Public Shared Function SnmpCleanupEx() As UInteger
End FunctionDeclare PtrSafe Function SnmpCleanupEx Lib "wsnmp32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SnmpCleanupEx = ctypes.windll.wsnmp32.SnmpCleanupEx
SnmpCleanupEx.restype = wintypes.DWORD
SnmpCleanupEx.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wsnmp32.dll')
SnmpCleanupEx = Fiddle::Function.new(
lib['SnmpCleanupEx'],
[],
-Fiddle::TYPE_INT)#[link(name = "wsnmp32")]
extern "system" {
fn SnmpCleanupEx() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wsnmp32.dll")]
public static extern uint SnmpCleanupEx();
"@
$api = Add-Type -MemberDefinition $sig -Name 'wsnmp32_SnmpCleanupEx' -Namespace Win32 -PassThru
# $api::SnmpCleanupEx()#uselib "wsnmp32.dll"
#func global SnmpCleanupEx "SnmpCleanupEx"
; SnmpCleanupEx ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "wsnmp32.dll"
#cfunc global SnmpCleanupEx "SnmpCleanupEx"
; res = SnmpCleanupEx(); DWORD SnmpCleanupEx()
#uselib "wsnmp32.dll"
#cfunc global SnmpCleanupEx "SnmpCleanupEx"
; res = SnmpCleanupEx()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsnmp32 = windows.NewLazySystemDLL("wsnmp32.dll")
procSnmpCleanupEx = wsnmp32.NewProc("SnmpCleanupEx")
)
r1, _, err := procSnmpCleanupEx.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction SnmpCleanupEx: DWORD; stdcall;
external 'wsnmp32.dll' name 'SnmpCleanupEx';result := DllCall("wsnmp32\SnmpCleanupEx", "UInt")●SnmpCleanupEx() = DLL("wsnmp32.dll", "dword SnmpCleanupEx()")
# 呼び出し: SnmpCleanupEx()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。