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