Win32 API 日本語リファレンス
ホームSecurity.Authorization › GetMultipleTrusteeOperationW

GetMultipleTrusteeOperationW

関数
TRUSTEE構造体の複数トラスティ操作種別を取得する。
DLLADVAPI32.dll文字セットUnicode (-W)呼出規約winapi

シグネチャ

// ADVAPI32.dll  (Unicode / -W)
#include <windows.h>

MULTIPLE_TRUSTEE_OPERATION GetMultipleTrusteeOperationW(
    TRUSTEE_W* pTrustee   // optional
);

パラメーター

名前方向
pTrusteeTRUSTEE_W*inoptional

戻り値の型: MULTIPLE_TRUSTEE_OPERATION

各言語での呼び出し定義

// ADVAPI32.dll  (Unicode / -W)
#include <windows.h>

MULTIPLE_TRUSTEE_OPERATION GetMultipleTrusteeOperationW(
    TRUSTEE_W* pTrustee   // optional
);
[DllImport("ADVAPI32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern int GetMultipleTrusteeOperationW(
    IntPtr pTrustee   // TRUSTEE_W* optional
);
<DllImport("ADVAPI32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function GetMultipleTrusteeOperationW(
    pTrustee As IntPtr   ' TRUSTEE_W* optional
) As Integer
End Function
' pTrustee : TRUSTEE_W* optional
Declare PtrSafe Function GetMultipleTrusteeOperationW Lib "advapi32" ( _
    ByVal pTrustee As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GetMultipleTrusteeOperationW = ctypes.windll.advapi32.GetMultipleTrusteeOperationW
GetMultipleTrusteeOperationW.restype = ctypes.c_int
GetMultipleTrusteeOperationW.argtypes = [
    ctypes.c_void_p,  # pTrustee : TRUSTEE_W* optional
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('ADVAPI32.dll')
GetMultipleTrusteeOperationW = Fiddle::Function.new(
  lib['GetMultipleTrusteeOperationW'],
  [
    Fiddle::TYPE_VOIDP,  # pTrustee : TRUSTEE_W* optional
  ],
  Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"
#[link(name = "advapi32")]
extern "system" {
    fn GetMultipleTrusteeOperationW(
        pTrustee: *mut TRUSTEE_W  // TRUSTEE_W* optional
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("ADVAPI32.dll", CharSet = CharSet.Unicode)]
public static extern int GetMultipleTrusteeOperationW(IntPtr pTrustee);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ADVAPI32_GetMultipleTrusteeOperationW' -Namespace Win32 -PassThru
# $api::GetMultipleTrusteeOperationW(pTrustee)
#uselib "ADVAPI32.dll"
#func global GetMultipleTrusteeOperationW "GetMultipleTrusteeOperationW" wptr
; GetMultipleTrusteeOperationW varptr(pTrustee)   ; 戻り値は stat
; pTrustee : TRUSTEE_W* optional -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "ADVAPI32.dll"
#cfunc global GetMultipleTrusteeOperationW "GetMultipleTrusteeOperationW" var
; res = GetMultipleTrusteeOperationW(pTrustee)
; pTrustee : TRUSTEE_W* optional -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; MULTIPLE_TRUSTEE_OPERATION GetMultipleTrusteeOperationW(TRUSTEE_W* pTrustee)
#uselib "ADVAPI32.dll"
#cfunc global GetMultipleTrusteeOperationW "GetMultipleTrusteeOperationW" var
; res = GetMultipleTrusteeOperationW(pTrustee)
; pTrustee : TRUSTEE_W* optional -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	advapi32 = windows.NewLazySystemDLL("ADVAPI32.dll")
	procGetMultipleTrusteeOperationW = advapi32.NewProc("GetMultipleTrusteeOperationW")
)

// pTrustee (TRUSTEE_W* optional)
r1, _, err := procGetMultipleTrusteeOperationW.Call(
	uintptr(pTrustee),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // MULTIPLE_TRUSTEE_OPERATION
function GetMultipleTrusteeOperationW(
  pTrustee: Pointer   // TRUSTEE_W* optional
): Integer; stdcall;
  external 'ADVAPI32.dll' name 'GetMultipleTrusteeOperationW';
result := DllCall("ADVAPI32\GetMultipleTrusteeOperationW"
    , "Ptr", pTrustee   ; TRUSTEE_W* optional
    , "Int")   ; return: MULTIPLE_TRUSTEE_OPERATION
●GetMultipleTrusteeOperationW(pTrustee) = DLL("ADVAPI32.dll", "int GetMultipleTrusteeOperationW(void*)")
# 呼び出し: GetMultipleTrusteeOperationW(pTrustee)
# pTrustee : TRUSTEE_W* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。