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