ホーム › Security.Authorization › AuthzUnregisterCapChangeNotification
AuthzUnregisterCapChangeNotification
関数登録済みのポリシー変更通知サブスクリプションを解除する。
シグネチャ
// AUTHZ.dll
#include <windows.h>
BOOL AuthzUnregisterCapChangeNotification(
AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE hCapChangeSubscription
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hCapChangeSubscription | AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE | in |
戻り値の型: BOOL
各言語での呼び出し定義
// AUTHZ.dll
#include <windows.h>
BOOL AuthzUnregisterCapChangeNotification(
AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE hCapChangeSubscription
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("AUTHZ.dll", SetLastError = true, ExactSpelling = true)]
static extern bool AuthzUnregisterCapChangeNotification(
IntPtr hCapChangeSubscription // AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
);<DllImport("AUTHZ.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function AuthzUnregisterCapChangeNotification(
hCapChangeSubscription As IntPtr ' AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
) As Boolean
End Function' hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
Declare PtrSafe Function AuthzUnregisterCapChangeNotification Lib "authz" ( _
ByVal hCapChangeSubscription As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
AuthzUnregisterCapChangeNotification = ctypes.windll.authz.AuthzUnregisterCapChangeNotification
AuthzUnregisterCapChangeNotification.restype = wintypes.BOOL
AuthzUnregisterCapChangeNotification.argtypes = [
wintypes.HANDLE, # hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('AUTHZ.dll')
AuthzUnregisterCapChangeNotification = Fiddle::Function.new(
lib['AuthzUnregisterCapChangeNotification'],
[
Fiddle::TYPE_VOIDP, # hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
],
Fiddle::TYPE_INT)#[link(name = "authz")]
extern "system" {
fn AuthzUnregisterCapChangeNotification(
hCapChangeSubscription: *mut core::ffi::c_void // AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("AUTHZ.dll", SetLastError = true)]
public static extern bool AuthzUnregisterCapChangeNotification(IntPtr hCapChangeSubscription);
"@
$api = Add-Type -MemberDefinition $sig -Name 'AUTHZ_AuthzUnregisterCapChangeNotification' -Namespace Win32 -PassThru
# $api::AuthzUnregisterCapChangeNotification(hCapChangeSubscription)#uselib "AUTHZ.dll"
#func global AuthzUnregisterCapChangeNotification "AuthzUnregisterCapChangeNotification" sptr
; AuthzUnregisterCapChangeNotification hCapChangeSubscription ; 戻り値は stat
; hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "AUTHZ.dll"
#cfunc global AuthzUnregisterCapChangeNotification "AuthzUnregisterCapChangeNotification" sptr
; res = AuthzUnregisterCapChangeNotification(hCapChangeSubscription)
; hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE -> "sptr"; BOOL AuthzUnregisterCapChangeNotification(AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE hCapChangeSubscription)
#uselib "AUTHZ.dll"
#cfunc global AuthzUnregisterCapChangeNotification "AuthzUnregisterCapChangeNotification" intptr
; res = AuthzUnregisterCapChangeNotification(hCapChangeSubscription)
; hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
authz = windows.NewLazySystemDLL("AUTHZ.dll")
procAuthzUnregisterCapChangeNotification = authz.NewProc("AuthzUnregisterCapChangeNotification")
)
// hCapChangeSubscription (AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE)
r1, _, err := procAuthzUnregisterCapChangeNotification.Call(
uintptr(hCapChangeSubscription),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction AuthzUnregisterCapChangeNotification(
hCapChangeSubscription: THandle // AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
): BOOL; stdcall;
external 'AUTHZ.dll' name 'AuthzUnregisterCapChangeNotification';result := DllCall("AUTHZ\AuthzUnregisterCapChangeNotification"
, "Ptr", hCapChangeSubscription ; AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE
, "Int") ; return: BOOL●AuthzUnregisterCapChangeNotification(hCapChangeSubscription) = DLL("AUTHZ.dll", "bool AuthzUnregisterCapChangeNotification(void*)")
# 呼び出し: AuthzUnregisterCapChangeNotification(hCapChangeSubscription)
# hCapChangeSubscription : AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。