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

DrawDibProfileDisplay

関数
ディスプレイ性能をプロファイルして描画を最適化する。
DLLMSVFW32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

LRESULT DrawDibProfileDisplay(
    BITMAPINFOHEADER* lpbi
);

パラメーター

名前方向
lpbiBITMAPINFOHEADER*in

戻り値の型: LRESULT

各言語での呼び出し定義

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

LRESULT DrawDibProfileDisplay(
    BITMAPINFOHEADER* lpbi
);
[DllImport("MSVFW32.dll", ExactSpelling = true)]
static extern IntPtr DrawDibProfileDisplay(
    IntPtr lpbi   // BITMAPINFOHEADER*
);
<DllImport("MSVFW32.dll", ExactSpelling:=True)>
Public Shared Function DrawDibProfileDisplay(
    lpbi As IntPtr   ' BITMAPINFOHEADER*
) As IntPtr
End Function
' lpbi : BITMAPINFOHEADER*
Declare PtrSafe Function DrawDibProfileDisplay Lib "msvfw32" ( _
    ByVal lpbi As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

DrawDibProfileDisplay = ctypes.windll.msvfw32.DrawDibProfileDisplay
DrawDibProfileDisplay.restype = ctypes.c_ssize_t
DrawDibProfileDisplay.argtypes = [
    ctypes.c_void_p,  # lpbi : BITMAPINFOHEADER*
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MSVFW32.dll')
DrawDibProfileDisplay = Fiddle::Function.new(
  lib['DrawDibProfileDisplay'],
  [
    Fiddle::TYPE_VOIDP,  # lpbi : BITMAPINFOHEADER*
  ],
  Fiddle::TYPE_INTPTR_T)
#[link(name = "msvfw32")]
extern "system" {
    fn DrawDibProfileDisplay(
        lpbi: *mut BITMAPINFOHEADER  // BITMAPINFOHEADER*
    ) -> isize;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("MSVFW32.dll")]
public static extern IntPtr DrawDibProfileDisplay(IntPtr lpbi);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MSVFW32_DrawDibProfileDisplay' -Namespace Win32 -PassThru
# $api::DrawDibProfileDisplay(lpbi)
#uselib "MSVFW32.dll"
#func global DrawDibProfileDisplay "DrawDibProfileDisplay" sptr
; DrawDibProfileDisplay varptr(lpbi)   ; 戻り値は stat
; lpbi : BITMAPINFOHEADER* -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "MSVFW32.dll"
#cfunc global DrawDibProfileDisplay "DrawDibProfileDisplay" var
; res = DrawDibProfileDisplay(lpbi)
; lpbi : BITMAPINFOHEADER* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; LRESULT DrawDibProfileDisplay(BITMAPINFOHEADER* lpbi)
#uselib "MSVFW32.dll"
#cfunc global DrawDibProfileDisplay "DrawDibProfileDisplay" var
; res = DrawDibProfileDisplay(lpbi)
; lpbi : BITMAPINFOHEADER* -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
	procDrawDibProfileDisplay = msvfw32.NewProc("DrawDibProfileDisplay")
)

// lpbi (BITMAPINFOHEADER*)
r1, _, err := procDrawDibProfileDisplay.Call(
	uintptr(lpbi),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // LRESULT
function DrawDibProfileDisplay(
  lpbi: Pointer   // BITMAPINFOHEADER*
): NativeInt; stdcall;
  external 'MSVFW32.dll' name 'DrawDibProfileDisplay';
result := DllCall("MSVFW32\DrawDibProfileDisplay"
    , "Ptr", lpbi   ; BITMAPINFOHEADER*
    , "Ptr")   ; return: LRESULT
●DrawDibProfileDisplay(lpbi) = DLL("MSVFW32.dll", "int DrawDibProfileDisplay(void*)")
# 呼び出し: DrawDibProfileDisplay(lpbi)
# lpbi : BITMAPINFOHEADER* -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。