ホーム › System.Rpc › RpcMgmtEpEltInqNextW
RpcMgmtEpEltInqNextW
関数エンドポイントマッパー照会から次の登録要素を取得する(Unicode版)。
シグネチャ
// RPCRT4.dll (Unicode / -W)
#include <windows.h>
RPC_STATUS RpcMgmtEpEltInqNextW(
void** InquiryContext,
RPC_IF_ID* IfId,
void** Binding, // optional
GUID* ObjectUuid, // optional
LPWSTR* Annotation // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| InquiryContext | void** | in |
| IfId | RPC_IF_ID* | out |
| Binding | void** | outoptional |
| ObjectUuid | GUID* | outoptional |
| Annotation | LPWSTR* | outoptional |
戻り値の型: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll (Unicode / -W)
#include <windows.h>
RPC_STATUS RpcMgmtEpEltInqNextW(
void** InquiryContext,
RPC_IF_ID* IfId,
void** Binding, // optional
GUID* ObjectUuid, // optional
LPWSTR* Annotation // optional
);[DllImport("RPCRT4.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int RpcMgmtEpEltInqNextW(
IntPtr InquiryContext, // void**
IntPtr IfId, // RPC_IF_ID* out
IntPtr Binding, // void** optional, out
IntPtr ObjectUuid, // GUID* optional, out
IntPtr Annotation // LPWSTR* optional, out
);<DllImport("RPCRT4.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function RpcMgmtEpEltInqNextW(
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 ' LPWSTR* optional, out
) As Integer
End Function' InquiryContext : void**
' IfId : RPC_IF_ID* out
' Binding : void** optional, out
' ObjectUuid : GUID* optional, out
' Annotation : LPWSTR* optional, out
Declare PtrSafe Function RpcMgmtEpEltInqNextW Lib "rpcrt4" ( _
ByVal InquiryContext As LongPtr, _
ByVal IfId As LongPtr, _
ByVal Binding As LongPtr, _
ByVal ObjectUuid As LongPtr, _
ByVal Annotation As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RpcMgmtEpEltInqNextW = ctypes.windll.rpcrt4.RpcMgmtEpEltInqNextW
RpcMgmtEpEltInqNextW.restype = ctypes.c_int
RpcMgmtEpEltInqNextW.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 : LPWSTR* optional, out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
RpcMgmtEpEltInqNextW = Fiddle::Function.new(
lib['RpcMgmtEpEltInqNextW'],
[
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 : LPWSTR* optional, out
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "rpcrt4")]
extern "system" {
fn RpcMgmtEpEltInqNextW(
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 u16 // LPWSTR* optional, out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll", CharSet = CharSet.Unicode)]
public static extern int RpcMgmtEpEltInqNextW(IntPtr InquiryContext, IntPtr IfId, IntPtr Binding, IntPtr ObjectUuid, IntPtr Annotation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcMgmtEpEltInqNextW' -Namespace Win32 -PassThru
# $api::RpcMgmtEpEltInqNextW(InquiryContext, IfId, Binding, ObjectUuid, Annotation)#uselib "RPCRT4.dll"
#func global RpcMgmtEpEltInqNextW "RpcMgmtEpEltInqNextW" wptr, wptr, wptr, wptr, wptr
; RpcMgmtEpEltInqNextW InquiryContext, varptr(IfId), Binding, varptr(ObjectUuid), varptr(Annotation) ; 戻り値は stat
; InquiryContext : void** -> "wptr"
; IfId : RPC_IF_ID* out -> "wptr"
; Binding : void** optional, out -> "wptr"
; ObjectUuid : GUID* optional, out -> "wptr"
; Annotation : LPWSTR* optional, out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqNextW "RpcMgmtEpEltInqNextW" sptr, var, sptr, var, var ; res = RpcMgmtEpEltInqNextW(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 : LPWSTR* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqNextW "RpcMgmtEpEltInqNextW" sptr, sptr, sptr, sptr, sptr ; res = RpcMgmtEpEltInqNextW(InquiryContext, varptr(IfId), Binding, varptr(ObjectUuid), varptr(Annotation)) ; InquiryContext : void** -> "sptr" ; IfId : RPC_IF_ID* out -> "sptr" ; Binding : void** optional, out -> "sptr" ; ObjectUuid : GUID* optional, out -> "sptr" ; Annotation : LPWSTR* optional, out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; RPC_STATUS RpcMgmtEpEltInqNextW(void** InquiryContext, RPC_IF_ID* IfId, void** Binding, GUID* ObjectUuid, LPWSTR* Annotation) #uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqNextW "RpcMgmtEpEltInqNextW" intptr, var, intptr, var, var ; res = RpcMgmtEpEltInqNextW(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 : LPWSTR* optional, out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; RPC_STATUS RpcMgmtEpEltInqNextW(void** InquiryContext, RPC_IF_ID* IfId, void** Binding, GUID* ObjectUuid, LPWSTR* Annotation) #uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqNextW "RpcMgmtEpEltInqNextW" intptr, intptr, intptr, intptr, intptr ; res = RpcMgmtEpEltInqNextW(InquiryContext, varptr(IfId), Binding, varptr(ObjectUuid), varptr(Annotation)) ; InquiryContext : void** -> "intptr" ; IfId : RPC_IF_ID* out -> "intptr" ; Binding : void** optional, out -> "intptr" ; ObjectUuid : GUID* optional, out -> "intptr" ; Annotation : LPWSTR* optional, out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procRpcMgmtEpEltInqNextW = rpcrt4.NewProc("RpcMgmtEpEltInqNextW")
)
// InquiryContext (void**), IfId (RPC_IF_ID* out), Binding (void** optional, out), ObjectUuid (GUID* optional, out), Annotation (LPWSTR* optional, out)
r1, _, err := procRpcMgmtEpEltInqNextW.Call(
uintptr(InquiryContext),
uintptr(IfId),
uintptr(Binding),
uintptr(ObjectUuid),
uintptr(Annotation),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction RpcMgmtEpEltInqNextW(
InquiryContext: Pointer; // void**
IfId: Pointer; // RPC_IF_ID* out
Binding: Pointer; // void** optional, out
ObjectUuid: PGUID; // GUID* optional, out
Annotation: PPWideChar // LPWSTR* optional, out
): Integer; stdcall;
external 'RPCRT4.dll' name 'RpcMgmtEpEltInqNextW';result := DllCall("RPCRT4\RpcMgmtEpEltInqNextW"
, "Ptr", InquiryContext ; void**
, "Ptr", IfId ; RPC_IF_ID* out
, "Ptr", Binding ; void** optional, out
, "Ptr", ObjectUuid ; GUID* optional, out
, "Ptr", Annotation ; LPWSTR* optional, out
, "Int") ; return: RPC_STATUS●RpcMgmtEpEltInqNextW(InquiryContext, IfId, Binding, ObjectUuid, Annotation) = DLL("RPCRT4.dll", "int RpcMgmtEpEltInqNextW(void*, void*, void*, void*, void*)")
# 呼び出し: RpcMgmtEpEltInqNextW(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 : LPWSTR* optional, out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。