ホーム › System.RemoteManagement › WSManPluginAuthzOperationComplete
WSManPluginAuthzOperationComplete
関数プラグインの操作認可処理の完了を通知する。
シグネチャ
// WsmSvc.dll
#include <windows.h>
DWORD WSManPluginAuthzOperationComplete(
WSMAN_SENDER_DETAILS* senderDetails,
DWORD flags,
void* userAuthorizationContext, // optional
DWORD errorCode,
LPCWSTR extendedErrorInformation // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| senderDetails | WSMAN_SENDER_DETAILS* | in |
| flags | DWORD | in |
| userAuthorizationContext | void* | inoptional |
| errorCode | DWORD | in |
| extendedErrorInformation | LPCWSTR | inoptional |
戻り値の型: DWORD
各言語での呼び出し定義
// WsmSvc.dll
#include <windows.h>
DWORD WSManPluginAuthzOperationComplete(
WSMAN_SENDER_DETAILS* senderDetails,
DWORD flags,
void* userAuthorizationContext, // optional
DWORD errorCode,
LPCWSTR extendedErrorInformation // optional
);[DllImport("WsmSvc.dll", ExactSpelling = true)]
static extern uint WSManPluginAuthzOperationComplete(
IntPtr senderDetails, // WSMAN_SENDER_DETAILS*
uint flags, // DWORD
IntPtr userAuthorizationContext, // void* optional
uint errorCode, // DWORD
[MarshalAs(UnmanagedType.LPWStr)] string extendedErrorInformation // LPCWSTR optional
);<DllImport("WsmSvc.dll", ExactSpelling:=True)>
Public Shared Function WSManPluginAuthzOperationComplete(
senderDetails As IntPtr, ' WSMAN_SENDER_DETAILS*
flags As UInteger, ' DWORD
userAuthorizationContext As IntPtr, ' void* optional
errorCode As UInteger, ' DWORD
<MarshalAs(UnmanagedType.LPWStr)> extendedErrorInformation As String ' LPCWSTR optional
) As UInteger
End Function' senderDetails : WSMAN_SENDER_DETAILS*
' flags : DWORD
' userAuthorizationContext : void* optional
' errorCode : DWORD
' extendedErrorInformation : LPCWSTR optional
Declare PtrSafe Function WSManPluginAuthzOperationComplete Lib "wsmsvc" ( _
ByVal senderDetails As LongPtr, _
ByVal flags As Long, _
ByVal userAuthorizationContext 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
WSManPluginAuthzOperationComplete = ctypes.windll.wsmsvc.WSManPluginAuthzOperationComplete
WSManPluginAuthzOperationComplete.restype = wintypes.DWORD
WSManPluginAuthzOperationComplete.argtypes = [
ctypes.c_void_p, # senderDetails : WSMAN_SENDER_DETAILS*
wintypes.DWORD, # flags : DWORD
ctypes.POINTER(None), # userAuthorizationContext : void* optional
wintypes.DWORD, # errorCode : DWORD
wintypes.LPCWSTR, # extendedErrorInformation : LPCWSTR optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('WsmSvc.dll')
WSManPluginAuthzOperationComplete = Fiddle::Function.new(
lib['WSManPluginAuthzOperationComplete'],
[
Fiddle::TYPE_VOIDP, # senderDetails : WSMAN_SENDER_DETAILS*
-Fiddle::TYPE_INT, # flags : DWORD
Fiddle::TYPE_VOIDP, # userAuthorizationContext : void* optional
-Fiddle::TYPE_INT, # errorCode : DWORD
Fiddle::TYPE_VOIDP, # extendedErrorInformation : LPCWSTR optional
],
-Fiddle::TYPE_INT)#[link(name = "wsmsvc")]
extern "system" {
fn WSManPluginAuthzOperationComplete(
senderDetails: *mut WSMAN_SENDER_DETAILS, // WSMAN_SENDER_DETAILS*
flags: u32, // DWORD
userAuthorizationContext: *mut (), // void* 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 WSManPluginAuthzOperationComplete(IntPtr senderDetails, uint flags, IntPtr userAuthorizationContext, uint errorCode, [MarshalAs(UnmanagedType.LPWStr)] string extendedErrorInformation);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WsmSvc_WSManPluginAuthzOperationComplete' -Namespace Win32 -PassThru
# $api::WSManPluginAuthzOperationComplete(senderDetails, flags, userAuthorizationContext, errorCode, extendedErrorInformation)#uselib "WsmSvc.dll"
#func global WSManPluginAuthzOperationComplete "WSManPluginAuthzOperationComplete" sptr, sptr, sptr, sptr, sptr
; WSManPluginAuthzOperationComplete varptr(senderDetails), flags, userAuthorizationContext, errorCode, extendedErrorInformation ; 戻り値は stat
; senderDetails : WSMAN_SENDER_DETAILS* -> "sptr"
; flags : DWORD -> "sptr"
; userAuthorizationContext : void* optional -> "sptr"
; errorCode : DWORD -> "sptr"
; extendedErrorInformation : LPCWSTR optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "WsmSvc.dll" #cfunc global WSManPluginAuthzOperationComplete "WSManPluginAuthzOperationComplete" var, int, sptr, int, wstr ; res = WSManPluginAuthzOperationComplete(senderDetails, flags, userAuthorizationContext, errorCode, extendedErrorInformation) ; senderDetails : WSMAN_SENDER_DETAILS* -> "var" ; flags : DWORD -> "int" ; userAuthorizationContext : void* optional -> "sptr" ; errorCode : DWORD -> "int" ; extendedErrorInformation : LPCWSTR optional -> "wstr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "WsmSvc.dll" #cfunc global WSManPluginAuthzOperationComplete "WSManPluginAuthzOperationComplete" sptr, int, sptr, int, wstr ; res = WSManPluginAuthzOperationComplete(varptr(senderDetails), flags, userAuthorizationContext, errorCode, extendedErrorInformation) ; senderDetails : WSMAN_SENDER_DETAILS* -> "sptr" ; flags : DWORD -> "int" ; userAuthorizationContext : void* optional -> "sptr" ; errorCode : DWORD -> "int" ; extendedErrorInformation : LPCWSTR optional -> "wstr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD WSManPluginAuthzOperationComplete(WSMAN_SENDER_DETAILS* senderDetails, DWORD flags, void* userAuthorizationContext, DWORD errorCode, LPCWSTR extendedErrorInformation) #uselib "WsmSvc.dll" #cfunc global WSManPluginAuthzOperationComplete "WSManPluginAuthzOperationComplete" var, int, intptr, int, wstr ; res = WSManPluginAuthzOperationComplete(senderDetails, flags, userAuthorizationContext, errorCode, extendedErrorInformation) ; senderDetails : WSMAN_SENDER_DETAILS* -> "var" ; flags : DWORD -> "int" ; userAuthorizationContext : void* optional -> "intptr" ; errorCode : DWORD -> "int" ; extendedErrorInformation : LPCWSTR optional -> "wstr" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD WSManPluginAuthzOperationComplete(WSMAN_SENDER_DETAILS* senderDetails, DWORD flags, void* userAuthorizationContext, DWORD errorCode, LPCWSTR extendedErrorInformation) #uselib "WsmSvc.dll" #cfunc global WSManPluginAuthzOperationComplete "WSManPluginAuthzOperationComplete" intptr, int, intptr, int, wstr ; res = WSManPluginAuthzOperationComplete(varptr(senderDetails), flags, userAuthorizationContext, errorCode, extendedErrorInformation) ; senderDetails : WSMAN_SENDER_DETAILS* -> "intptr" ; flags : DWORD -> "int" ; userAuthorizationContext : void* optional -> "intptr" ; errorCode : DWORD -> "int" ; extendedErrorInformation : LPCWSTR optional -> "wstr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
wsmsvc = windows.NewLazySystemDLL("WsmSvc.dll")
procWSManPluginAuthzOperationComplete = wsmsvc.NewProc("WSManPluginAuthzOperationComplete")
)
// senderDetails (WSMAN_SENDER_DETAILS*), flags (DWORD), userAuthorizationContext (void* optional), errorCode (DWORD), extendedErrorInformation (LPCWSTR optional)
r1, _, err := procWSManPluginAuthzOperationComplete.Call(
uintptr(senderDetails),
uintptr(flags),
uintptr(userAuthorizationContext),
uintptr(errorCode),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(extendedErrorInformation))),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction WSManPluginAuthzOperationComplete(
senderDetails: Pointer; // WSMAN_SENDER_DETAILS*
flags: DWORD; // DWORD
userAuthorizationContext: Pointer; // void* optional
errorCode: DWORD; // DWORD
extendedErrorInformation: PWideChar // LPCWSTR optional
): DWORD; stdcall;
external 'WsmSvc.dll' name 'WSManPluginAuthzOperationComplete';result := DllCall("WsmSvc\WSManPluginAuthzOperationComplete"
, "Ptr", senderDetails ; WSMAN_SENDER_DETAILS*
, "UInt", flags ; DWORD
, "Ptr", userAuthorizationContext ; void* optional
, "UInt", errorCode ; DWORD
, "WStr", extendedErrorInformation ; LPCWSTR optional
, "UInt") ; return: DWORD●WSManPluginAuthzOperationComplete(senderDetails, flags, userAuthorizationContext, errorCode, extendedErrorInformation) = DLL("WsmSvc.dll", "dword WSManPluginAuthzOperationComplete(void*, dword, void*, dword, char*)")
# 呼び出し: WSManPluginAuthzOperationComplete(senderDetails, flags, userAuthorizationContext, errorCode, extendedErrorInformation)
# senderDetails : WSMAN_SENDER_DETAILS* -> "void*"
# flags : DWORD -> "dword"
# userAuthorizationContext : void* optional -> "void*"
# errorCode : DWORD -> "dword"
# extendedErrorInformation : LPCWSTR optional -> "char*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。