ホーム › NetworkManagement.Snmp › SnmpDeleteVb
SnmpDeleteVb
関数変数バインドリストから指定位置の変数バインドを削除する。
シグネチャ
// wsnmp32.dll
#include <windows.h>
DWORD SnmpDeleteVb(
INT_PTR vbl,
DWORD index
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| vbl | INT_PTR | in |
| index | DWORD | in |
戻り値の型: DWORD
各言語での呼び出し定義
// wsnmp32.dll
#include <windows.h>
DWORD SnmpDeleteVb(
INT_PTR vbl,
DWORD index
);[DllImport("wsnmp32.dll", ExactSpelling = true)]
static extern uint SnmpDeleteVb(
IntPtr vbl, // INT_PTR
uint index // DWORD
);<DllImport("wsnmp32.dll", ExactSpelling:=True)>
Public Shared Function SnmpDeleteVb(
vbl As IntPtr, ' INT_PTR
index As UInteger ' DWORD
) As UInteger
End Function' vbl : INT_PTR
' index : DWORD
Declare PtrSafe Function SnmpDeleteVb Lib "wsnmp32" ( _
ByVal vbl As LongPtr, _
ByVal index As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
SnmpDeleteVb = ctypes.windll.wsnmp32.SnmpDeleteVb
SnmpDeleteVb.restype = wintypes.DWORD
SnmpDeleteVb.argtypes = [
ctypes.c_ssize_t, # vbl : INT_PTR
wintypes.DWORD, # index : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('wsnmp32.dll')
SnmpDeleteVb = Fiddle::Function.new(
lib['SnmpDeleteVb'],
[
Fiddle::TYPE_INTPTR_T, # vbl : INT_PTR
-Fiddle::TYPE_INT, # index : DWORD
],
-Fiddle::TYPE_INT)#[link(name = "wsnmp32")]
extern "system" {
fn SnmpDeleteVb(
vbl: isize, // INT_PTR
index: u32 // DWORD
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("wsnmp32.dll")]
public static extern uint SnmpDeleteVb(IntPtr vbl, uint index);
"@
$api = Add-Type -MemberDefinition $sig -Name 'wsnmp32_SnmpDeleteVb' -Namespace Win32 -PassThru
# $api::SnmpDeleteVb(vbl, index)#uselib "wsnmp32.dll"
#func global SnmpDeleteVb "SnmpDeleteVb" sptr, sptr
; SnmpDeleteVb vbl, index ; 戻り値は stat
; vbl : INT_PTR -> "sptr"
; index : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "wsnmp32.dll"
#cfunc global SnmpDeleteVb "SnmpDeleteVb" sptr, int
; res = SnmpDeleteVb(vbl, index)
; vbl : INT_PTR -> "sptr"
; index : DWORD -> "int"; DWORD SnmpDeleteVb(INT_PTR vbl, DWORD index)
#uselib "wsnmp32.dll"
#cfunc global SnmpDeleteVb "SnmpDeleteVb" intptr, int
; res = SnmpDeleteVb(vbl, index)
; vbl : INT_PTR -> "intptr"
; index : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsnmp32 = windows.NewLazySystemDLL("wsnmp32.dll")
procSnmpDeleteVb = wsnmp32.NewProc("SnmpDeleteVb")
)
// vbl (INT_PTR), index (DWORD)
r1, _, err := procSnmpDeleteVb.Call(
uintptr(vbl),
uintptr(index),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction SnmpDeleteVb(
vbl: NativeInt; // INT_PTR
index: DWORD // DWORD
): DWORD; stdcall;
external 'wsnmp32.dll' name 'SnmpDeleteVb';result := DllCall("wsnmp32\SnmpDeleteVb"
, "Ptr", vbl ; INT_PTR
, "UInt", index ; DWORD
, "UInt") ; return: DWORD●SnmpDeleteVb(vbl, index) = DLL("wsnmp32.dll", "dword SnmpDeleteVb(int, dword)")
# 呼び出し: SnmpDeleteVb(vbl, index)
# vbl : INT_PTR -> "int"
# index : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。