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送信者の認証情報を保持する WSMAN_SENDER_DETAILS 構造体へのポインター。
flagsDWORDinクォータ照会動作を制御するフラグ。
quotaWSMAN_AUTHZ_QUOTA*inoptionalユーザーに適用するクォータ情報を格納した WSMAN_AUTHZ_QUOTA 構造体へのポインター。
errorCodeDWORDin照会結果を示すエラーコード。成功時は NO_ERROR を指定する。
extendedErrorInformationLPCWSTRinoptionalエラーの詳細を示す拡張情報のXML文字列。NULL 可。

戻り値の型: 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)。
const std = @import("std");

extern "wsmsvc" fn WSManPluginAuthzQueryQuotaComplete(
    senderDetails: [*c]WSMAN_SENDER_DETAILS, // WSMAN_SENDER_DETAILS*
    flags: u32, // DWORD
    quota: [*c]WSMAN_AUTHZ_QUOTA, // WSMAN_AUTHZ_QUOTA* optional
    errorCode: u32, // DWORD
    extendedErrorInformation: [*c]const u16 // LPCWSTR optional
) callconv(std.os.windows.WINAPI) u32;
proc WSManPluginAuthzQueryQuotaComplete(
    senderDetails: ptr WSMAN_SENDER_DETAILS,  # WSMAN_SENDER_DETAILS*
    flags: uint32,  # DWORD
    quota: ptr WSMAN_AUTHZ_QUOTA,  # WSMAN_AUTHZ_QUOTA* optional
    errorCode: uint32,  # DWORD
    extendedErrorInformation: WideCString  # LPCWSTR optional
): uint32 {.importc: "WSManPluginAuthzQueryQuotaComplete", stdcall, dynlib: "WsmSvc.dll".}
pragma(lib, "wsmsvc");
extern(Windows)
uint WSManPluginAuthzQueryQuotaComplete(
    WSMAN_SENDER_DETAILS* senderDetails,   // WSMAN_SENDER_DETAILS*
    uint flags,   // DWORD
    WSMAN_AUTHZ_QUOTA* quota,   // WSMAN_AUTHZ_QUOTA* optional
    uint errorCode,   // DWORD
    const(wchar)* extendedErrorInformation   // LPCWSTR optional
);
ccall((:WSManPluginAuthzQueryQuotaComplete, "WsmSvc.dll"), stdcall, UInt32,
      (Ptr{WSMAN_SENDER_DETAILS}, UInt32, Ptr{WSMAN_AUTHZ_QUOTA}, UInt32, Cwstring),
      senderDetails, flags, quota, errorCode, extendedErrorInformation)
# senderDetails : WSMAN_SENDER_DETAILS* -> Ptr{WSMAN_SENDER_DETAILS}
# flags : DWORD -> UInt32
# quota : WSMAN_AUTHZ_QUOTA* optional -> Ptr{WSMAN_AUTHZ_QUOTA}
# errorCode : DWORD -> UInt32
# extendedErrorInformation : LPCWSTR optional -> Cwstring
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
uint32_t WSManPluginAuthzQueryQuotaComplete(
    void* senderDetails,
    uint32_t flags,
    void* quota,
    uint32_t errorCode,
    const uint16_t* extendedErrorInformation);
]]
local wsmsvc = ffi.load("wsmsvc")
-- wsmsvc.WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
-- senderDetails : WSMAN_SENDER_DETAILS*
-- flags : DWORD
-- quota : WSMAN_AUTHZ_QUOTA* optional
-- errorCode : DWORD
-- extendedErrorInformation : LPCWSTR optional
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('WsmSvc.dll');
const WSManPluginAuthzQueryQuotaComplete = lib.func('__stdcall', 'WSManPluginAuthzQueryQuotaComplete', 'uint32_t', ['void *', 'uint32_t', 'void *', 'uint32_t', 'str16']);
// WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
// senderDetails : WSMAN_SENDER_DETAILS* -> 'void *'
// flags : DWORD -> 'uint32_t'
// quota : WSMAN_AUTHZ_QUOTA* optional -> 'void *'
// errorCode : DWORD -> 'uint32_t'
// extendedErrorInformation : LPCWSTR optional -> 'str16'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("WsmSvc.dll", {
  WSManPluginAuthzQueryQuotaComplete: { parameters: ["pointer", "u32", "pointer", "u32", "buffer"], result: "u32" },
});
// lib.symbols.WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation)
// senderDetails : WSMAN_SENDER_DETAILS* -> "pointer"
// flags : DWORD -> "u32"
// quota : WSMAN_AUTHZ_QUOTA* optional -> "pointer"
// errorCode : DWORD -> "u32"
// extendedErrorInformation : LPCWSTR optional -> "buffer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
uint32_t WSManPluginAuthzQueryQuotaComplete(
    void* senderDetails,
    uint32_t flags,
    void* quota,
    uint32_t errorCode,
    const uint16_t* extendedErrorInformation);
