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

MCIWndRegisterClass

関数
MCIWndウィンドウクラスを登録する。
DLLMSVFW32.dll呼出規約cdecl対応OSWindows 2000 以降

シグネチャ

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

BOOL MCIWndRegisterClass(void);

パラメーターなし。戻り値: BOOL

各言語での呼び出し定義

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

BOOL MCIWndRegisterClass(void);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSVFW32.dll", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
static extern bool MCIWndRegisterClass();
<DllImport("MSVFW32.dll", ExactSpelling:=True, CallingConvention:=CallingConvention.Cdecl)>
Public Shared Function MCIWndRegisterClass() As Boolean
End Function
Declare PtrSafe Function MCIWndRegisterClass Lib "msvfw32" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MCIWndRegisterClass = ctypes.cdll.msvfw32.MCIWndRegisterClass
MCIWndRegisterClass.restype = wintypes.BOOL
MCIWndRegisterClass.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
	procMCIWndRegisterClass = msvfw32.NewProc("MCIWndRegisterClass")
)

r1, _, err := procMCIWndRegisterClass.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function MCIWndRegisterClass: BOOL; cdecl;
  external 'MSVFW32.dll' name 'MCIWndRegisterClass';
result := DllCall("MSVFW32\MCIWndRegisterClass", "Cdecl Int")
●MCIWndRegisterClass() = DLL("MSVFW32.dll", "bool MCIWndRegisterClass()")
# 呼び出し: MCIWndRegisterClass()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※cdecl関数。DLL()宣言はstdcall前提。cdeclは EXEC_PTR(`cdecl`,…) を使用。