ホーム › Networking.ActiveDirectory › BinarySDToSecurityDescriptor
BinarySDToSecurityDescriptor
関数バイナリ形式のセキュリティ記述子をVARIANTオブジェクトへ変換する。
シグネチャ
// ACTIVEDS.dll
#include <windows.h>
HRESULT BinarySDToSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
VARIANT* pVarsec,
LPCWSTR pszServerName,
LPCWSTR userName,
LPCWSTR passWord,
DWORD dwFlags
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| pSecurityDescriptor | PSECURITY_DESCRIPTOR | in | 変換元のバイナリ形式セキュリティ記述子へのポインタ。 |
| pVarsec | VARIANT* | inout | 変換結果(IADsSecurityDescriptor)を受け取るVARIANTへのポインタ。 |
| pszServerName | LPCWSTR | in | 対象サーバ名。SID解決などに用いる。NULL可。 |
| userName | LPCWSTR | in | 認証に使うユーザー名。NULLで現在のコンテキストを使う。 |
| passWord | LPCWSTR | in | userNameに対応するパスワード。NULL可。 |
| dwFlags | DWORD | in | 認証方法を指定するフラグ。ADS_AUTHENTICATION_ENUMの値を与える。 |
戻り値の型: HRESULT
各言語での呼び出し定義
// ACTIVEDS.dll
#include <windows.h>
HRESULT BinarySDToSecurityDescriptor(
PSECURITY_DESCRIPTOR pSecurityDescriptor,
VARIANT* pVarsec,
LPCWSTR pszServerName,
LPCWSTR userName,
LPCWSTR passWord,
DWORD dwFlags
);[DllImport("ACTIVEDS.dll", ExactSpelling = true)]
static extern int BinarySDToSecurityDescriptor(
IntPtr pSecurityDescriptor, // PSECURITY_DESCRIPTOR
IntPtr pVarsec, // VARIANT* in/out
[MarshalAs(UnmanagedType.LPWStr)] string pszServerName, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] string userName, // LPCWSTR
[MarshalAs(UnmanagedType.LPWStr)] string passWord, // LPCWSTR
uint dwFlags // DWORD
);<DllImport("ACTIVEDS.dll", ExactSpelling:=True)>
Public Shared Function BinarySDToSecurityDescriptor(
pSecurityDescriptor As IntPtr, ' PSECURITY_DESCRIPTOR
pVarsec As IntPtr, ' VARIANT* in/out
<MarshalAs(UnmanagedType.LPWStr)> pszServerName As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> userName As String, ' LPCWSTR
<MarshalAs(UnmanagedType.LPWStr)> passWord As String, ' LPCWSTR
dwFlags As UInteger ' DWORD
) As Integer
End Function' pSecurityDescriptor : PSECURITY_DESCRIPTOR
' pVarsec : VARIANT* in/out
' pszServerName : LPCWSTR
' userName : LPCWSTR
' passWord : LPCWSTR
' dwFlags : DWORD
Declare PtrSafe Function BinarySDToSecurityDescriptor Lib "activeds" ( _
ByVal pSecurityDescriptor As LongPtr, _
ByVal pVarsec As LongPtr, _
ByVal pszServerName As LongPtr, _
ByVal userName As LongPtr, _
ByVal passWord As LongPtr, _
ByVal dwFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
BinarySDToSecurityDescriptor = ctypes.windll.activeds.BinarySDToSecurityDescriptor
BinarySDToSecurityDescriptor.restype = ctypes.c_int
BinarySDToSecurityDescriptor.argtypes = [
wintypes.HANDLE, # pSecurityDescriptor : PSECURITY_DESCRIPTOR
ctypes.c_void_p, # pVarsec : VARIANT* in/out
wintypes.LPCWSTR, # pszServerName : LPCWSTR
wintypes.LPCWSTR, # userName : LPCWSTR
wintypes.LPCWSTR, # passWord : LPCWSTR
wintypes.DWORD, # dwFlags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('ACTIVEDS.dll')
BinarySDToSecurityDescriptor = Fiddle::Function.new(
lib['BinarySDToSecurityDescriptor'],
[
Fiddle::TYPE_VOIDP, # pSecurityDescriptor : PSECURITY_DESCRIPTOR
Fiddle::TYPE_VOIDP, # pVarsec : VARIANT* in/out
Fiddle::TYPE_VOIDP, # pszServerName : LPCWSTR
Fiddle::TYPE_VOIDP, # userName : LPCWSTR
Fiddle::TYPE_VOIDP, # passWord : LPCWSTR
-Fiddle::TYPE_INT, # dwFlags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "activeds")]
extern "system" {
fn BinarySDToSecurityDescriptor(
pSecurityDescriptor: *mut core::ffi::c_void, // PSECURITY_DESCRIPTOR
pVarsec: *mut VARIANT, // VARIANT* in/out
pszServerName: *const u16, // LPCWSTR
userName: *const u16, // LPCWSTR
passWord: *const u16, // LPCWSTR
dwFlags: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("ACTIVEDS.dll")]
public static extern int BinarySDToSecurityDescriptor(IntPtr pSecurityDescriptor, IntPtr pVarsec, [MarshalAs(UnmanagedType.LPWStr)] string pszServerName, [MarshalAs(UnmanagedType.LPWStr)] string userName, [MarshalAs(UnmanagedType.LPWStr)] string passWord, uint dwFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'ACTIVEDS_BinarySDToSecurityDescriptor' -Namespace Win32 -PassThru
# $api::BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)#uselib "ACTIVEDS.dll"
#func global BinarySDToSecurityDescriptor "BinarySDToSecurityDescriptor" sptr, sptr, sptr, sptr, sptr, sptr
; BinarySDToSecurityDescriptor pSecurityDescriptor, varptr(pVarsec), pszServerName, userName, passWord, dwFlags ; 戻り値は stat
; pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "sptr"
; pVarsec : VARIANT* in/out -> "sptr"
; pszServerName : LPCWSTR -> "sptr"
; userName : LPCWSTR -> "sptr"
; passWord : LPCWSTR -> "sptr"
; dwFlags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "ACTIVEDS.dll" #cfunc global BinarySDToSecurityDescriptor "BinarySDToSecurityDescriptor" sptr, var, wstr, wstr, wstr, int ; res = BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags) ; pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "sptr" ; pVarsec : VARIANT* in/out -> "var" ; pszServerName : LPCWSTR -> "wstr" ; userName : LPCWSTR -> "wstr" ; passWord : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "ACTIVEDS.dll" #cfunc global BinarySDToSecurityDescriptor "BinarySDToSecurityDescriptor" sptr, sptr, wstr, wstr, wstr, int ; res = BinarySDToSecurityDescriptor(pSecurityDescriptor, varptr(pVarsec), pszServerName, userName, passWord, dwFlags) ; pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "sptr" ; pVarsec : VARIANT* in/out -> "sptr" ; pszServerName : LPCWSTR -> "wstr" ; userName : LPCWSTR -> "wstr" ; passWord : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; HRESULT BinarySDToSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, VARIANT* pVarsec, LPCWSTR pszServerName, LPCWSTR userName, LPCWSTR passWord, DWORD dwFlags) #uselib "ACTIVEDS.dll" #cfunc global BinarySDToSecurityDescriptor "BinarySDToSecurityDescriptor" intptr, var, wstr, wstr, wstr, int ; res = BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags) ; pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "intptr" ; pVarsec : VARIANT* in/out -> "var" ; pszServerName : LPCWSTR -> "wstr" ; userName : LPCWSTR -> "wstr" ; passWord : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; HRESULT BinarySDToSecurityDescriptor(PSECURITY_DESCRIPTOR pSecurityDescriptor, VARIANT* pVarsec, LPCWSTR pszServerName, LPCWSTR userName, LPCWSTR passWord, DWORD dwFlags) #uselib "ACTIVEDS.dll" #cfunc global BinarySDToSecurityDescriptor "BinarySDToSecurityDescriptor" intptr, intptr, wstr, wstr, wstr, int ; res = BinarySDToSecurityDescriptor(pSecurityDescriptor, varptr(pVarsec), pszServerName, userName, passWord, dwFlags) ; pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "intptr" ; pVarsec : VARIANT* in/out -> "intptr" ; pszServerName : LPCWSTR -> "wstr" ; userName : LPCWSTR -> "wstr" ; passWord : LPCWSTR -> "wstr" ; dwFlags : DWORD -> "int" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
activeds = windows.NewLazySystemDLL("ACTIVEDS.dll")
procBinarySDToSecurityDescriptor = activeds.NewProc("BinarySDToSecurityDescriptor")
)
// pSecurityDescriptor (PSECURITY_DESCRIPTOR), pVarsec (VARIANT* in/out), pszServerName (LPCWSTR), userName (LPCWSTR), passWord (LPCWSTR), dwFlags (DWORD)
r1, _, err := procBinarySDToSecurityDescriptor.Call(
uintptr(pSecurityDescriptor),
uintptr(pVarsec),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(pszServerName))),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(userName))),
uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(passWord))),
uintptr(dwFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction BinarySDToSecurityDescriptor(
pSecurityDescriptor: THandle; // PSECURITY_DESCRIPTOR
pVarsec: Pointer; // VARIANT* in/out
pszServerName: PWideChar; // LPCWSTR
userName: PWideChar; // LPCWSTR
passWord: PWideChar; // LPCWSTR
dwFlags: DWORD // DWORD
): Integer; stdcall;
external 'ACTIVEDS.dll' name 'BinarySDToSecurityDescriptor';result := DllCall("ACTIVEDS\BinarySDToSecurityDescriptor"
, "Ptr", pSecurityDescriptor ; PSECURITY_DESCRIPTOR
, "Ptr", pVarsec ; VARIANT* in/out
, "WStr", pszServerName ; LPCWSTR
, "WStr", userName ; LPCWSTR
, "WStr", passWord ; LPCWSTR
, "UInt", dwFlags ; DWORD
, "Int") ; return: HRESULT●BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags) = DLL("ACTIVEDS.dll", "int BinarySDToSecurityDescriptor(void*, void*, char*, char*, char*, dword)")
# 呼び出し: BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)
# pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "void*"
# pVarsec : VARIANT* in/out -> "void*"
# pszServerName : LPCWSTR -> "char*"
# userName : LPCWSTR -> "char*"
# passWord : LPCWSTR -> "char*"
# dwFlags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "activeds" fn BinarySDToSecurityDescriptor(
pSecurityDescriptor: ?*anyopaque, // PSECURITY_DESCRIPTOR
pVarsec: [*c]VARIANT, // VARIANT* in/out
pszServerName: [*c]const u16, // LPCWSTR
userName: [*c]const u16, // LPCWSTR
passWord: [*c]const u16, // LPCWSTR
dwFlags: u32 // DWORD
) callconv(std.os.windows.WINAPI) i32;proc BinarySDToSecurityDescriptor(
pSecurityDescriptor: pointer, # PSECURITY_DESCRIPTOR
pVarsec: ptr VARIANT, # VARIANT* in/out
pszServerName: WideCString, # LPCWSTR
userName: WideCString, # LPCWSTR
passWord: WideCString, # LPCWSTR
dwFlags: uint32 # DWORD
): int32 {.importc: "BinarySDToSecurityDescriptor", stdcall, dynlib: "ACTIVEDS.dll".}pragma(lib, "activeds");
extern(Windows)
int BinarySDToSecurityDescriptor(
void* pSecurityDescriptor, // PSECURITY_DESCRIPTOR
VARIANT* pVarsec, // VARIANT* in/out
const(wchar)* pszServerName, // LPCWSTR
const(wchar)* userName, // LPCWSTR
const(wchar)* passWord, // LPCWSTR
uint dwFlags // DWORD
);ccall((:BinarySDToSecurityDescriptor, "ACTIVEDS.dll"), stdcall, Int32,
(Ptr{Cvoid}, Ptr{VARIANT}, Cwstring, Cwstring, Cwstring, UInt32),
pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)
# pSecurityDescriptor : PSECURITY_DESCRIPTOR -> Ptr{Cvoid}
# pVarsec : VARIANT* in/out -> Ptr{VARIANT}
# pszServerName : LPCWSTR -> Cwstring
# userName : LPCWSTR -> Cwstring
# passWord : LPCWSTR -> Cwstring
# dwFlags : DWORD -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t BinarySDToSecurityDescriptor(
void* pSecurityDescriptor,
void* pVarsec,
const uint16_t* pszServerName,
const uint16_t* userName,
const uint16_t* passWord,
uint32_t dwFlags);
]]
local activeds = ffi.load("activeds")
-- activeds.BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)
-- pSecurityDescriptor : PSECURITY_DESCRIPTOR
-- pVarsec : VARIANT* in/out
-- pszServerName : LPCWSTR
-- userName : LPCWSTR
-- passWord : LPCWSTR
-- dwFlags : DWORD
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('ACTIVEDS.dll');
const BinarySDToSecurityDescriptor = lib.func('__stdcall', 'BinarySDToSecurityDescriptor', 'int32_t', ['void *', 'void *', 'str16', 'str16', 'str16', 'uint32_t']);
// BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)
// pSecurityDescriptor : PSECURITY_DESCRIPTOR -> 'void *'
// pVarsec : VARIANT* in/out -> 'void *'
// pszServerName : LPCWSTR -> 'str16'
// userName : LPCWSTR -> 'str16'
// passWord : LPCWSTR -> 'str16'
// dwFlags : DWORD -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("ACTIVEDS.dll", {
BinarySDToSecurityDescriptor: { parameters: ["pointer", "pointer", "buffer", "buffer", "buffer", "u32"], result: "i32" },
});
// lib.symbols.BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags)
// pSecurityDescriptor : PSECURITY_DESCRIPTOR -> "pointer"
// pVarsec : VARIANT* in/out -> "pointer"
// pszServerName : LPCWSTR -> "buffer"
// userName : LPCWSTR -> "buffer"
// passWord : LPCWSTR -> "buffer"
// dwFlags : DWORD -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t BinarySDToSecurityDescriptor(
void* pSecurityDescriptor,
void* pVarsec,
const uint16_t* pszServerName,
const uint16_t* userName,
const uint16_t* passWord,
uint32_t dwFlags);
C, "ACTIVEDS.dll");
// $ffi->BinarySDToSecurityDescriptor(pSecurityDescriptor, pVarsec, pszServerName, userName, passWord, dwFlags);
// pSecurityDescriptor : PSECURITY_DESCRIPTOR
// pVarsec : VARIANT* in/out
// pszServerName : LPCWSTR
// userName : LPCWSTR
// passWord : LPCWSTR
// dwFlags : DWORD
// 構造体/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 Activeds extends StdCallLibrary {
Activeds INSTANCE = Native.load("activeds", Activeds.class);
int BinarySDToSecurityDescriptor(
Pointer pSecurityDescriptor, // PSECURITY_DESCRIPTOR
Pointer pVarsec, // VARIANT* in/out
WString pszServerName, // LPCWSTR
WString userName, // LPCWSTR
WString passWord, // LPCWSTR
int dwFlags // DWORD
);
}@[Link("activeds")]
lib LibACTIVEDS
fun BinarySDToSecurityDescriptor = BinarySDToSecurityDescriptor(
pSecurityDescriptor : Void*, # PSECURITY_DESCRIPTOR
pVarsec : VARIANT*, # VARIANT* in/out
pszServerName : UInt16*, # LPCWSTR
userName : UInt16*, # LPCWSTR
passWord : UInt16*, # LPCWSTR
dwFlags : UInt32 # DWORD
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef BinarySDToSecurityDescriptorNative = Int32 Function(Pointer<Void>, Pointer<Void>, Pointer<Utf16>, Pointer<Utf16>, Pointer<Utf16>, Uint32);
typedef BinarySDToSecurityDescriptorDart = int Function(Pointer<Void>, Pointer<Void>, Pointer<Utf16>, Pointer<Utf16>, Pointer<Utf16>, int);
final BinarySDToSecurityDescriptor = DynamicLibrary.open('ACTIVEDS.dll')
.lookupFunction<BinarySDToSecurityDescriptorNative, BinarySDToSecurityDescriptorDart>('BinarySDToSecurityDescriptor');
// pSecurityDescriptor : PSECURITY_DESCRIPTOR -> Pointer<Void>
// pVarsec : VARIANT* in/out -> Pointer<Void>
// pszServerName : LPCWSTR -> Pointer<Utf16>
// userName : LPCWSTR -> Pointer<Utf16>
// passWord : LPCWSTR -> Pointer<Utf16>
// dwFlags : DWORD -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function BinarySDToSecurityDescriptor(
pSecurityDescriptor: THandle; // PSECURITY_DESCRIPTOR
pVarsec: Pointer; // VARIANT* in/out
pszServerName: PWideChar; // LPCWSTR
userName: PWideChar; // LPCWSTR
passWord: PWideChar; // LPCWSTR
dwFlags: DWORD // DWORD
): Integer; stdcall;
external 'ACTIVEDS.dll' name 'BinarySDToSecurityDescriptor';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "BinarySDToSecurityDescriptor"
c_BinarySDToSecurityDescriptor :: Ptr () -> Ptr () -> CWString -> CWString -> CWString -> Word32 -> IO Int32
-- pSecurityDescriptor : PSECURITY_DESCRIPTOR -> Ptr ()
-- pVarsec : VARIANT* in/out -> Ptr ()
-- pszServerName : LPCWSTR -> CWString
-- userName : LPCWSTR -> CWString
-- passWord : LPCWSTR -> CWString
-- dwFlags : DWORD -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let binarysdtosecuritydescriptor =
foreign "BinarySDToSecurityDescriptor"
((ptr void) @-> (ptr void) @-> (ptr uint16_t) @-> (ptr uint16_t) @-> (ptr uint16_t) @-> uint32_t @-> returning int32_t)
(* pSecurityDescriptor : PSECURITY_DESCRIPTOR -> (ptr void) *)
(* pVarsec : VARIANT* in/out -> (ptr void) *)
(* pszServerName : LPCWSTR -> (ptr uint16_t) *)
(* userName : LPCWSTR -> (ptr uint16_t) *)
(* passWord : LPCWSTR -> (ptr uint16_t) *)
(* dwFlags : DWORD -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library activeds (t "ACTIVEDS.dll"))
(cffi:use-foreign-library activeds)
(cffi:defcfun ("BinarySDToSecurityDescriptor" binary-sdto-security-descriptor :convention :stdcall) :int32
(p-security-descriptor :pointer) ; PSECURITY_DESCRIPTOR
(p-varsec :pointer) ; VARIANT* in/out
(psz-server-name (:string :encoding :utf-16le)) ; LPCWSTR
(user-name (:string :encoding :utf-16le)) ; LPCWSTR
(pass-word (:string :encoding :utf-16le)) ; LPCWSTR
(dw-flags :uint32)) ; DWORD
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $BinarySDToSecurityDescriptor = Win32::API::More->new('ACTIVEDS',
'int BinarySDToSecurityDescriptor(HANDLE pSecurityDescriptor, LPVOID pVarsec, LPCWSTR pszServerName, LPCWSTR userName, LPCWSTR passWord, DWORD dwFlags)');
# my $ret = $BinarySDToSecurityDescriptor->Call($pSecurityDescriptor, $pVarsec, $pszServerName, $userName, $passWord, $dwFlags);
# pSecurityDescriptor : PSECURITY_DESCRIPTOR -> HANDLE
# pVarsec : VARIANT* in/out -> LPVOID
# pszServerName : LPCWSTR -> LPCWSTR
# userName : LPCWSTR -> LPCWSTR
# passWord : LPCWSTR -> LPCWSTR
# dwFlags : DWORD -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
使用する型