ホーム › Media.Multimedia › ICRemove
ICRemove
関数インストール済み映像圧縮ドライバーを削除する。
シグネチャ
// MSVFW32.dll
#include <windows.h>
BOOL ICRemove(
DWORD fccType,
DWORD fccHandler,
DWORD wFlags
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| fccType | DWORD | in | コンプレッサーまたはデコンプレッサーが使用するデータの種類を示す 4 文字コード。ビデオコンプレッサーまたはデコンプレッサーの場合は "VIDC" を指定します。 |
| fccHandler | DWORD | in | 特定のコンプレッサーを識別する 4 文字コード、または fccType で指定された種類のインストール済みコンプレッサーの数を上限とした 0 以上の番号。 |
| wFlags | DWORD | in | 予約済み。使用しないでください。 |
戻り値の型: BOOL
公式ドキュメント
ICRemove 関数は、インストール済みのコンプレッサーを削除します。
戻り値
成功した場合は TRUE を、それ以外の場合は FALSE を返します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// MSVFW32.dll
#include <windows.h>
BOOL ICRemove(
DWORD fccType,
DWORD fccHandler,
DWORD wFlags
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSVFW32.dll", ExactSpelling = true)]
static extern bool ICRemove(
uint fccType, // DWORD
uint fccHandler, // DWORD
uint wFlags // DWORD
);<DllImport("MSVFW32.dll", ExactSpelling:=True)>
Public Shared Function ICRemove(
fccType As UInteger, ' DWORD
fccHandler As UInteger, ' DWORD
wFlags As UInteger ' DWORD
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function' fccType : DWORD
' fccHandler : DWORD
' wFlags : DWORD
Declare PtrSafe Function ICRemove Lib "msvfw32" ( _
ByVal fccType As Long, _
ByVal fccHandler As Long, _
ByVal wFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ICRemove = ctypes.windll.msvfw32.ICRemove
ICRemove.restype = wintypes.BOOL
ICRemove.argtypes = [
wintypes.DWORD, # fccType : DWORD
wintypes.DWORD, # fccHandler : DWORD
wintypes.DWORD, # wFlags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSVFW32.dll')
ICRemove = Fiddle::Function.new(
lib['ICRemove'],
[
-Fiddle::TYPE_INT, # fccType : DWORD
-Fiddle::TYPE_INT, # fccHandler : DWORD
-Fiddle::TYPE_INT, # wFlags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "msvfw32")]
extern "system" {
fn ICRemove(
fccType: u32, // DWORD
fccHandler: u32, // DWORD
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 ICRemove(uint fccType, uint fccHandler, uint wFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSVFW32_ICRemove' -Namespace Win32 -PassThru
# $api::ICRemove(fccType, fccHandler, wFlags)#uselib "MSVFW32.dll"
#func global ICRemove "ICRemove" sptr, sptr, sptr
; ICRemove fccType, fccHandler, wFlags ; 戻り値は stat
; fccType : DWORD -> "sptr"
; fccHandler : DWORD -> "sptr"
; wFlags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSVFW32.dll"
#cfunc global ICRemove "ICRemove" int, int, int
; res = ICRemove(fccType, fccHandler, wFlags)
; fccType : DWORD -> "int"
; fccHandler : DWORD -> "int"
; wFlags : DWORD -> "int"; BOOL ICRemove(DWORD fccType, DWORD fccHandler, DWORD wFlags)
#uselib "MSVFW32.dll"
#cfunc global ICRemove "ICRemove" int, int, int
; res = ICRemove(fccType, fccHandler, wFlags)
; fccType : DWORD -> "int"
; fccHandler : DWORD -> "int"
; wFlags : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
procICRemove = msvfw32.NewProc("ICRemove")
)
// fccType (DWORD), fccHandler (DWORD), wFlags (DWORD)
r1, _, err := procICRemove.Call(
uintptr(fccType),
uintptr(fccHandler),
uintptr(wFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction ICRemove(
fccType: DWORD; // DWORD
fccHandler: DWORD; // DWORD
wFlags: DWORD // DWORD
): BOOL; stdcall;
external 'MSVFW32.dll' name 'ICRemove';result := DllCall("MSVFW32\ICRemove"
, "UInt", fccType ; DWORD
, "UInt", fccHandler ; DWORD
, "UInt", wFlags ; DWORD
, "Int") ; return: BOOL●ICRemove(fccType, fccHandler, wFlags) = DLL("MSVFW32.dll", "bool ICRemove(dword, dword, dword)")
# 呼び出し: ICRemove(fccType, fccHandler, wFlags)
# fccType : DWORD -> "dword"
# fccHandler : DWORD -> "dword"
# wFlags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "msvfw32" fn ICRemove(
fccType: u32, // DWORD
fccHandler: u32, // DWORD
wFlags: u32 // DWORD
) callconv(std.os.windows.WINAPI) i32;proc ICRemove(
fccType: uint32, # DWORD
fccHandler: uint32, # DWORD
wFlags: uint32 # DWORD
): int32 {.importc: "ICRemove", stdcall, dynlib: "MSVFW32.dll".}pragma(lib, "msvfw32");
extern(Windows)
int ICRemove(
uint fccType, // DWORD
uint fccHandler, // DWORD
uint wFlags // DWORD
);ccall((:ICRemove, "MSVFW32.dll"), stdcall, Int32,
(UInt32, UInt32, UInt32),
fccType, fccHandler, wFlags)
# fccType : DWORD -> UInt32
# fccHandler : DWORD -> UInt32
# wFlags : DWORD -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t ICRemove(
uint32_t fccType,
uint32_t fccHandler,
uint32_t wFlags);
]]
local msvfw32 = ffi.load("msvfw32")
-- msvfw32.ICRemove(fccType, fccHandler, wFlags)
-- fccType : DWORD
-- fccHandler : DWORD
-- wFlags : DWORD
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('MSVFW32.dll');
const ICRemove = lib.func('__stdcall', 'ICRemove', 'int32_t', ['uint32_t', 'uint32_t', 'uint32_t']);
// ICRemove(fccType, fccHandler, wFlags)
// fccType : DWORD -> 'uint32_t'
// fccHandler : DWORD -> 'uint32_t'
// wFlags : DWORD -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("MSVFW32.dll", {
ICRemove: { parameters: ["u32", "u32", "u32"], result: "i32" },
});
// lib.symbols.ICRemove(fccType, fccHandler, wFlags)
// fccType : DWORD -> "u32"
// fccHandler : DWORD -> "u32"
// wFlags : DWORD -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t ICRemove(
uint32_t fccType,
uint32_t fccHandler,
uint32_t wFlags);
C, "MSVFW32.dll");
// $ffi->ICRemove(fccType, fccHandler, wFlags);
// fccType : DWORD
// fccHandler : DWORD
// wFlags : DWORD
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Msvfw32 extends StdCallLibrary {
Msvfw32 INSTANCE = Native.load("msvfw32", Msvfw32.class);
boolean ICRemove(
int fccType, // DWORD
int fccHandler, // DWORD
int wFlags // DWORD
);
}@[Link("msvfw32")]
lib LibMSVFW32
fun ICRemove = ICRemove(
fccType : UInt32, # DWORD
fccHandler : UInt32, # DWORD
wFlags : UInt32 # DWORD
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef ICRemoveNative = Int32 Function(Uint32, Uint32, Uint32);
typedef ICRemoveDart = int Function(int, int, int);
final ICRemove = DynamicLibrary.open('MSVFW32.dll')
.lookupFunction<ICRemoveNative, ICRemoveDart>('ICRemove');
// fccType : DWORD -> Uint32
// fccHandler : DWORD -> Uint32
// wFlags : DWORD -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function ICRemove(
fccType: DWORD; // DWORD
fccHandler: DWORD; // DWORD
wFlags: DWORD // DWORD
): BOOL; stdcall;
external 'MSVFW32.dll' name 'ICRemove';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "ICRemove"
c_ICRemove :: Word32 -> Word32 -> Word32 -> IO CInt
-- fccType : DWORD -> Word32
-- fccHandler : DWORD -> Word32
-- wFlags : DWORD -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let icremove =
foreign "ICRemove"
(uint32_t @-> uint32_t @-> uint32_t @-> returning int32_t)
(* fccType : DWORD -> uint32_t *)
(* fccHandler : DWORD -> uint32_t *)
(* wFlags : DWORD -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library msvfw32 (t "MSVFW32.dll"))
(cffi:use-foreign-library msvfw32)
(cffi:defcfun ("ICRemove" icremove :convention :stdcall) :int32
(fcc-type :uint32) ; DWORD
(fcc-handler :uint32) ; DWORD
(w-flags :uint32)) ; DWORD
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $ICRemove = Win32::API::More->new('MSVFW32',
'BOOL ICRemove(DWORD fccType, DWORD fccHandler, DWORD wFlags)');
# my $ret = $ICRemove->Call($fccType, $fccHandler, $wFlags);
# fccType : DWORD -> DWORD
# fccHandler : DWORD -> DWORD
# wFlags : DWORD -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。