Win32 API 日本語リファレンス
ホームSystem.WindowsProgramming › UnsubscribeFeatureStateChangeNotification

UnsubscribeFeatureStateChangeNotification

関数
フィーチャー状態変化通知の購読を解除する。
DLLapi-ms-win-core-featurestaging-l1-1-0.dll呼出規約winapi

シグネチャ

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

void UnsubscribeFeatureStateChangeNotification(
    FEATURE_STATE_CHANGE_SUBSCRIPTION subscription
);

パラメーター

名前方向
subscriptionFEATURE_STATE_CHANGE_SUBSCRIPTIONin

戻り値の型: void

各言語での呼び出し定義

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

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

UnsubscribeFeatureStateChangeNotification = ctypes.windll.LoadLibrary("api-ms-win-core-featurestaging-l1-1-0.dll").UnsubscribeFeatureStateChangeNotification
UnsubscribeFeatureStateChangeNotification.restype = None
UnsubscribeFeatureStateChangeNotification.argtypes = [
    wintypes.HANDLE,  # subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('api-ms-win-core-featurestaging-l1-1-0.dll')
UnsubscribeFeatureStateChangeNotification = Fiddle::Function.new(
  lib['UnsubscribeFeatureStateChangeNotification'],
  [
    Fiddle::TYPE_VOIDP,  # subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION
  ],
  Fiddle::TYPE_VOID)
#[link(name = "api-ms-win-core-featurestaging-l1-1-0")]
extern "system" {
    fn UnsubscribeFeatureStateChangeNotification(
        subscription: *mut core::ffi::c_void  // FEATURE_STATE_CHANGE_SUBSCRIPTION
    );
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("api-ms-win-core-featurestaging-l1-1-0.dll")]
public static extern void UnsubscribeFeatureStateChangeNotification(IntPtr subscription);
"@
$api = Add-Type -MemberDefinition $sig -Name 'api-ms-win-core-featurestaging-l1-1-0_UnsubscribeFeatureStateChangeNotification' -Namespace Win32 -PassThru
# $api::UnsubscribeFeatureStateChangeNotification(subscription)
#uselib "api-ms-win-core-featurestaging-l1-1-0.dll"
#func global UnsubscribeFeatureStateChangeNotification "UnsubscribeFeatureStateChangeNotification" sptr
; UnsubscribeFeatureStateChangeNotification subscription
; subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION -> "sptr"
#uselib "api-ms-win-core-featurestaging-l1-1-0.dll"
#func global UnsubscribeFeatureStateChangeNotification "UnsubscribeFeatureStateChangeNotification" sptr
; UnsubscribeFeatureStateChangeNotification subscription
; subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION -> "sptr"
; void UnsubscribeFeatureStateChangeNotification(FEATURE_STATE_CHANGE_SUBSCRIPTION subscription)
#uselib "api-ms-win-core-featurestaging-l1-1-0.dll"
#func global UnsubscribeFeatureStateChangeNotification "UnsubscribeFeatureStateChangeNotification" intptr
; UnsubscribeFeatureStateChangeNotification subscription
; subscription : FEATURE_STATE_CHANGE_SUBSCRIPTION -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	api_ms_win_core_featurestaging_l1_1_0 = windows.NewLazySystemDLL("api-ms-win-core-featurestaging-l1-1-0.dll")
	procUnsubscribeFeatureStateChangeNotification = api_ms_win_core_featurestaging_l1_1_0.NewProc("UnsubscribeFeatureStateChangeNotification")
)

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