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