ホーム › System.Rpc › RpcRevertContainerImpersonation
RpcRevertContainerImpersonation
関数コンテナのクライアント偽装を解除する。
シグネチャ
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcRevertContainerImpersonation(void);パラメーターなし。戻り値: RPC_STATUS
各言語での呼び出し定義
// RPCRT4.dll
#include <windows.h>
RPC_STATUS RpcRevertContainerImpersonation(void);[DllImport("RPCRT4.dll", ExactSpelling = true)]
static extern int RpcRevertContainerImpersonation();<DllImport("RPCRT4.dll", ExactSpelling:=True)>
Public Shared Function RpcRevertContainerImpersonation() As Integer
End FunctionDeclare PtrSafe Function RpcRevertContainerImpersonation Lib "rpcrt4" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RpcRevertContainerImpersonation = ctypes.windll.rpcrt4.RpcRevertContainerImpersonation
RpcRevertContainerImpersonation.restype = ctypes.c_int
RpcRevertContainerImpersonation.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('RPCRT4.dll')
RpcRevertContainerImpersonation = Fiddle::Function.new(
lib['RpcRevertContainerImpersonation'],
[],
Fiddle::TYPE_INT)#[link(name = "rpcrt4")]
extern "system" {
fn RpcRevertContainerImpersonation() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("RPCRT4.dll")]
public static extern int RpcRevertContainerImpersonation();
"@
$api = Add-Type -MemberDefinition $sig -Name 'RPCRT4_RpcRevertContainerImpersonation' -Namespace Win32 -PassThru
# $api::RpcRevertContainerImpersonation()#uselib "RPCRT4.dll"
#func global RpcRevertContainerImpersonation "RpcRevertContainerImpersonation"
; RpcRevertContainerImpersonation ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "RPCRT4.dll"
#cfunc global RpcRevertContainerImpersonation "RpcRevertContainerImpersonation"
; res = RpcRevertContainerImpersonation(); RPC_STATUS RpcRevertContainerImpersonation()
#uselib "RPCRT4.dll"
#cfunc global RpcRevertContainerImpersonation "RpcRevertContainerImpersonation"
; res = RpcRevertContainerImpersonation()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
rpcrt4 = windows.NewLazySystemDLL("RPCRT4.dll")
procRpcRevertContainerImpersonation = rpcrt4.NewProc("RpcRevertContainerImpersonation")
)
r1, _, err := procRpcRevertContainerImpersonation.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // RPC_STATUSfunction RpcRevertContainerImpersonation: Integer; stdcall;
external 'RPCRT4.dll' name 'RpcRevertContainerImpersonation';result := DllCall("RPCRT4\RpcRevertContainerImpersonation", "Int")●RpcRevertContainerImpersonation() = DLL("RPCRT4.dll", "int RpcRevertContainerImpersonation()")
# 呼び出し: RpcRevertContainerImpersonation()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。