Win32 API 日本語リファレンス
ホームSystem.Rpc › RpcNetworkInqProtseqsA

RpcNetworkInqProtseqsA

関数
利用可能なプロトコルシーケンス一覧を取得する(ANSI版)。
DLLRPCRT4.dll文字セットANSI (-A)呼出規約winapi対応OSWindows 2000 以降

シグネチャ

// RPCRT4.dll  (ANSI / -A)
#include <windows.h>

RPC_STATUS RpcNetworkInqProtseqsA(
    RPC_PROTSEQ_VECTORA** ProtseqVector
);

パラメーター

名前方向
ProtseqVectorRPC_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 方式にも切替可。
出力引数:
; 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 方式にも切替可。
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_STATUS
function 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)。