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

DrawDibOpen

関数
DrawDibの描画コンテキストを開く。
DLLMSVFW32.dll呼出規約winapi対応OSWindows 2000 以降

シグネチャ

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

INT_PTR DrawDibOpen(void);

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

各言語での呼び出し定義

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

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

DrawDibOpen = ctypes.windll.msvfw32.DrawDibOpen
DrawDibOpen.restype = ctypes.c_ssize_t
DrawDibOpen.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	msvfw32 = windows.NewLazySystemDLL("MSVFW32.dll")
	procDrawDibOpen = msvfw32.NewProc("DrawDibOpen")
)

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