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