ホーム › NetworkManagement.Rras › MprAdminMIBEntryGetNext
MprAdminMIBEntryGetNext
関数ルーティングプロトコルの次のMIBエントリを取得する。
シグネチャ
// MPRAPI.dll
#include <windows.h>
DWORD MprAdminMIBEntryGetNext(
INT_PTR hMibServer,
DWORD dwProtocolId,
DWORD dwRoutingPid,
void* lpInEntry,
DWORD dwInEntrySize,
void** lplpOutEntry,
DWORD* lpOutEntrySize
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hMibServer | INT_PTR | in | MprAdminMIBServerConnectで取得したMIBサーバー接続ハンドル。 |
| dwProtocolId | DWORD | in | 列挙対象のルーティングプロトコルの識別子。 |
| dwRoutingPid | DWORD | in | ルーティングサブプロトコル(IP/IPX)の識別子。 |
| lpInEntry | void* | in | 現在位置を示す入力データを格納したバッファへのポインタ。 |
| dwInEntrySize | DWORD | in | lpInEntryが指す入力バッファのサイズ(バイト単位)。 |
| lplpOutEntry | void** | out | 次のエントリへのポインタを受け取る。MprAdminMIBBufferFreeで解放する。 |
| lpOutEntrySize | DWORD* | out | 返された出力バッファのサイズ(バイト単位)を受け取るポインタ。 |
戻り値の型: DWORD
各言語での呼び出し定義
// MPRAPI.dll
#include <windows.h>
DWORD MprAdminMIBEntryGetNext(
INT_PTR hMibServer,
DWORD dwProtocolId,
DWORD dwRoutingPid,
void* lpInEntry,
DWORD dwInEntrySize,
void** lplpOutEntry,
DWORD* lpOutEntrySize
);[DllImport("MPRAPI.dll", ExactSpelling = true)]
static extern uint MprAdminMIBEntryGetNext(
IntPtr hMibServer, // INT_PTR
uint dwProtocolId, // DWORD
uint dwRoutingPid, // DWORD
IntPtr lpInEntry, // void*
uint dwInEntrySize, // DWORD
IntPtr lplpOutEntry, // void** out
out uint lpOutEntrySize // DWORD* out
);<DllImport("MPRAPI.dll", ExactSpelling:=True)>
Public Shared Function MprAdminMIBEntryGetNext(
hMibServer As IntPtr, ' INT_PTR
dwProtocolId As UInteger, ' DWORD
dwRoutingPid As UInteger, ' DWORD
lpInEntry As IntPtr, ' void*
dwInEntrySize As UInteger, ' DWORD
lplpOutEntry As IntPtr, ' void** out
<Out> ByRef lpOutEntrySize As UInteger ' DWORD* out
) As UInteger
End Function' hMibServer : INT_PTR
' dwProtocolId : DWORD
' dwRoutingPid : DWORD
' lpInEntry : void*
' dwInEntrySize : DWORD
' lplpOutEntry : void** out
' lpOutEntrySize : DWORD* out
Declare PtrSafe Function MprAdminMIBEntryGetNext Lib "mprapi" ( _
ByVal hMibServer As LongPtr, _
ByVal dwProtocolId As Long, _
ByVal dwRoutingPid As Long, _
ByVal lpInEntry As LongPtr, _
ByVal dwInEntrySize As Long, _
ByVal lplpOutEntry As LongPtr, _
ByRef lpOutEntrySize As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MprAdminMIBEntryGetNext = ctypes.windll.mprapi.MprAdminMIBEntryGetNext
MprAdminMIBEntryGetNext.restype = wintypes.DWORD
MprAdminMIBEntryGetNext.argtypes = [
ctypes.c_ssize_t, # hMibServer : INT_PTR
wintypes.DWORD, # dwProtocolId : DWORD
wintypes.DWORD, # dwRoutingPid : DWORD
ctypes.POINTER(None), # lpInEntry : void*
wintypes.DWORD, # dwInEntrySize : DWORD
ctypes.c_void_p, # lplpOutEntry : void** out
ctypes.POINTER(wintypes.DWORD), # lpOutEntrySize : DWORD* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MPRAPI.dll')
MprAdminMIBEntryGetNext = Fiddle::Function.new(
lib['MprAdminMIBEntryGetNext'],
[
Fiddle::TYPE_INTPTR_T, # hMibServer : INT_PTR
-Fiddle::TYPE_INT, # dwProtocolId : DWORD
-Fiddle::TYPE_INT, # dwRoutingPid : DWORD
Fiddle::TYPE_VOIDP, # lpInEntry : void*
-Fiddle::TYPE_INT, # dwInEntrySize : DWORD
Fiddle::TYPE_VOIDP, # lplpOutEntry : void** out
Fiddle::TYPE_VOIDP, # lpOutEntrySize : DWORD* out
],
-Fiddle::TYPE_INT)#[link(name = "mprapi")]
extern "system" {
fn MprAdminMIBEntryGetNext(
hMibServer: isize, // INT_PTR
dwProtocolId: u32, // DWORD
dwRoutingPid: u32, // DWORD
lpInEntry: *mut (), // void*
dwInEntrySize: u32, // DWORD
lplpOutEntry: *mut *mut (), // void** out
lpOutEntrySize: *mut u32 // DWORD* out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MPRAPI.dll")]
public static extern uint MprAdminMIBEntryGetNext(IntPtr hMibServer, uint dwProtocolId, uint dwRoutingPid, IntPtr lpInEntry, uint dwInEntrySize, IntPtr lplpOutEntry, out uint lpOutEntrySize);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MPRAPI_MprAdminMIBEntryGetNext' -Namespace Win32 -PassThru
# $api::MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)#uselib "MPRAPI.dll"
#func global MprAdminMIBEntryGetNext "MprAdminMIBEntryGetNext" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; MprAdminMIBEntryGetNext hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, varptr(lpOutEntrySize) ; 戻り値は stat
; hMibServer : INT_PTR -> "sptr"
; dwProtocolId : DWORD -> "sptr"
; dwRoutingPid : DWORD -> "sptr"
; lpInEntry : void* -> "sptr"
; dwInEntrySize : DWORD -> "sptr"
; lplpOutEntry : void** out -> "sptr"
; lpOutEntrySize : DWORD* out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "MPRAPI.dll" #cfunc global MprAdminMIBEntryGetNext "MprAdminMIBEntryGetNext" sptr, int, int, sptr, int, sptr, var ; res = MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize) ; hMibServer : INT_PTR -> "sptr" ; dwProtocolId : DWORD -> "int" ; dwRoutingPid : DWORD -> "int" ; lpInEntry : void* -> "sptr" ; dwInEntrySize : DWORD -> "int" ; lplpOutEntry : void** out -> "sptr" ; lpOutEntrySize : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "MPRAPI.dll" #cfunc global MprAdminMIBEntryGetNext "MprAdminMIBEntryGetNext" sptr, int, int, sptr, int, sptr, sptr ; res = MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, varptr(lpOutEntrySize)) ; hMibServer : INT_PTR -> "sptr" ; dwProtocolId : DWORD -> "int" ; dwRoutingPid : DWORD -> "int" ; lpInEntry : void* -> "sptr" ; dwInEntrySize : DWORD -> "int" ; lplpOutEntry : void** out -> "sptr" ; lpOutEntrySize : DWORD* out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD MprAdminMIBEntryGetNext(INT_PTR hMibServer, DWORD dwProtocolId, DWORD dwRoutingPid, void* lpInEntry, DWORD dwInEntrySize, void** lplpOutEntry, DWORD* lpOutEntrySize) #uselib "MPRAPI.dll" #cfunc global MprAdminMIBEntryGetNext "MprAdminMIBEntryGetNext" intptr, int, int, intptr, int, intptr, var ; res = MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize) ; hMibServer : INT_PTR -> "intptr" ; dwProtocolId : DWORD -> "int" ; dwRoutingPid : DWORD -> "int" ; lpInEntry : void* -> "intptr" ; dwInEntrySize : DWORD -> "int" ; lplpOutEntry : void** out -> "intptr" ; lpOutEntrySize : DWORD* out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD MprAdminMIBEntryGetNext(INT_PTR hMibServer, DWORD dwProtocolId, DWORD dwRoutingPid, void* lpInEntry, DWORD dwInEntrySize, void** lplpOutEntry, DWORD* lpOutEntrySize) #uselib "MPRAPI.dll" #cfunc global MprAdminMIBEntryGetNext "MprAdminMIBEntryGetNext" intptr, int, int, intptr, int, intptr, intptr ; res = MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, varptr(lpOutEntrySize)) ; hMibServer : INT_PTR -> "intptr" ; dwProtocolId : DWORD -> "int" ; dwRoutingPid : DWORD -> "int" ; lpInEntry : void* -> "intptr" ; dwInEntrySize : DWORD -> "int" ; lplpOutEntry : void** out -> "intptr" ; lpOutEntrySize : DWORD* out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
procMprAdminMIBEntryGetNext = mprapi.NewProc("MprAdminMIBEntryGetNext")
)
// hMibServer (INT_PTR), dwProtocolId (DWORD), dwRoutingPid (DWORD), lpInEntry (void*), dwInEntrySize (DWORD), lplpOutEntry (void** out), lpOutEntrySize (DWORD* out)
r1, _, err := procMprAdminMIBEntryGetNext.Call(
uintptr(hMibServer),
uintptr(dwProtocolId),
uintptr(dwRoutingPid),
uintptr(lpInEntry),
uintptr(dwInEntrySize),
uintptr(lplpOutEntry),
uintptr(lpOutEntrySize),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction MprAdminMIBEntryGetNext(
hMibServer: NativeInt; // INT_PTR
dwProtocolId: DWORD; // DWORD
dwRoutingPid: DWORD; // DWORD
lpInEntry: Pointer; // void*
dwInEntrySize: DWORD; // DWORD
lplpOutEntry: Pointer; // void** out
lpOutEntrySize: Pointer // DWORD* out
): DWORD; stdcall;
external 'MPRAPI.dll' name 'MprAdminMIBEntryGetNext';result := DllCall("MPRAPI\MprAdminMIBEntryGetNext"
, "Ptr", hMibServer ; INT_PTR
, "UInt", dwProtocolId ; DWORD
, "UInt", dwRoutingPid ; DWORD
, "Ptr", lpInEntry ; void*
, "UInt", dwInEntrySize ; DWORD
, "Ptr", lplpOutEntry ; void** out
, "Ptr", lpOutEntrySize ; DWORD* out
, "UInt") ; return: DWORD●MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize) = DLL("MPRAPI.dll", "dword MprAdminMIBEntryGetNext(int, dword, dword, void*, dword, void*, void*)")
# 呼び出し: MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)
# hMibServer : INT_PTR -> "int"
# dwProtocolId : DWORD -> "dword"
# dwRoutingPid : DWORD -> "dword"
# lpInEntry : void* -> "void*"
# dwInEntrySize : DWORD -> "dword"
# lplpOutEntry : void** out -> "void*"
# lpOutEntrySize : DWORD* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "mprapi" fn MprAdminMIBEntryGetNext(
hMibServer: isize, // INT_PTR
dwProtocolId: u32, // DWORD
dwRoutingPid: u32, // DWORD
lpInEntry: ?*anyopaque, // void*
dwInEntrySize: u32, // DWORD
lplpOutEntry: ?*anyopaque, // void** out
lpOutEntrySize: [*c]u32 // DWORD* out
) callconv(std.os.windows.WINAPI) u32;proc MprAdminMIBEntryGetNext(
hMibServer: int, # INT_PTR
dwProtocolId: uint32, # DWORD
dwRoutingPid: uint32, # DWORD
lpInEntry: pointer, # void*
dwInEntrySize: uint32, # DWORD
lplpOutEntry: pointer, # void** out
lpOutEntrySize: ptr uint32 # DWORD* out
): uint32 {.importc: "MprAdminMIBEntryGetNext", stdcall, dynlib: "MPRAPI.dll".}pragma(lib, "mprapi");
extern(Windows)
uint MprAdminMIBEntryGetNext(
ptrdiff_t hMibServer, // INT_PTR
uint dwProtocolId, // DWORD
uint dwRoutingPid, // DWORD
void* lpInEntry, // void*
uint dwInEntrySize, // DWORD
void** lplpOutEntry, // void** out
uint* lpOutEntrySize // DWORD* out
);ccall((:MprAdminMIBEntryGetNext, "MPRAPI.dll"), stdcall, UInt32,
(Int, UInt32, UInt32, Ptr{Cvoid}, UInt32, Ptr{Cvoid}, Ptr{UInt32}),
hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)
# hMibServer : INT_PTR -> Int
# dwProtocolId : DWORD -> UInt32
# dwRoutingPid : DWORD -> UInt32
# lpInEntry : void* -> Ptr{Cvoid}
# dwInEntrySize : DWORD -> UInt32
# lplpOutEntry : void** out -> Ptr{Cvoid}
# lpOutEntrySize : DWORD* out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
uint32_t MprAdminMIBEntryGetNext(
intptr_t hMibServer,
uint32_t dwProtocolId,
uint32_t dwRoutingPid,
void* lpInEntry,
uint32_t dwInEntrySize,
void** lplpOutEntry,
uint32_t* lpOutEntrySize);
]]
local mprapi = ffi.load("mprapi")
-- mprapi.MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)
-- hMibServer : INT_PTR
-- dwProtocolId : DWORD
-- dwRoutingPid : DWORD
-- lpInEntry : void*
-- dwInEntrySize : DWORD
-- lplpOutEntry : void** out
-- lpOutEntrySize : DWORD* out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('MPRAPI.dll');
const MprAdminMIBEntryGetNext = lib.func('__stdcall', 'MprAdminMIBEntryGetNext', 'uint32_t', ['intptr_t', 'uint32_t', 'uint32_t', 'void *', 'uint32_t', 'void *', 'uint32_t *']);
// MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)
// hMibServer : INT_PTR -> 'intptr_t'
// dwProtocolId : DWORD -> 'uint32_t'
// dwRoutingPid : DWORD -> 'uint32_t'
// lpInEntry : void* -> 'void *'
// dwInEntrySize : DWORD -> 'uint32_t'
// lplpOutEntry : void** out -> 'void *'
// lpOutEntrySize : DWORD* out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("MPRAPI.dll", {
MprAdminMIBEntryGetNext: { parameters: ["isize", "u32", "u32", "pointer", "u32", "pointer", "pointer"], result: "u32" },
});
// lib.symbols.MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize)
// hMibServer : INT_PTR -> "isize"
// dwProtocolId : DWORD -> "u32"
// dwRoutingPid : DWORD -> "u32"
// lpInEntry : void* -> "pointer"
// dwInEntrySize : DWORD -> "u32"
// lplpOutEntry : void** out -> "pointer"
// lpOutEntrySize : DWORD* out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
uint32_t MprAdminMIBEntryGetNext(
intptr_t hMibServer,
uint32_t dwProtocolId,
uint32_t dwRoutingPid,
void* lpInEntry,
uint32_t dwInEntrySize,
void** lplpOutEntry,
uint32_t* lpOutEntrySize);
C, "MPRAPI.dll");
// $ffi->MprAdminMIBEntryGetNext(hMibServer, dwProtocolId, dwRoutingPid, lpInEntry, dwInEntrySize, lplpOutEntry, lpOutEntrySize);
// hMibServer : INT_PTR
// dwProtocolId : DWORD
// dwRoutingPid : DWORD
// lpInEntry : void*
// dwInEntrySize : DWORD
// lplpOutEntry : void** out
// lpOutEntrySize : DWORD* out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Mprapi extends StdCallLibrary {
Mprapi INSTANCE = Native.load("mprapi", Mprapi.class);
int MprAdminMIBEntryGetNext(
long hMibServer, // INT_PTR
int dwProtocolId, // DWORD
int dwRoutingPid, // DWORD
Pointer lpInEntry, // void*
int dwInEntrySize, // DWORD
Pointer lplpOutEntry, // void** out
IntByReference lpOutEntrySize // DWORD* out
);
}@[Link("mprapi")]
lib LibMPRAPI
fun MprAdminMIBEntryGetNext = MprAdminMIBEntryGetNext(
hMibServer : LibC::SSizeT, # INT_PTR
dwProtocolId : UInt32, # DWORD
dwRoutingPid : UInt32, # DWORD
lpInEntry : Void*, # void*
dwInEntrySize : UInt32, # DWORD
lplpOutEntry : Void**, # void** out
lpOutEntrySize : UInt32* # DWORD* out
) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef MprAdminMIBEntryGetNextNative = Uint32 Function(IntPtr, Uint32, Uint32, Pointer<Void>, Uint32, Pointer<Void>, Pointer<Uint32>);
typedef MprAdminMIBEntryGetNextDart = int Function(int, int, int, Pointer<Void>, int, Pointer<Void>, Pointer<Uint32>);
final MprAdminMIBEntryGetNext = DynamicLibrary.open('MPRAPI.dll')
.lookupFunction<MprAdminMIBEntryGetNextNative, MprAdminMIBEntryGetNextDart>('MprAdminMIBEntryGetNext');
// hMibServer : INT_PTR -> IntPtr
// dwProtocolId : DWORD -> Uint32
// dwRoutingPid : DWORD -> Uint32
// lpInEntry : void* -> Pointer<Void>
// dwInEntrySize : DWORD -> Uint32
// lplpOutEntry : void** out -> Pointer<Void>
// lpOutEntrySize : DWORD* out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function MprAdminMIBEntryGetNext(
hMibServer: NativeInt; // INT_PTR
dwProtocolId: DWORD; // DWORD
dwRoutingPid: DWORD; // DWORD
lpInEntry: Pointer; // void*
dwInEntrySize: DWORD; // DWORD
lplpOutEntry: Pointer; // void** out
lpOutEntrySize: Pointer // DWORD* out
): DWORD; stdcall;
external 'MPRAPI.dll' name 'MprAdminMIBEntryGetNext';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "MprAdminMIBEntryGetNext"
c_MprAdminMIBEntryGetNext :: CIntPtr -> Word32 -> Word32 -> Ptr () -> Word32 -> Ptr () -> Ptr Word32 -> IO Word32
-- hMibServer : INT_PTR -> CIntPtr
-- dwProtocolId : DWORD -> Word32
-- dwRoutingPid : DWORD -> Word32
-- lpInEntry : void* -> Ptr ()
-- dwInEntrySize : DWORD -> Word32
-- lplpOutEntry : void** out -> Ptr ()
-- lpOutEntrySize : DWORD* out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let mpradminmibentrygetnext =
foreign "MprAdminMIBEntryGetNext"
(intptr_t @-> uint32_t @-> uint32_t @-> (ptr void) @-> uint32_t @-> (ptr void) @-> (ptr uint32_t) @-> returning uint32_t)
(* hMibServer : INT_PTR -> intptr_t *)
(* dwProtocolId : DWORD -> uint32_t *)
(* dwRoutingPid : DWORD -> uint32_t *)
(* lpInEntry : void* -> (ptr void) *)
(* dwInEntrySize : DWORD -> uint32_t *)
(* lplpOutEntry : void** out -> (ptr void) *)
(* lpOutEntrySize : DWORD* out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library mprapi (t "MPRAPI.dll"))
(cffi:use-foreign-library mprapi)
(cffi:defcfun ("MprAdminMIBEntryGetNext" mpr-admin-mibentry-get-next :convention :stdcall) :uint32
(h-mib-server :int64) ; INT_PTR
(dw-protocol-id :uint32) ; DWORD
(dw-routing-pid :uint32) ; DWORD
(lp-in-entry :pointer) ; void*
(dw-in-entry-size :uint32) ; DWORD
(lplp-out-entry :pointer) ; void** out
(lp-out-entry-size :pointer)) ; DWORD* out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $MprAdminMIBEntryGetNext = Win32::API::More->new('MPRAPI',
'DWORD MprAdminMIBEntryGetNext(LPARAM hMibServer, DWORD dwProtocolId, DWORD dwRoutingPid, LPVOID lpInEntry, DWORD dwInEntrySize, LPVOID lplpOutEntry, LPVOID lpOutEntrySize)');
# my $ret = $MprAdminMIBEntryGetNext->Call($hMibServer, $dwProtocolId, $dwRoutingPid, $lpInEntry, $dwInEntrySize, $lplpOutEntry, $lpOutEntrySize);
# hMibServer : INT_PTR -> LPARAM
# dwProtocolId : DWORD -> DWORD
# dwRoutingPid : DWORD -> DWORD
# lpInEntry : void* -> LPVOID
# dwInEntrySize : DWORD -> DWORD
# lplpOutEntry : void** out -> LPVOID
# lpOutEntrySize : DWORD* out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。