Win32 API 日本語リファレンス
ホームMedia.MediaFoundation › MFRemovePeriodicCallback

MFRemovePeriodicCallback

関数
登録済みの定期コールバックをキーで指定して解除する。
DLLMFPlat.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// MFPlat.dll
#include <windows.h>

HRESULT MFRemovePeriodicCallback(
    DWORD dwKey
);

パラメーター

名前方向
dwKeyDWORDin

戻り値の型: HRESULT

各言語での呼び出し定義

// MFPlat.dll
#include <windows.h>

HRESULT MFRemovePeriodicCallback(
    DWORD dwKey
);
[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern int MFRemovePeriodicCallback(
    uint dwKey   // DWORD
);
<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Function MFRemovePeriodicCallback(
    dwKey As UInteger   ' DWORD
) As Integer
End Function
' dwKey : DWORD
Declare PtrSafe Function MFRemovePeriodicCallback Lib "mfplat" ( _
    ByVal dwKey As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MFRemovePeriodicCallback = ctypes.windll.mfplat.MFRemovePeriodicCallback
MFRemovePeriodicCallback.restype = ctypes.c_int
MFRemovePeriodicCallback.argtypes = [
    wintypes.DWORD,  # dwKey : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MFPlat.dll')
MFRemovePeriodicCallback = Fiddle::Function.new(
  lib['MFRemovePeriodicCallback'],
  [
    -Fiddle::TYPE_INT,  # dwKey : DWORD
  ],
  Fiddle::TYPE_INT)
#[link(name = "mfplat")]
extern "system" {
    fn MFRemovePeriodicCallback(
        dwKey: u32  // DWORD
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MFPlat.dll")]
public static extern int MFRemovePeriodicCallback(uint dwKey);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFRemovePeriodicCallback' -Namespace Win32 -PassThru
# $api::MFRemovePeriodicCallback(dwKey)
#uselib "MFPlat.dll"
#func global MFRemovePeriodicCallback "MFRemovePeriodicCallback" sptr
; MFRemovePeriodicCallback dwKey   ; 戻り値は stat
; dwKey : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MFPlat.dll"
#cfunc global MFRemovePeriodicCallback "MFRemovePeriodicCallback" int
; res = MFRemovePeriodicCallback(dwKey)
; dwKey : DWORD -> "int"
; HRESULT MFRemovePeriodicCallback(DWORD dwKey)
#uselib "MFPlat.dll"
#cfunc global MFRemovePeriodicCallback "MFRemovePeriodicCallback" int
; res = MFRemovePeriodicCallback(dwKey)
; dwKey : DWORD -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	mfplat = windows.NewLazySystemDLL("MFPlat.dll")
	procMFRemovePeriodicCallback = mfplat.NewProc("MFRemovePeriodicCallback")
)

// dwKey (DWORD)
r1, _, err := procMFRemovePeriodicCallback.Call(
	uintptr(dwKey),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function MFRemovePeriodicCallback(
  dwKey: DWORD   // DWORD
): Integer; stdcall;
  external 'MFPlat.dll' name 'MFRemovePeriodicCallback';
result := DllCall("MFPlat\MFRemovePeriodicCallback"
    , "UInt", dwKey   ; DWORD
    , "Int")   ; return: HRESULT
●MFRemovePeriodicCallback(dwKey) = DLL("MFPlat.dll", "int MFRemovePeriodicCallback(dword)")
# 呼び出し: MFRemovePeriodicCallback(dwKey)
# dwKey : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。