ホーム › System.Rpc › RpcMgmtEpEltInqBegin
RpcMgmtEpEltInqBegin
関数エンドポイントマッパーデータベースの照会を開始しコンテキストを取得する。
シグネチャ
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcMgmtEpEltInqBegin(
void* EpBinding, // optional
DWORD InquiryType,
RPC_IF_ID* IfId, // optional
DWORD VersOption, // optional
GUID* ObjectUuid, // optional
void*** InquiryContext
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| EpBinding | void* | inoptional |
| InquiryType | DWORD | in |
| IfId | RPC_IF_ID* | inoptional |
| VersOption | DWORD | inoptional |
| ObjectUuid | GUID* | inoptional |
| InquiryContext | void*** | out |
戻り値の型: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcMgmtEpEltInqBegin(
void* EpBinding, // optional
DWORD InquiryType,
RPC_IF_ID* IfId, // optional
DWORD VersOption, // optional
GUID* ObjectUuid, // optional
void*** InquiryContext
);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int RpcMgmtEpEltInqBegin(
IntPtr EpBinding, // void* optional
uint InquiryType, // DWORD
IntPtr IfId, // RPC_IF_ID* optional
uint VersOption, // DWORD optional
IntPtr ObjectUuid, // GUID* optional
IntPtr InquiryContext // void*** out
);<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function RpcMgmtEpEltInqBegin(
EpBinding As IntPtr, ' void* optional
InquiryType As UInteger, ' DWORD
IfId As IntPtr, ' RPC_IF_ID* optional
VersOption As UInteger, ' DWORD optional
ObjectUuid As IntPtr, ' GUID* optional
InquiryContext As IntPtr ' void*** out
) As Integer
End Function' EpBinding : void* optional
' InquiryType : DWORD
' IfId : RPC_IF_ID* optional
' VersOption : DWORD optional
' ObjectUuid : GUID* optional
' InquiryContext : void*** out
Declare PtrSafe Function RpcMgmtEpEltInqBegin Lib "rpcrt4" ( _
ByVal EpBinding As LongPtr, _
ByVal InquiryType As Long, _
ByVal IfId As LongPtr, _
ByVal VersOption As Long, _
ByVal ObjectUuid As LongPtr, _
ByVal InquiryContext As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RpcMgmtEpEltInqBegin = ctypes.windll.rpcrt4.RpcMgmtEpEltInqBegin
RpcMgmtEpEltInqBegin.restype = ctypes.c_int
RpcMgmtEpEltInqBegin.argtypes = [
ctypes.POINTER(None), # EpBinding : void* optional
wintypes.DWORD, # InquiryType : DWORD
ctypes.c_void_p, # IfId : RPC_IF_ID* optional
wintypes.DWORD, # VersOption : DWORD optional
ctypes.c_void_p, # ObjectUuid : GUID* optional
ctypes.c_void_p, # InquiryContext : void*** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
RpcMgmtEpEltInqBegin = Fiddle::Function.new(
lib['RpcMgmtEpEltInqBegin'],
[
Fiddle::TYPE_VOIDP, # EpBinding : void* optional
-Fiddle::TYPE_INT, # InquiryType : DWORD
Fiddle::TYPE_VOIDP, # IfId : RPC_IF_ID* optional
-Fiddle::TYPE_INT, # VersOption : DWORD optional
Fiddle::TYPE_VOIDP, # ObjectUuid : GUID* optional
Fiddle::TYPE_VOIDP, # InquiryContext : void*** out
],
Fiddle::TYPE_INT)#[link(name = "rpcrt4")]
extern "system" {
fn RpcMgmtEpEltInqBegin(
EpBinding: *mut (), // void* optional
InquiryType: u32, // DWORD
IfId: *mut RPC_IF_ID, // RPC_IF_ID* optional
VersOption: u32, // DWORD optional
ObjectUuid: *mut GUID, // GUID* optional
InquiryContext: *mut *mut *mut () // void*** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcMgmtEpEltInqBegin(IntPtr EpBinding, uint InquiryType, IntPtr IfId, uint VersOption, IntPtr ObjectUuid, IntPtr InquiryContext);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcMgmtEpEltInqBegin' -Namespace Win32 -PassThru
# $api::RpcMgmtEpEltInqBegin(EpBinding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext)#uselib "RPCRT4.dll"
#func global RpcMgmtEpEltInqBegin "RpcMgmtEpEltInqBegin" sptr, sptr, sptr, sptr, sptr, sptr
; RpcMgmtEpEltInqBegin EpBinding, InquiryType, varptr(IfId), VersOption, varptr(ObjectUuid), InquiryContext ; 戻り値は stat
; EpBinding : void* optional -> "sptr"
; InquiryType : DWORD -> "sptr"
; IfId : RPC_IF_ID* optional -> "sptr"
; VersOption : DWORD optional -> "sptr"
; ObjectUuid : GUID* optional -> "sptr"
; InquiryContext : void*** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqBegin "RpcMgmtEpEltInqBegin" sptr, int, var, int, var, sptr ; res = RpcMgmtEpEltInqBegin(EpBinding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext) ; EpBinding : void* optional -> "sptr" ; InquiryType : DWORD -> "int" ; IfId : RPC_IF_ID* optional -> "var" ; VersOption : DWORD optional -> "int" ; ObjectUuid : GUID* optional -> "var" ; InquiryContext : void*** out -> "sptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqBegin "RpcMgmtEpEltInqBegin" sptr, int, sptr, int, sptr, sptr ; res = RpcMgmtEpEltInqBegin(EpBinding, InquiryType, varptr(IfId), VersOption, varptr(ObjectUuid), InquiryContext) ; EpBinding : void* optional -> "sptr" ; InquiryType : DWORD -> "int" ; IfId : RPC_IF_ID* optional -> "sptr" ; VersOption : DWORD optional -> "int" ; ObjectUuid : GUID* optional -> "sptr" ; InquiryContext : void*** out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; RPC_STATUS RpcMgmtEpEltInqBegin(void* EpBinding, DWORD InquiryType, RPC_IF_ID* IfId, DWORD VersOption, GUID* ObjectUuid, void*** InquiryContext) #uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqBegin "RpcMgmtEpEltInqBegin" intptr, int, var, int, var, intptr ; res = RpcMgmtEpEltInqBegin(EpBinding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext) ; EpBinding : void* optional -> "intptr" ; InquiryType : DWORD -> "int" ; IfId : RPC_IF_ID* optional -> "var" ; VersOption : DWORD optional -> "int" ; ObjectUuid : GUID* optional -> "var" ; InquiryContext : void*** out -> "intptr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; RPC_STATUS RpcMgmtEpEltInqBegin(void* EpBinding, DWORD InquiryType, RPC_IF_ID* IfId, DWORD VersOption, GUID* ObjectUuid, void*** InquiryContext) #uselib "RPCRT4.dll" #cfunc global RpcMgmtEpEltInqBegin "RpcMgmtEpEltInqBegin" intptr, int, intptr, int, intptr, intptr ; res = RpcMgmtEpEltInqBegin(EpBinding, InquiryType, varptr(IfId), VersOption, varptr(ObjectUuid), InquiryContext) ; EpBinding : void* optional -> "intptr" ; InquiryType : DWORD -> "int" ; IfId : RPC_IF_ID* optional -> "intptr" ; VersOption : DWORD optional -> "int" ; ObjectUuid : GUID* optional -> "intptr" ; InquiryContext : void*** out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procRpcMgmtEpEltInqBegin = rpcrt4.NewProc("RpcMgmtEpEltInqBegin")
)
// EpBinding (void* optional), InquiryType (DWORD), IfId (RPC_IF_ID* optional), VersOption (DWORD optional), ObjectUuid (GUID* optional), InquiryContext (void*** out)
r1, _, err := procRpcMgmtEpEltInqBegin.Call(
uintptr(EpBinding),
uintptr(InquiryType),
uintptr(IfId),
uintptr(VersOption),
uintptr(ObjectUuid),
uintptr(InquiryContext),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction RpcMgmtEpEltInqBegin(
EpBinding: Pointer; // void* optional
InquiryType: DWORD; // DWORD
IfId: Pointer; // RPC_IF_ID* optional
VersOption: DWORD; // DWORD optional
ObjectUuid: PGUID; // GUID* optional
InquiryContext: Pointer // void*** out
): Integer; stdcall;
external 'RPCRT4.dll' name 'RpcMgmtEpEltInqBegin';result := DllCall("RPCRT4\RpcMgmtEpEltInqBegin"
, "Ptr", EpBinding ; void* optional
, "UInt", InquiryType ; DWORD
, "Ptr", IfId ; RPC_IF_ID* optional
, "UInt", VersOption ; DWORD optional
, "Ptr", ObjectUuid ; GUID* optional
, "Ptr", InquiryContext ; void*** out
, "Int") ; return: RPC_STATUS●RpcMgmtEpEltInqBegin(EpBinding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext) = DLL("RPCRT4.dll", "int RpcMgmtEpEltInqBegin(void*, dword, void*, dword, void*, void*)")
# 呼び出し: RpcMgmtEpEltInqBegin(EpBinding, InquiryType, IfId, VersOption, ObjectUuid, InquiryContext)
# EpBinding : void* optional -> "void*"
# InquiryType : DWORD -> "dword"
# IfId : RPC_IF_ID* optional -> "void*"
# VersOption : DWORD optional -> "dword"
# ObjectUuid : GUID* optional -> "void*"
# InquiryContext : void*** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。