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