C, "WsmSvc.dll");
// $ffi->WSManPluginAuthzQueryQuotaComplete(senderDetails, flags, quota, errorCode, extendedErrorInformation);
// senderDetails : WSMAN_SENDER_DETAILS*
// flags : DWORD
// quota : WSMAN_AUTHZ_QUOTA* optional
// errorCode : DWORD
// extendedErrorInformation : LPCWSTR optional
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。
import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;

public interface Wsmsvc extends StdCallLibrary {
    Wsmsvc INSTANCE = Native.load("wsmsvc", Wsmsvc.class);
    int WSManPluginAuthzQueryQuotaComplete(
        Pointer senderDetails,   // WSMAN_SENDER_DETAILS*
        int flags,   // DWORD
        Pointer quota,   // WSMAN_AUTHZ_QUOTA* optional
        int errorCode,   // DWORD
        WString extendedErrorInformation   // LPCWSTR optional
    );
}
@[Link("wsmsvc")]
lib LibWsmSvc
  fun WSManPluginAuthzQueryQuotaComplete = WSManPluginAuthzQueryQuotaComplete(
    senderDetails : WSMAN_SENDER_DETAILS*,   # WSMAN_SENDER_DETAILS*
    flags : UInt32,   # DWORD
    quota : WSMAN_AUTHZ_QUOTA*,   # WSMAN_AUTHZ_QUOTA* optional
    errorCode : UInt32,   # DWORD
    extendedErrorInformation : UInt16*   # LPCWSTR optional
  ) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef WSManPluginAuthzQueryQuotaCompleteNative = Uint32 Function(Pointer<Void>, Uint32, Pointer<Void>, Uint32, Pointer<Utf16>);
typedef WSManPluginAuthzQueryQuotaCompleteDart = int Function(Pointer<Void>, int, Pointer<Void>, int, Pointer<Utf16>);
final WSManPluginAuthzQueryQuotaComplete = DynamicLibrary.open('WsmSvc.dll')
    .lookupFunction<WSManPluginAuthzQueryQuotaCompleteNative, WSManPluginAuthzQueryQuotaCompleteDart>('WSManPluginAuthzQueryQuotaComplete');
// senderDetails : WSMAN_SENDER_DETAILS* -> Pointer<Void>
// flags : DWORD -> Uint32
// quota : WSMAN_AUTHZ_QUOTA* optional -> Pointer<Void>
// errorCode : DWORD -> Uint32
// extendedErrorInformation : LPCWSTR optional -> Pointer<Utf16>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
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';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "WSManPluginAuthzQueryQuotaComplete"
  c_WSManPluginAuthzQueryQuotaComplete :: Ptr () -> Word32 -> Ptr () -> Word32 -> CWString -> IO Word32
-- senderDetails : WSMAN_SENDER_DETAILS* -> Ptr ()
-- flags : DWORD -> Word32
-- quota : WSMAN_AUTHZ_QUOTA* optional -> Ptr ()
-- errorCode : DWORD -> Word32
-- extendedErrorInformation : LPCWSTR optional -> CWString
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let wsmanpluginauthzqueryquotacomplete =
  foreign "WSManPluginAuthzQueryQuotaComplete"
    ((ptr void) @-> uint32_t @-> (ptr void) @-> uint32_t @-> (ptr uint16_t) @-> returning uint32_t)
(* senderDetails : WSMAN_SENDER_DETAILS* -> (ptr void) *)
(* flags : DWORD -> uint32_t *)
(* quota : WSMAN_AUTHZ_QUOTA* optional -> (ptr void) *)
(* errorCode : DWORD -> uint32_t *)
(* extendedErrorInformation : LPCWSTR optional -> (ptr uint16_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library wsmsvc (t "WsmSvc.dll"))
(cffi:use-foreign-library wsmsvc)

(cffi:defcfun ("WSManPluginAuthzQueryQuotaComplete" wsman-plugin-authz-query-quota-complete :convention :stdcall) :uint32
  (sender-details :pointer)   ; WSMAN_SENDER_DETAILS*
  (flags :uint32)   ; DWORD
  (quota :pointer)   ; WSMAN_AUTHZ_QUOTA* optional
  (error-code :uint32)   ; DWORD
  (extended-error-information (:string :encoding :utf-16le)))   ; LPCWSTR optional
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $WSManPluginAuthzQueryQuotaComplete = Win32::API::More->new('WsmSvc',
    'DWORD WSManPluginAuthzQueryQuotaComplete(LPVOID senderDetails, DWORD flags, LPVOID quota, DWORD errorCode, LPCWSTR extendedErrorInformation)');
# my $ret = $WSManPluginAuthzQueryQuotaComplete->Call($senderDetails, $flags, $quota, $errorCode, $extendedErrorInformation);
# senderDetails : WSMAN_SENDER_DETAILS* -> LPVOID
# flags : DWORD -> DWORD
# quota : WSMAN_AUTHZ_QUOTA* optional -> LPVOID
# errorCode : DWORD -> DWORD
# extendedErrorInformation : LPCWSTR optional -> LPCWSTR
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。

関連項目

使用する型