ホーム › Media.Multimedia › ICInstall
ICInstall
関数映像圧縮ドライバーをインストールする。
シグネチャ
// MSVFW32.dll
#include <windows.h>
BOOL ICInstall(
DWORD fccType,
DWORD fccHandler,
LPARAM lParam,
LPSTR szDesc,
DWORD wFlags
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| fccType | DWORD | in |
| fccHandler | DWORD | in |
| lParam | LPARAM | in |
| szDesc | LPSTR | in |
| wFlags | DWORD | in |
戻り値の型: BOOL
各言語での呼び出し定義
// MSVFW32.dll
#include <windows.h>
BOOL ICInstall(
DWORD fccType,
DWORD fccHandler,
LPARAM lParam,
LPSTR szDesc,
DWORD wFlags
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSVFW32.dll", ExactSpelling = true)]
static extern bool ICInstall(
uint fccType, // DWORD
uint fccHandler, // DWORD
IntPtr lParam, // LPARAM
[MarshalAs(UnmanagedType.LPStr)] string szDesc, // LPSTR
uint wFlags // DWORD
);<DllImport("MSVFW32.dll", ExactSpelling:=True)>
Public Shared Function ICInstall(
fccType As UInteger, ' DWORD
fccHandler As UInteger, ' DWORD
lParam As IntPtr, ' LPARAM
<MarshalAs(UnmanagedType.LPStr)> szDesc As String, ' LPSTR
wFlags As UInteger ' DWORD
) As Boolean
End Function' fccType : DWORD
' fccHandler : DWORD
' lParam : LPARAM
' szDesc : LPSTR
' wFlags : DWORD
Declare PtrSafe Function ICInstall Lib "msvfw32" ( _
ByVal fccType As Long, _
ByVal fccHandler As Long, _
ByVal lParam As LongPtr, _
ByVal szDesc As String, _
ByVal wFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ICInstall = ctypes.windll.msvfw32.ICInstall
ICInstall.restype = wintypes.BOOL
ICInstall.argtypes = [
wintypes.DWORD, # fccType : DWORD
wintypes.DWORD, # fccHandler : DWORD
ctypes.c_ssize_t, # lParam : LPARAM
wintypes.LPCSTR, # szDesc : LPSTR
wintypes.DWORD, # wFlags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSVFW32.dll')
ICInstall = Fiddle::Function.new(
lib['ICInstall'],
[
-Fiddle::TYPE_INT, # fccType : DWORD
-Fiddle::TYPE_INT, # fccHandler : DWORD
Fiddle::TYPE_INTPTR_T, # lParam : LPARAM
Fiddle::TYPE_VOIDP, # szDesc : LPSTR
-Fiddle::TYPE_INT, # wFlags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "msvfw32")]
extern "system" {
fn ICInstall(
fccType: u32, // DWORD
fccHandler: u32, // DWORD
lParam: isize, // LPARAM
szDesc: *mut u8, // LPSTR
wFlags: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSVFW32.dll")]
public static extern bool ICInstall(uint fccType, uint fccHandler, IntPtr lParam, [MarshalAs(UnmanagedType.LPStr)] string szDesc, uint wFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSVFW32_ICInstall' -Namespace Win32 -PassThru
# $api::ICInstall(fccType, fccHandler, lParam, szDesc, wFlags)#uselib "MSVFW32.dll"
#func global ICInstall "ICInstall" sptr, sptr, sptr, sptr, sptr
; ICInstall fccType, fccHandler, lParam, szDesc, wFlags ; 戻り値は stat
; fccType : DWORD -> "sptr"
; fccHandler : DWORD -> "sptr"
; lParam : LPARAM -> "sptr"
; szDesc : LPSTR -> "sptr"
; wFlags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSVFW32.dll"
#cfunc global ICInstall "ICInstall" int, int, sptr, str, int
; res = ICInstall(fccType, fccHandler, lParam, szDesc, wFlags)
; fccType : DWORD -> "int"
; fccHandler : DWORD -> "int"
; lParam : LPARAM -> "sptr"
; szDesc : LPSTR -> "str"
; wFlags : DWORD -> "int"; BOOL ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDesc, DWORD wFlags)
#uselib "MSVFW32.dll"
#cfunc global ICInstall "ICInstall" int, int, intptr, str, int
; res = ICInstall(fccType, fccHandler, lParam, szDesc, wFlags)
; fccType : DWORD -> "int"
; fccHandler : DWORD -> "int"
; lParam : LPARAM -> "intptr"
; szDesc : LPSTR -> "str"
; wFlags : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
procICInstall = msvfw32.NewProc("ICInstall")
)
// fccType (DWORD), fccHandler (DWORD), lParam (LPARAM), szDesc (LPSTR), wFlags (DWORD)
r1, _, err := procICInstall.Call(
uintptr(fccType),
uintptr(fccHandler),
uintptr(lParam),
uintptr(unsafe.Pointer(windows.BytePtrFromString(szDesc))),
uintptr(wFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction ICInstall(
fccType: DWORD; // DWORD
fccHandler: DWORD; // DWORD
lParam: NativeInt; // LPARAM
szDesc: PAnsiChar; // LPSTR
wFlags: DWORD // DWORD
): BOOL; stdcall;
external 'MSVFW32.dll' name 'ICInstall';result := DllCall("MSVFW32\ICInstall"
, "UInt", fccType ; DWORD
, "UInt", fccHandler ; DWORD
, "Ptr", lParam ; LPARAM
, "AStr", szDesc ; LPSTR
, "UInt", wFlags ; DWORD
, "Int") ; return: BOOL●ICInstall(fccType, fccHandler, lParam, szDesc, wFlags) = DLL("MSVFW32.dll", "bool ICInstall(dword, dword, int, char*, dword)")
# 呼び出し: ICInstall(fccType, fccHandler, lParam, szDesc, wFlags)
# fccType : DWORD -> "dword"
# fccHandler : DWORD -> "dword"
# lParam : LPARAM -> "int"
# szDesc : LPSTR -> "char*"
# wFlags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。