Win32 API 日本語リファレンス
ホームUI.Shell › UnregisterAppConstrainedChangeNotification

UnregisterAppConstrainedChangeNotification

関数
アプリ制約状態変更通知の登録を解除する。
DLLapi-ms-win-core-psm-appnotify-l1-1-1.dll呼出規約winapi

シグネチャ

// api-ms-win-core-psm-appnotify-l1-1-1.dll
#include <windows.h>

void UnregisterAppConstrainedChangeNotification(
    PAPPCONSTRAIN_REGISTRATION Registration
);

パラメーター

名前方向
RegistrationPAPPCONSTRAIN_REGISTRATIONin

戻り値の型: void

各言語での呼び出し定義

// api-ms-win-core-psm-appnotify-l1-1-1.dll
#include <windows.h>

void UnregisterAppConstrainedChangeNotification(
    PAPPCONSTRAIN_REGISTRATION Registration
);
[DllImport("api-ms-win-core-psm-appnotify-l1-1-1.dll", ExactSpelling = true)]
static extern void UnregisterAppConstrainedChangeNotification(
    IntPtr Registration   // PAPPCONSTRAIN_REGISTRATION
);
<DllImport("api-ms-win-core-psm-appnotify-l1-1-1.dll", ExactSpelling:=True)>
Public Shared Sub UnregisterAppConstrainedChangeNotification(
    Registration As IntPtr   ' PAPPCONSTRAIN_REGISTRATION
)
End Sub
' Registration : PAPPCONSTRAIN_REGISTRATION
Declare PtrSafe Sub UnregisterAppConstrainedChangeNotification Lib "api-ms-win-core-psm-appnotify-l1-1-1" ( _
    ByVal Registration As LongPtr)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

UnregisterAppConstrainedChangeNotification = ctypes.windll.LoadLibrary("api-ms-win-core-psm-appnotify-l1-1-1.dll").UnregisterAppConstrainedChangeNotification
UnregisterAppConstrainedChangeNotification.restype = None
UnregisterAppConstrainedChangeNotification.argtypes = [
    ctypes.c_ssize_t,  # Registration : PAPPCONSTRAIN_REGISTRATION
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('api-ms-win-core-psm-appnotify-l1-1-1.dll')
UnregisterAppConstrainedChangeNotification = Fiddle::Function.new(
  lib['UnregisterAppConstrainedChangeNotification'],
  [
    Fiddle::TYPE_INTPTR_T,  # Registration : PAPPCONSTRAIN_REGISTRATION
  ],
  Fiddle::TYPE_VOID)
#[link(name = "api-ms-win-core-psm-appnotify-l1-1-1")]
extern "system" {
    fn UnregisterAppConstrainedChangeNotification(
        Registration: isize  // PAPPCONSTRAIN_REGISTRATION
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("api-ms-win-core-psm-appnotify-l1-1-1.dll")]
public static extern void UnregisterAppConstrainedChangeNotification(IntPtr Registration);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-psm-appnotify-l1-1-1_UnregisterAppConstrainedChangeNotification' -Namespace Win32 -PassThru
# $api::UnregisterAppConstrainedChangeNotification(Registration)
#uselib "api-ms-win-core-psm-appnotify-l1-1-1.dll"
#func global UnregisterAppConstrainedChangeNotification "UnregisterAppConstrainedChangeNotification" sptr
; UnregisterAppConstrainedChangeNotification Registration
; Registration : PAPPCONSTRAIN_REGISTRATION -> "sptr"
#uselib "api-ms-win-core-psm-appnotify-l1-1-1.dll"
#func global UnregisterAppConstrainedChangeNotification "UnregisterAppConstrainedChangeNotification" sptr
; UnregisterAppConstrainedChangeNotification Registration
; Registration : PAPPCONSTRAIN_REGISTRATION -> "sptr"
; void UnregisterAppConstrainedChangeNotification(PAPPCONSTRAIN_REGISTRATION Registration)
#uselib "api-ms-win-core-psm-appnotify-l1-1-1.dll"
#func global UnregisterAppConstrainedChangeNotification "UnregisterAppConstrainedChangeNotification" intptr
; UnregisterAppConstrainedChangeNotification Registration
; Registration : PAPPCONSTRAIN_REGISTRATION -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	api_ms_win_core_psm_appnotify_l1_1_1 = windows.NewLazySystemDLL("api-ms-win-core-psm-appnotify-l1-1-1.dll")
	procUnregisterAppConstrainedChangeNotification = api_ms_win_core_psm_appnotify_l1_1_1.NewProc("UnregisterAppConstrainedChangeNotification")
)

// Registration (PAPPCONSTRAIN_REGISTRATION)
r1, _, err := procUnregisterAppConstrainedChangeNotification.Call(
	uintptr(Registration),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // void
procedure UnregisterAppConstrainedChangeNotification(
  Registration: NativeInt   // PAPPCONSTRAIN_REGISTRATION
); stdcall;
  external 'api-ms-win-core-psm-appnotify-l1-1-1.dll' name 'UnregisterAppConstrainedChangeNotification';
result := DllCall("api-ms-win-core-psm-appnotify-l1-1-1\UnregisterAppConstrainedChangeNotification"
    , "Ptr", Registration   ; PAPPCONSTRAIN_REGISTRATION
    , "Int")   ; return: void
●UnregisterAppConstrainedChangeNotification(Registration) = DLL("api-ms-win-core-psm-appnotify-l1-1-1.dll", "int UnregisterAppConstrainedChangeNotification(int)")
# 呼び出し: UnregisterAppConstrainedChangeNotification(Registration)
# Registration : PAPPCONSTRAIN_REGISTRATION -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。