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