Win32 API 日本語リファレンス
ホームMedia.Multimedia › mciFreeCommandResource

mciFreeCommandResource

関数
読み込んだMCIコマンドテーブルリソースを解放する。
DLLWINMM.dll呼出規約winapi

シグネチャ

// WINMM.dll
#include <windows.h>

BOOL mciFreeCommandResource(
    DWORD wTable
);

パラメーター

名前方向
wTableDWORDin

戻り値の型: BOOL

各言語での呼び出し定義

// WINMM.dll
#include <windows.h>

BOOL mciFreeCommandResource(
    DWORD wTable
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WINMM.dll", ExactSpelling = true)]
static extern bool mciFreeCommandResource(
    uint wTable   // DWORD
);
<DllImport("WINMM.dll", ExactSpelling:=True)>
Public Shared Function mciFreeCommandResource(
    wTable As UInteger   ' DWORD
) As Boolean
End Function
' wTable : DWORD
Declare PtrSafe Function mciFreeCommandResource Lib "winmm" ( _
    ByVal wTable As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

mciFreeCommandResource = ctypes.windll.winmm.mciFreeCommandResource
mciFreeCommandResource.restype = wintypes.BOOL
mciFreeCommandResource.argtypes = [
    wintypes.DWORD,  # wTable : DWORD
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('WINMM.dll')
mciFreeCommandResource = Fiddle::Function.new(
  lib['mciFreeCommandResource'],
  [
    -Fiddle::TYPE_INT,  # wTable : DWORD
  ],
  Fiddle::TYPE_INT)
#[link(name = "winmm")]
extern "system" {
    fn mciFreeCommandResource(
        wTable: u32  // DWORD
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("WINMM.dll")]
public static extern bool mciFreeCommandResource(uint wTable);
"@
$api = Add-Type -MemberDefinition $sig -Name 'WINMM_mciFreeCommandResource' -Namespace Win32 -PassThru
# $api::mciFreeCommandResource(wTable)
#uselib "WINMM.dll"
#func global mciFreeCommandResource "mciFreeCommandResource" sptr
; mciFreeCommandResource wTable   ; 戻り値は stat
; wTable : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "WINMM.dll"
#cfunc global mciFreeCommandResource "mciFreeCommandResource" int
; res = mciFreeCommandResource(wTable)
; wTable : DWORD -> "int"
; BOOL mciFreeCommandResource(DWORD wTable)
#uselib "WINMM.dll"
#cfunc global mciFreeCommandResource "mciFreeCommandResource" int
; res = mciFreeCommandResource(wTable)
; wTable : DWORD -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	winmm = windows.NewLazySystemDLL("WINMM.dll")
	procmciFreeCommandResource = winmm.NewProc("mciFreeCommandResource")
)

// wTable (DWORD)
r1, _, err := procmciFreeCommandResource.Call(
	uintptr(wTable),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function mciFreeCommandResource(
  wTable: DWORD   // DWORD
): BOOL; stdcall;
  external 'WINMM.dll' name 'mciFreeCommandResource';
result := DllCall("WINMM\mciFreeCommandResource"
    , "UInt", wTable   ; DWORD
    , "Int")   ; return: BOOL
●mciFreeCommandResource(wTable) = DLL("WINMM.dll", "bool mciFreeCommandResource(dword)")
# 呼び出し: mciFreeCommandResource(wTable)
# wTable : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。