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