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