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

RpcServerInterfaceGroupActivate

関数
インターフェイスグループを有効化して要求の受信を開始する。
DLLRPCRT4.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// RPCRT4.dll
#include <windows.h>

RPC_STATUS RpcServerInterfaceGroupActivate(
    void* IfGroup
);

パラメーター

名前方向
IfGroupvoid*in

戻り値の型: RPC_STATUS

各言語での呼び出し定義

// RPCRT4.dll
#include <windows.h>

RPC_STATUS RpcServerInterfaceGroupActivate(
    void* IfGroup
);
[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int RpcServerInterfaceGroupActivate(
    IntPtr IfGroup   // void*
);
<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function RpcServerInterfaceGroupActivate(
    IfGroup As IntPtr   ' void*
) As Integer
End Function
' IfGroup : void*
Declare PtrSafe Function RpcServerInterfaceGroupActivate Lib "rpcrt4" ( _
    ByVal IfGroup As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RpcServerInterfaceGroupActivate = ctypes.windll.rpcrt4.RpcServerInterfaceGroupActivate
RpcServerInterfaceGroupActivate.restype = ctypes.c_int
RpcServerInterfaceGroupActivate.argtypes = [
    ctypes.POINTER(None),  # IfGroup : void*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('RPCRT4.dll')
RpcServerInterfaceGroupActivate = Fiddle::Function.new(
  lib['RpcServerInterfaceGroupActivate'],
  [
    Fiddle::TYPE_VOIDP,  # IfGroup : void*
  ],
  Fiddle::TYPE_INT)
#[link(name = "rpcrt4")]
extern "system" {
    fn RpcServerInterfaceGroupActivate(
        IfGroup: *mut ()  // void*
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcServerInterfaceGroupActivate(IntPtr IfGroup);
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcServerInterfaceGroupActivate' -Namespace Win32 -PassThru
# $api::RpcServerInterfaceGroupActivate(IfGroup)
#uselib "RPCRT4.dll"
#func global RpcServerInterfaceGroupActivate "RpcServerInterfaceGroupActivate" sptr
; RpcServerInterfaceGroupActivate IfGroup   ; 戻り値は stat
; IfGroup : void* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "RPCRT4.dll"
#cfunc global RpcServerInterfaceGroupActivate "RpcServerInterfaceGroupActivate" sptr
; res = RpcServerInterfaceGroupActivate(IfGroup)
; IfGroup : void* -> "sptr"
; RPC_STATUS RpcServerInterfaceGroupActivate(void* IfGroup)
#uselib "RPCRT4.dll"
#cfunc global RpcServerInterfaceGroupActivate "RpcServerInterfaceGroupActivate" intptr
; res = RpcServerInterfaceGroupActivate(IfGroup)
; IfGroup : void* -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
	procRpcServerInterfaceGroupActivate = rpcrt4.NewProc("RpcServerInterfaceGroupActivate")
)

// IfGroup (void*)
r1, _, err := procRpcServerInterfaceGroupActivate.Call(
	uintptr(IfGroup),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // RPC_STATUS
function RpcServerInterfaceGroupActivate(
  IfGroup: Pointer   // void*
): Integer; stdcall;
  external 'RPCRT4.dll' name 'RpcServerInterfaceGroupActivate';
result := DllCall("RPCRT4\RpcServerInterfaceGroupActivate"
    , "Ptr", IfGroup   ; void*
    , "Int")   ; return: RPC_STATUS
●RpcServerInterfaceGroupActivate(IfGroup) = DLL("RPCRT4.dll", "int RpcServerInterfaceGroupActivate(void*)")
# 呼び出し: RpcServerInterfaceGroupActivate(IfGroup)
# IfGroup : void* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。