ホーム › Media.MediaFoundation › MFLockPlatform
MFLockPlatform
関数Media Foundationプラットフォームをロックして終了を防ぐ。
シグネチャ
// MFPlat.dll
#include <windows.h>
HRESULT MFLockPlatform(void);パラメーターなし。戻り値: HRESULT
各言語での呼び出し定義
// MFPlat.dll
#include <windows.h>
HRESULT MFLockPlatform(void);[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern int MFLockPlatform();<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Function MFLockPlatform() As Integer
End FunctionDeclare PtrSafe Function MFLockPlatform Lib "mfplat" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MFLockPlatform = ctypes.windll.mfplat.MFLockPlatform
MFLockPlatform.restype = ctypes.c_int
MFLockPlatform.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MFPlat.dll')
MFLockPlatform = Fiddle::Function.new(
lib['MFLockPlatform'],
[],
Fiddle::TYPE_INT)#[link(name = "mfplat")]
extern "system" {
fn MFLockPlatform() -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MFPlat.dll")]
public static extern int MFLockPlatform();
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFLockPlatform' -Namespace Win32 -PassThru
# $api::MFLockPlatform()#uselib "MFPlat.dll"
#func global MFLockPlatform "MFLockPlatform"
; MFLockPlatform ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MFPlat.dll"
#cfunc global MFLockPlatform "MFLockPlatform"
; res = MFLockPlatform(); HRESULT MFLockPlatform()
#uselib "MFPlat.dll"
#cfunc global MFLockPlatform "MFLockPlatform"
; res = MFLockPlatform()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mfplat = windows.NewLazySystemDLL("MFPlat.dll")
procMFLockPlatform = mfplat.NewProc("MFLockPlatform")
)
r1, _, err := procMFLockPlatform.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction MFLockPlatform: Integer; stdcall;
external 'MFPlat.dll' name 'MFLockPlatform';result := DllCall("MFPlat\MFLockPlatform", "Int")●MFLockPlatform() = DLL("MFPlat.dll", "int MFLockPlatform()")
# 呼び出し: MFLockPlatform()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。