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