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

WSManPluginAuthzQueryQuotaComplete

関数
プラグインのクォータ照会認可の完了を通知する。
DLLWsmSvc.dll呼出規約winapi対応OSWindows 7 以降

シグネチャ

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

DWORD WSManPluginAuthzQueryQuotaComplete(
    WSMAN_SENDER_DETAILS* senderDetails,
    DWORD flags,
    WSMAN_AUTHZ_QUOTA* quota,   // optional
    DWORD errorCode,
    LPCWSTR extendedErrorInformation   // optional
);

パラメーター

名前方向
senderDetailsWSMAN_SENDER_DETAILS*in
flagsDWORDin
quotaWSMAN_AUTHZ_QUOTA*inoptional
errorCodeDWORDin
extendedErrorInformationLPCWSTRinoptional

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD WSManPluginAuthzQueryQuotaComplete(
    WSMAN_SENDER_DETAILS* senderDetails,
    DWORD flags,
    WSMAN_AUTHZ_QUOTA* quota,   // optional
    DWORD errorCode,
    LPCWSTR extendedErrorInformation   // optional
);
[DllImport("WsmSvc.dll", ExactSpelling = true)]
static extern uint WSManPluginAuthzQueryQuotaComplete(
    IntPtr senderDetails,   // WSMAN_SENDER_DETAILS*
    uint flags,   // DWORD
    IntPtr quota,   // WSMAN_AUTHZ_QUOTA* optional
    uint errorCode,   // DWORD
    [MarshalAs(UnmanagedType.LPWStr)] string extendedErrorInformation   // LPCWSTR optional
);
<DllImport("WsmSvc.dll", ExactSpelling:=True)>
Public Shared Function WSManPluginAuthzQueryQuotaComplete(
    senderDetails As IntPtr,   ' WSMAN_SENDER_DETAILS*
    flags As UInteger,   ' DWORD
    quota As IntPtr,   ' WSMAN_AUTHZ_QUOTA* optional
    errorCode As UInteger,   ' DWORD
    <MarshalAs(UnmanagedType.LPWStr)> extendedErrorInformation As String   ' LPCWSTR optional
) As UInteger
End Function
' senderDetails : WSMAN_SENDER_DETAILS*
' flags : DWORD
' quota : WSMAN_AUTHZ_QUOTA* optional
' errorCode : DWORD
' extendedErrorInformation : LPCWSTR optional
Declare PtrSafe Function WSManPluginAuthzQueryQuotaComplete Lib "wsmsvc" ( _
    ByVal senderDetails As LongPtr, _
    ByVal flags As Long, _
    ByVal quota As LongPtr, _
    ByVal errorCode As Long, _
    ByVal extendedErrorInformation As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

WSManPluginAuthzQueryQuotaComplete = ctypes.windll.wsmsvc.WSManPluginAuthzQueryQuotaComplete
WSManPluginAuthzQueryQuotaComplete.restype = wintypes.DWORD
WSManPluginAuthzQueryQuotaComplete.argtypes = [
    ctypes.c_void_p,  # senderDetails : WSMAN_SENDER_DETAILS*
    wintypes.DWORD,  # flags : DWORD
    ctypes.c_void_p,  # quota : WSMAN_AUTHZ_QUOTA* optional
    wintypes.DWORD,  # errorCode : DWORD
    wintypes.LPCWSTR,  # extendedErrorInformation : LPCWSTR optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WsmSvc.dll')
WSManPluginAuthzQueryQuotaComplete = Fiddle::Function.new(
  lib['WSManPluginAuthzQueryQuotaComplete'],
  [
    Fiddle::TYPE_VOIDP,  # senderDetails : WSMAN_SENDER_DETAILS*
    -Fiddle::TYPE_INT,  # flags : DWORD
    Fiddle::TYPE_VOIDP,  # quota : WSMAN_AUTHZ_QUOTA* optional
    -Fiddle::TYPE_INT,  # errorCode : DWORD
    Fiddle::TYPE_VOIDP,  # extendedErrorInformation : LPCWSTR optional
  ],
  -Fiddle::TYPE_INT)
#[link(name = "wsmsvc")]
extern "system" {
    fn WSManPluginAuthzQueryQuotaComplete(
        senderDetails: *mut WSMAN_SENDER_DETAILS,  // WSMAN_SENDER_DETAILS*
        flags: u32,  // DWORD
        quota: *mut WSMAN_AUTHZ_QUOTA,  // WSMAN_AUTHZ_QUOTA* optional
        errorCode: u32,  // DWORD
        extendedErrorInformation: *const u16  // LPCWSTR optional
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("WsmSvc.dll")]
public static extern uint WSManPluginAuthzQueryQuotaComplete(IntPtr senderDetails, uint flags, IntPtr quota, uint errorCode, [MarshalAs(UnmanagedType.LPWStr)] string extendedErrorInformation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WsmSvc_WSManPluginAuthzQueryQuotaComplete' -Namespace Win32 -PassThru
# $api::WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
#uselib "WsmSvc.dll"
#func global WSManPluginAuthzQueryQuotaComplete "WSManPluginAuthzQueryQuotaComplete" sptr, sptr, sptr, sptr, sptr
; WSManPluginAuthzQueryQuotaComplete varptr(senderDetails), flags, varptr(quota), errorCode, extendedErrorInformation   ; 戻り値は stat
; senderDetails : WSMAN_SENDER_DETAILS* -> "sptr"
; flags : DWORD -> "sptr"
; quota : WSMAN_AUTHZ_QUOTA* optional -> "sptr"
; errorCode : DWORD -> "sptr"
; extendedErrorInformation : LPCWSTR optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "WsmSvc.dll"
#cfunc global WSManPluginAuthzQueryQuotaComplete "WSManPluginAuthzQueryQuotaComplete" var, int, var, int, wstr
; res = WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
; senderDetails : WSMAN_SENDER_DETAILS* -> "var"
; flags : DWORD -> "int"
; quota : WSMAN_AUTHZ_QUOTA* optional -> "var"
; errorCode : DWORD -> "int"
; extendedErrorInformation : LPCWSTR optional -> "wstr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD WSManPluginAuthzQueryQuotaComplete(WSMAN_SENDER_DETAILS* senderDetails, DWORD flags, WSMAN_AUTHZ_QUOTA* quota, DWORD errorCode, LPCWSTR extendedErrorInformation)
#uselib "WsmSvc.dll"
#cfunc global WSManPluginAuthzQueryQuotaComplete "WSManPluginAuthzQueryQuotaComplete" var, int, var, int, wstr
; res = WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
; senderDetails : WSMAN_SENDER_DETAILS* -> "var"
; flags : DWORD -> "int"
; quota : WSMAN_AUTHZ_QUOTA* optional -> "var"
; errorCode : DWORD -> "int"
; extendedErrorInformation : LPCWSTR optional -> "wstr"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	wsmsvc = windows.NewLazySystemDLL("WsmSvc.dll")
	procWSManPluginAuthzQueryQuotaComplete = wsmsvc.NewProc("WSManPluginAuthzQueryQuotaComplete")
)

// senderDetails (WSMAN_SENDER_DETAILS*), flags (DWORD), quota (WSMAN_AUTHZ_QUOTA* optional), errorCode (DWORD), extendedErrorInformation (LPCWSTR optional)
r1, _, err := procWSManPluginAuthzQueryQuotaComplete.Call(
	uintptr(senderDetails),
	uintptr(flags),
	uintptr(quota),
	uintptr(errorCode),
	uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(extendedErrorInformation))),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function WSManPluginAuthzQueryQuotaComplete(
  senderDetails: Pointer;   // WSMAN_SENDER_DETAILS*
  flags: DWORD;   // DWORD
  quota: Pointer;   // WSMAN_AUTHZ_QUOTA* optional
  errorCode: DWORD;   // DWORD
  extendedErrorInformation: PWideChar   // LPCWSTR optional
): DWORD; stdcall;
  external 'WsmSvc.dll' name 'WSManPluginAuthzQueryQuotaComplete';
result := DllCall("WsmSvc\WSManPluginAuthzQueryQuotaComplete"
    , "Ptr", senderDetails   ; WSMAN_SENDER_DETAILS*
    , "UInt", flags   ; DWORD
    , "Ptr", quota   ; WSMAN_AUTHZ_QUOTA* optional
    , "UInt", errorCode   ; DWORD
    , "WStr", extendedErrorInformation   ; LPCWSTR optional
    , "UInt")   ; return: DWORD
●WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation) = DLL("WsmSvc.dll", "dword WSManPluginAuthzQueryQuotaComplete(void*, dword, void*, dword, char*)")
# 呼び出し: WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
# senderDetails : WSMAN_SENDER_DETAILS* -> "void*"
# flags : DWORD -> "dword"
# quota : WSMAN_AUTHZ_QUOTA* optional -> "void*"
# errorCode : DWORD -> "dword"
# extendedErrorInformation : LPCWSTR optional -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。