Win32 API 日本語リファレンス
ホームSystem.Rpc › RpcMgmtEpEltInqNextA

RpcMgmtEpEltInqNextA

関数
エンドポイントマッパー照会から次の登録要素を取得する(ANSI版)。
DLLRPCRT4.dll文字セットANSI (-A)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// RPCRT4.dll  (ANSI / -A)
#include <windows.h>

RPC_STATUS RpcMgmtEpEltInqNextA(
    void** InquiryContext,
    RPC_IF_ID* IfId,
    void** Binding,   // optional
    GUID* ObjectUuid,   // optional
    LPSTR* Annotation   // optional
);

パラメーター

名前方向
InquiryContextvoid**in
IfIdRPC_IF_ID*out
Bindingvoid**outoptional
ObjectUuidGUID*outoptional
AnnotationLPSTR*outoptional

戻り値の型: RPC_STATUS

各言語での呼び出し定義

// RPCRT4.dll  (ANSI / -A)
#include <windows.h>

RPC_STATUS RpcMgmtEpEltInqNextA(
    void** InquiryContext,
    RPC_IF_ID* IfId,
    void** Binding,   // optional
    GUID* ObjectUuid,   // optional
    LPSTR* Annotation   // optional
);
[DllImport("RPCRT4.dll", CharSet = CharSet.Ansi, ExactSpelling = true)]
static extern int RpcMgmtEpEltInqNextA(
    IntPtr InquiryContext,   // void**
    IntPtr IfId,   // RPC_IF_ID* out
    IntPtr Binding,   // void** optional, out
    IntPtr ObjectUuid,   // GUID* optional, out
    IntPtr Annotation   // LPSTR* optional, out
);
<DllImport("RPCRT4.dll", CharSet:=CharSet.Ansi, ExactSpelling:=True)>
Public Shared Function RpcMgmtEpEltInqNextA(
    InquiryContext As IntPtr,   ' void**
    IfId As IntPtr,   ' RPC_IF_ID* out
    Binding As IntPtr,   ' void** optional, out
    ObjectUuid As IntPtr,   ' GUID* optional, out
    Annotation As IntPtr   ' LPSTR* optional, out
) As Integer
End Function
' InquiryContext : void**
' IfId : RPC_IF_ID* out
' Binding : void** optional, out
' ObjectUuid : GUID* optional, out
' Annotation : LPSTR* optional, out
Declare PtrSafe Function RpcMgmtEpEltInqNextA Lib "rpcrt4" ( _
    ByVal InquiryContext As LongPtr, _
    ByVal IfId As LongPtr, _
    ByVal Binding As LongPtr, _
    ByVal ObjectUuid As LongPtr, _
    ByVal Annotation As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RpcMgmtEpEltInqNextA = ctypes.windll.rpcrt4.RpcMgmtEpEltInqNextA
RpcMgmtEpEltInqNextA.restype = ctypes.c_int
RpcMgmtEpEltInqNextA.argtypes = [
    ctypes.c_void_p,  # InquiryContext : void**
    ctypes.c_void_p,  # IfId : RPC_IF_ID* out
    ctypes.c_void_p,  # Binding : void** optional, out
    ctypes.c_void_p,  # ObjectUuid : GUID* optional, out
    ctypes.c_void_p,  # Annotation : LPSTR* optional, out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcMgmtEpEltInqNextA = Fiddle::Function.new(
  lib['RpcMgmtEpEltInqNextA'],
  [
    Fiddle::TYPE_VOIDP,  # InquiryContext : void**
    Fiddle::TYPE_VOIDP,  # IfId : RPC_IF_ID* out
    Fiddle::TYPE_VOIDP,  # Binding : void** optional, out
    Fiddle::TYPE_VOIDP,  # ObjectUuid : GUID* optional, out
    Fiddle::TYPE_VOIDP,  # Annotation : LPSTR* optional, out
  ],
  Fiddle::TYPE_INT)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcMgmtEpEltInqNextA(
        InquiryContext: *mut *mut (),  // void**
        IfId: *mut RPC_IF_ID,  // RPC_IF_ID* out
        Binding: *mut *mut (),  // void** optional, out
        ObjectUuid: *mut GUID,  // GUID* optional, out
        Annotation: *mut *mut u8  // LPSTR* optional, out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll", CharSet = CharSet.Ansi)]
public static extern int RpcMgmtEpEltInqNextA(IntPtr InquiryContext, IntPtr IfId, IntPtr Binding, IntPtr ObjectUuid, IntPtr Annotation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcMgmtEpEltInqNextA' -Namespace Win32 -PassThru
# $api::RpcMgmtEpEltInqNextA(InquiryContext, IfId, Binding, ObjectUuid, Annotation)
#uselib "RPCRT4.dll"
#func global RpcMgmtEpEltInqNextA "RpcMgmtEpEltInqNextA" sptr, sptr, sptr, sptr, sptr
; RpcMgmtEpEltInqNextA InquiryContext, varptr(IfId), Binding, varptr(ObjectUuid), varptr(Annotation)   ; 戻り値は stat
; InquiryContext : void** -> "sptr"
; IfId : RPC_IF_ID* out -> "sptr"
; Binding : void** optional, out -> "sptr"
; ObjectUuid : GUID* optional, out -> "sptr"
; Annotation : LPSTR* optional, out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "RPCRT4.dll"
#cfunc global RpcMgmtEpEltInqNextA "RpcMgmtEpEltInqNextA" sptr, var, sptr, var, var
; res = RpcMgmtEpEltInqNextA(InquiryContext, IfId, Binding, ObjectUuid, Annotation)
; InquiryContext : void** -> "sptr"
; IfId : RPC_IF_ID* out -> "var"
; Binding : void** optional, out -> "sptr"
; ObjectUuid : GUID* optional, out -> "var"
; Annotation : LPSTR* optional, out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; RPC_STATUS RpcMgmtEpEltInqNextA(void** InquiryContext, RPC_IF_ID* IfId, void** Binding, GUID* ObjectUuid, LPSTR* Annotation)
#uselib "RPCRT4.dll"
#cfunc global RpcMgmtEpEltInqNextA "RpcMgmtEpEltInqNextA" intptr, var, intptr, var, var
; res = RpcMgmtEpEltInqNextA(InquiryContext, IfId, Binding, ObjectUuid, Annotation)
; InquiryContext : void** -> "intptr"
; IfId : RPC_IF_ID* out -> "var"
; Binding : void** optional, out -> "intptr"
; ObjectUuid : GUID* optional, out -> "var"
; Annotation : LPSTR* optional, out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcMgmtEpEltInqNextA = rpcrt4.NewProc("RpcMgmtEpEltInqNextA")
)

// InquiryContext (void**), IfId (RPC_IF_ID* out), Binding (void** optional, out), ObjectUuid (GUID* optional, out), Annotation (LPSTR* optional, out)
r1, _, err := procRpcMgmtEpEltInqNextA.Call(
	uintptr(InquiryContext),
	uintptr(IfId),
	uintptr(Binding),
	uintptr(ObjectUuid),
	uintptr(Annotation),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // RPC_STATUS
function RpcMgmtEpEltInqNextA(
  InquiryContext: Pointer;   // void**
  IfId: Pointer;   // RPC_IF_ID* out
  Binding: Pointer;   // void** optional, out
  ObjectUuid: PGUID;   // GUID* optional, out
  Annotation: PPAnsiChar   // LPSTR* optional, out
): Integer; stdcall;
  external 'RPCRT4.dll' name 'RpcMgmtEpEltInqNextA';
result := DllCall("RPCRT4\RpcMgmtEpEltInqNextA"
    , "Ptr", InquiryContext   ; void**
    , "Ptr", IfId   ; RPC_IF_ID* out
    , "Ptr", Binding   ; void** optional, out
    , "Ptr", ObjectUuid   ; GUID* optional, out
    , "Ptr", Annotation   ; LPSTR* optional, out
    , "Int")   ; return: RPC_STATUS
●RpcMgmtEpEltInqNextA(InquiryContext, IfId, Binding, ObjectUuid, Annotation) = DLL("RPCRT4.dll", "int RpcMgmtEpEltInqNextA(void*, void*, void*, void*, void*)")
# 呼び出し: RpcMgmtEpEltInqNextA(InquiryContext, IfId, Binding, ObjectUuid, Annotation)
# InquiryContext : void** -> "void*"
# IfId : RPC_IF_ID* out -> "void*"
# Binding : void** optional, out -> "void*"
# ObjectUuid : GUID* optional, out -> "void*"
# Annotation : LPSTR* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。