ホーム › NetworkManagement.WindowsFilteringPlatform › IPsecDospGetSecurityInfo0
IPsecDospGetSecurityInfo0
関数IPsec DoS保護機能のセキュリティ情報を取得する。
シグネチャ
// fwpuclnt.dll
#include <windows.h>
DWORD IPsecDospGetSecurityInfo0(
FWPM_ENGINE_HANDLE engineHandle,
DWORD securityInfo,
PSID* sidOwner,
PSID* sidGroup,
ACL** dacl,
ACL** sacl,
PSECURITY_DESCRIPTOR* securityDescriptor
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| engineHandle | FWPM_ENGINE_HANDLE | in |
| securityInfo | DWORD | in |
| sidOwner | PSID* | out |
| sidGroup | PSID* | out |
| dacl | ACL** | out |
| sacl | ACL** | out |
| securityDescriptor | PSECURITY_DESCRIPTOR* | out |
戻り値の型: DWORD
各言語での呼び出し定義
// fwpuclnt.dll
#include <windows.h>
DWORD IPsecDospGetSecurityInfo0(
FWPM_ENGINE_HANDLE engineHandle,
DWORD securityInfo,
PSID* sidOwner,
PSID* sidGroup,
ACL** dacl,
ACL** sacl,
PSECURITY_DESCRIPTOR* securityDescriptor
);[DllImport("fwpuclnt.dll", ExactSpelling = true)]
static extern uint IPsecDospGetSecurityInfo0(
FWPM_ENGINE_HANDLE engineHandle, // FWPM_ENGINE_HANDLE
uint securityInfo, // DWORD
IntPtr sidOwner, // PSID* out
IntPtr sidGroup, // PSID* out
IntPtr dacl, // ACL** out
IntPtr sacl, // ACL** out
IntPtr securityDescriptor // PSECURITY_DESCRIPTOR* out
);<DllImport("fwpuclnt.dll", ExactSpelling:=True)>
Public Shared Function IPsecDospGetSecurityInfo0(
engineHandle As FWPM_ENGINE_HANDLE, ' FWPM_ENGINE_HANDLE
securityInfo As UInteger, ' DWORD
sidOwner As IntPtr, ' PSID* out
sidGroup As IntPtr, ' PSID* out
dacl As IntPtr, ' ACL** out
sacl As IntPtr, ' ACL** out
securityDescriptor As IntPtr ' PSECURITY_DESCRIPTOR* out
) As UInteger
End Function' engineHandle : FWPM_ENGINE_HANDLE
' securityInfo : DWORD
' sidOwner : PSID* out
' sidGroup : PSID* out
' dacl : ACL** out
' sacl : ACL** out
' securityDescriptor : PSECURITY_DESCRIPTOR* out
Declare PtrSafe Function IPsecDospGetSecurityInfo0 Lib "fwpuclnt" ( _
ByVal engineHandle As LongPtr, _
ByVal securityInfo As Long, _
ByVal sidOwner As LongPtr, _
ByVal sidGroup As LongPtr, _
ByVal dacl As LongPtr, _
ByVal sacl As LongPtr, _
ByVal securityDescriptor As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
IPsecDospGetSecurityInfo0 = ctypes.windll.fwpuclnt.IPsecDospGetSecurityInfo0
IPsecDospGetSecurityInfo0.restype = wintypes.DWORD
IPsecDospGetSecurityInfo0.argtypes = [
FWPM_ENGINE_HANDLE, # engineHandle : FWPM_ENGINE_HANDLE
wintypes.DWORD, # securityInfo : DWORD
ctypes.c_void_p, # sidOwner : PSID* out
ctypes.c_void_p, # sidGroup : PSID* out
ctypes.c_void_p, # dacl : ACL** out
ctypes.c_void_p, # sacl : ACL** out
ctypes.c_void_p, # securityDescriptor : PSECURITY_DESCRIPTOR* out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('fwpuclnt.dll')
IPsecDospGetSecurityInfo0 = Fiddle::Function.new(
lib['IPsecDospGetSecurityInfo0'],
[
Fiddle::TYPE_VOIDP, # engineHandle : FWPM_ENGINE_HANDLE
-Fiddle::TYPE_INT, # securityInfo : DWORD
Fiddle::TYPE_VOIDP, # sidOwner : PSID* out
Fiddle::TYPE_VOIDP, # sidGroup : PSID* out
Fiddle::TYPE_VOIDP, # dacl : ACL** out
Fiddle::TYPE_VOIDP, # sacl : ACL** out
Fiddle::TYPE_VOIDP, # securityDescriptor : PSECURITY_DESCRIPTOR* out
],
-Fiddle::TYPE_INT)#[link(name = "fwpuclnt")]
extern "system" {
fn IPsecDospGetSecurityInfo0(
engineHandle: FWPM_ENGINE_HANDLE, // FWPM_ENGINE_HANDLE
securityInfo: u32, // DWORD
sidOwner: *mut *mut core::ffi::c_void, // PSID* out
sidGroup: *mut *mut core::ffi::c_void, // PSID* out
dacl: *mut *mut ACL, // ACL** out
sacl: *mut *mut ACL, // ACL** out
securityDescriptor: *mut *mut core::ffi::c_void // PSECURITY_DESCRIPTOR* out
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("fwpuclnt.dll")]
public static extern uint IPsecDospGetSecurityInfo0(FWPM_ENGINE_HANDLE engineHandle, uint securityInfo, IntPtr sidOwner, IntPtr sidGroup, IntPtr dacl, IntPtr sacl, IntPtr securityDescriptor);
"@
$api = Add-Type -MemberDefinition $sig -Name 'fwpuclnt_IPsecDospGetSecurityInfo0' -Namespace Win32 -PassThru
# $api::IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, dacl, sacl, securityDescriptor)#uselib "fwpuclnt.dll"
#func global IPsecDospGetSecurityInfo0 "IPsecDospGetSecurityInfo0" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; IPsecDospGetSecurityInfo0 engineHandle, securityInfo, sidOwner, sidGroup, varptr(dacl), varptr(sacl), securityDescriptor ; 戻り値は stat
; engineHandle : FWPM_ENGINE_HANDLE -> "sptr"
; securityInfo : DWORD -> "sptr"
; sidOwner : PSID* out -> "sptr"
; sidGroup : PSID* out -> "sptr"
; dacl : ACL** out -> "sptr"
; sacl : ACL** out -> "sptr"
; securityDescriptor : PSECURITY_DESCRIPTOR* out -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "fwpuclnt.dll" #cfunc global IPsecDospGetSecurityInfo0 "IPsecDospGetSecurityInfo0" int, int, sptr, sptr, var, var, sptr ; res = IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, dacl, sacl, securityDescriptor) ; engineHandle : FWPM_ENGINE_HANDLE -> "int" ; securityInfo : DWORD -> "int" ; sidOwner : PSID* out -> "sptr" ; sidGroup : PSID* out -> "sptr" ; dacl : ACL** out -> "var" ; sacl : ACL** out -> "var" ; securityDescriptor : PSECURITY_DESCRIPTOR* out -> "sptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "fwpuclnt.dll" #cfunc global IPsecDospGetSecurityInfo0 "IPsecDospGetSecurityInfo0" int, int, sptr, sptr, sptr, sptr, sptr ; res = IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, varptr(dacl), varptr(sacl), securityDescriptor) ; engineHandle : FWPM_ENGINE_HANDLE -> "int" ; securityInfo : DWORD -> "int" ; sidOwner : PSID* out -> "sptr" ; sidGroup : PSID* out -> "sptr" ; dacl : ACL** out -> "sptr" ; sacl : ACL** out -> "sptr" ; securityDescriptor : PSECURITY_DESCRIPTOR* out -> "sptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; DWORD IPsecDospGetSecurityInfo0(FWPM_ENGINE_HANDLE engineHandle, DWORD securityInfo, PSID* sidOwner, PSID* sidGroup, ACL** dacl, ACL** sacl, PSECURITY_DESCRIPTOR* securityDescriptor) #uselib "fwpuclnt.dll" #cfunc global IPsecDospGetSecurityInfo0 "IPsecDospGetSecurityInfo0" int, int, intptr, intptr, var, var, intptr ; res = IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, dacl, sacl, securityDescriptor) ; engineHandle : FWPM_ENGINE_HANDLE -> "int" ; securityInfo : DWORD -> "int" ; sidOwner : PSID* out -> "intptr" ; sidGroup : PSID* out -> "intptr" ; dacl : ACL** out -> "var" ; sacl : ACL** out -> "var" ; securityDescriptor : PSECURITY_DESCRIPTOR* out -> "intptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; DWORD IPsecDospGetSecurityInfo0(FWPM_ENGINE_HANDLE engineHandle, DWORD securityInfo, PSID* sidOwner, PSID* sidGroup, ACL** dacl, ACL** sacl, PSECURITY_DESCRIPTOR* securityDescriptor) #uselib "fwpuclnt.dll" #cfunc global IPsecDospGetSecurityInfo0 "IPsecDospGetSecurityInfo0" int, int, intptr, intptr, intptr, intptr, intptr ; res = IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, varptr(dacl), varptr(sacl), securityDescriptor) ; engineHandle : FWPM_ENGINE_HANDLE -> "int" ; securityInfo : DWORD -> "int" ; sidOwner : PSID* out -> "intptr" ; sidGroup : PSID* out -> "intptr" ; dacl : ACL** out -> "intptr" ; sacl : ACL** out -> "intptr" ; securityDescriptor : PSECURITY_DESCRIPTOR* out -> "intptr" ; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。 ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
fwpuclnt = windows.NewLazySystemDLL("fwpuclnt.dll")
procIPsecDospGetSecurityInfo0 = fwpuclnt.NewProc("IPsecDospGetSecurityInfo0")
)
// engineHandle (FWPM_ENGINE_HANDLE), securityInfo (DWORD), sidOwner (PSID* out), sidGroup (PSID* out), dacl (ACL** out), sacl (ACL** out), securityDescriptor (PSECURITY_DESCRIPTOR* out)
r1, _, err := procIPsecDospGetSecurityInfo0.Call(
uintptr(engineHandle),
uintptr(securityInfo),
uintptr(sidOwner),
uintptr(sidGroup),
uintptr(dacl),
uintptr(sacl),
uintptr(securityDescriptor),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction IPsecDospGetSecurityInfo0(
engineHandle: FWPM_ENGINE_HANDLE; // FWPM_ENGINE_HANDLE
securityInfo: DWORD; // DWORD
sidOwner: Pointer; // PSID* out
sidGroup: Pointer; // PSID* out
dacl: Pointer; // ACL** out
sacl: Pointer; // ACL** out
securityDescriptor: Pointer // PSECURITY_DESCRIPTOR* out
): DWORD; stdcall;
external 'fwpuclnt.dll' name 'IPsecDospGetSecurityInfo0';result := DllCall("fwpuclnt\IPsecDospGetSecurityInfo0"
, "Ptr", engineHandle ; FWPM_ENGINE_HANDLE
, "UInt", securityInfo ; DWORD
, "Ptr", sidOwner ; PSID* out
, "Ptr", sidGroup ; PSID* out
, "Ptr", dacl ; ACL** out
, "Ptr", sacl ; ACL** out
, "Ptr", securityDescriptor ; PSECURITY_DESCRIPTOR* out
, "UInt") ; return: DWORD●IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, dacl, sacl, securityDescriptor) = DLL("fwpuclnt.dll", "dword IPsecDospGetSecurityInfo0(void*, dword, void*, void*, void*, void*, void*)")
# 呼び出し: IPsecDospGetSecurityInfo0(engineHandle, securityInfo, sidOwner, sidGroup, dacl, sacl, securityDescriptor)
# engineHandle : FWPM_ENGINE_HANDLE -> "void*"
# securityInfo : DWORD -> "dword"
# sidOwner : PSID* out -> "void*"
# sidGroup : PSID* out -> "void*"
# dacl : ACL** out -> "void*"
# sacl : ACL** out -> "void*"
# securityDescriptor : PSECURITY_DESCRIPTOR* out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。