Win32 API 日本語リファレンス
ホームGraphics.GdiPlus › GdipCreateEffect

GdipCreateEffect

関数
指定GUIDのGDI+画像エフェクトオブジェクトを作成する。
DLLgdiplus.dll呼出規約winapi

シグネチャ

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

Status GdipCreateEffect(
    GUID guid,
    CGpEffect** effect
);

パラメーター

名前方向
guidGUIDin
effectCGpEffect**inout

戻り値の型: Status

各言語での呼び出し定義

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

Status GdipCreateEffect(
    GUID guid,
    CGpEffect** effect
);
[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipCreateEffect(
    Guid guid,   // GUID
    IntPtr effect   // CGpEffect** in/out
);
<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipCreateEffect(
    guid As Guid,   ' GUID
    effect As IntPtr   ' CGpEffect** in/out
) As Integer
End Function
' guid : GUID
' effect : CGpEffect** in/out
Declare PtrSafe Function GdipCreateEffect Lib "gdiplus" ( _
    ByVal guid As LongPtr, _
    ByVal effect As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GdipCreateEffect = ctypes.windll.gdiplus.GdipCreateEffect
GdipCreateEffect.restype = ctypes.c_int
GdipCreateEffect.argtypes = [
    ctypes.c_void_p,  # guid : GUID
    ctypes.c_void_p,  # effect : CGpEffect** in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('gdiplus.dll')
GdipCreateEffect = Fiddle::Function.new(
  lib['GdipCreateEffect'],
  [
    Fiddle::TYPE_VOIDP,  # guid : GUID
    Fiddle::TYPE_VOIDP,  # effect : CGpEffect** in/out
  ],
  Fiddle::TYPE_INT)
#[link(name = "gdiplus")]
extern "system" {
    fn GdipCreateEffect(
        guid: GUID,  // GUID
        effect: *mut *mut isize  // CGpEffect** in/out
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipCreateEffect(Guid guid, IntPtr effect);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipCreateEffect' -Namespace Win32 -PassThru
# $api::GdipCreateEffect(guid, effect)
#uselib "gdiplus.dll"
#func global GdipCreateEffect "GdipCreateEffect" sptr, sptr
; GdipCreateEffect guid, effect   ; 戻り値は stat
; guid : GUID -> "sptr"
; effect : CGpEffect** in/out -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "gdiplus.dll"
#cfunc global GdipCreateEffect "GdipCreateEffect" int, int
; res = GdipCreateEffect(guid, effect)
; guid : GUID -> "int"
; effect : CGpEffect** in/out -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; Status GdipCreateEffect(GUID guid, CGpEffect** effect)
#uselib "gdiplus.dll"
#cfunc global GdipCreateEffect "GdipCreateEffect" int, int
; res = GdipCreateEffect(guid, effect)
; guid : GUID -> "int"
; effect : CGpEffect** in/out -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
	procGdipCreateEffect = gdiplus.NewProc("GdipCreateEffect")
)

// guid (GUID), effect (CGpEffect** in/out)
r1, _, err := procGdipCreateEffect.Call(
	uintptr(guid),
	uintptr(effect),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // Status
function GdipCreateEffect(
  guid: TGUID;   // GUID
  effect: Pointer   // CGpEffect** in/out
): Integer; stdcall;
  external 'gdiplus.dll' name 'GdipCreateEffect';
result := DllCall("gdiplus\GdipCreateEffect"
    , "Ptr", guid   ; GUID
    , "Ptr", effect   ; CGpEffect** in/out
    , "Int")   ; return: Status
●GdipCreateEffect(guid, effect) = DLL("gdiplus.dll", "int GdipCreateEffect(void*, void*)")
# 呼び出し: GdipCreateEffect(guid, effect)
# guid : GUID -> "void*"
# effect : CGpEffect** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。