ホーム › Media.Multimedia › DrawDibStart
DrawDibStart
関数DrawDibによるストリーミング描画を開始する。
シグネチャ
// MSVFW32.dll
#include <windows.h>
BOOL DrawDibStart(
INT_PTR hdd,
DWORD rate
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hdd | INT_PTR | in |
| rate | DWORD | in |
戻り値の型: BOOL
各言語での呼び出し定義
// MSVFW32.dll
#include <windows.h>
BOOL DrawDibStart(
INT_PTR hdd,
DWORD rate
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MSVFW32.dll", ExactSpelling = true)]
static extern bool DrawDibStart(
IntPtr hdd, // INT_PTR
uint rate // DWORD
);<DllImport("MSVFW32.dll", ExactSpelling:=True)>
Public Shared Function DrawDibStart(
hdd As IntPtr, ' INT_PTR
rate As UInteger ' DWORD
) As Boolean
End Function' hdd : INT_PTR
' rate : DWORD
Declare PtrSafe Function DrawDibStart Lib "msvfw32" ( _
ByVal hdd As LongPtr, _
ByVal rate As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DrawDibStart = ctypes.windll.msvfw32.DrawDibStart
DrawDibStart.restype = wintypes.BOOL
DrawDibStart.argtypes = [
ctypes.c_ssize_t, # hdd : INT_PTR
wintypes.DWORD, # rate : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MSVFW32.dll')
DrawDibStart = Fiddle::Function.new(
lib['DrawDibStart'],
[
Fiddle::TYPE_INTPTR_T, # hdd : INT_PTR
-Fiddle::TYPE_INT, # rate : DWORD
],
Fiddle::TYPE_INT)#[link(name = "msvfw32")]
extern "system" {
fn DrawDibStart(
hdd: isize, // INT_PTR
rate: 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 DrawDibStart(IntPtr hdd, uint rate);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSVFW32_DrawDibStart' -Namespace Win32 -PassThru
# $api::DrawDibStart(hdd, rate)#uselib "MSVFW32.dll"
#func global DrawDibStart "DrawDibStart" sptr, sptr
; DrawDibStart hdd, rate ; 戻り値は stat
; hdd : INT_PTR -> "sptr"
; rate : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MSVFW32.dll"
#cfunc global DrawDibStart "DrawDibStart" sptr, int
; res = DrawDibStart(hdd, rate)
; hdd : INT_PTR -> "sptr"
; rate : DWORD -> "int"; BOOL DrawDibStart(INT_PTR hdd, DWORD rate)
#uselib "MSVFW32.dll"
#cfunc global DrawDibStart "DrawDibStart" intptr, int
; res = DrawDibStart(hdd, rate)
; hdd : INT_PTR -> "intptr"
; rate : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
procDrawDibStart = msvfw32.NewProc("DrawDibStart")
)
// hdd (INT_PTR), rate (DWORD)
r1, _, err := procDrawDibStart.Call(
uintptr(hdd),
uintptr(rate),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction DrawDibStart(
hdd: NativeInt; // INT_PTR
rate: DWORD // DWORD
): BOOL; stdcall;
external 'MSVFW32.dll' name 'DrawDibStart';result := DllCall("MSVFW32\DrawDibStart"
, "Ptr", hdd ; INT_PTR
, "UInt", rate ; DWORD
, "Int") ; return: BOOL●DrawDibStart(hdd, rate) = DLL("MSVFW32.dll", "bool DrawDibStart(int, dword)")
# 呼び出し: DrawDibStart(hdd, rate)
# hdd : INT_PTR -> "int"
# rate : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。