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