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