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