ホーム › Graphics.GdiPlus › GdipStringFormatGetGenericTypographic
GdipStringFormatGetGenericTypographic
関数タイポグラフィ用の汎用文字列書式を取得する。
シグネチャ
// gdiplus.dll
#include <windows.h>
Status GdipStringFormatGetGenericTypographic(
GpStringFormat** format
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| format | GpStringFormat** | inout |
戻り値の型: Status
各言語での呼び出し定義
// gdiplus.dll
#include <windows.h>
Status GdipStringFormatGetGenericTypographic(
GpStringFormat** format
);[DllImport("gdiplus.dll", ExactSpelling = true)]
static extern int GdipStringFormatGetGenericTypographic(
IntPtr format // GpStringFormat** in/out
);<DllImport("gdiplus.dll", ExactSpelling:=True)>
Public Shared Function GdipStringFormatGetGenericTypographic(
format As IntPtr ' GpStringFormat** in/out
) As Integer
End Function' format : GpStringFormat** in/out
Declare PtrSafe Function GdipStringFormatGetGenericTypographic Lib "gdiplus" ( _
ByVal format As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GdipStringFormatGetGenericTypographic = ctypes.windll.gdiplus.GdipStringFormatGetGenericTypographic
GdipStringFormatGetGenericTypographic.restype = ctypes.c_int
GdipStringFormatGetGenericTypographic.argtypes = [
ctypes.c_void_p, # format : GpStringFormat** in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('gdiplus.dll')
GdipStringFormatGetGenericTypographic = Fiddle::Function.new(
lib['GdipStringFormatGetGenericTypographic'],
[
Fiddle::TYPE_VOIDP, # format : GpStringFormat** in/out
],
Fiddle::TYPE_INT)#[link(name = "gdiplus")]
extern "system" {
fn GdipStringFormatGetGenericTypographic(
format: *mut *mut GpStringFormat // GpStringFormat** in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("gdiplus.dll")]
public static extern int GdipStringFormatGetGenericTypographic(IntPtr format);
"@
$api = Add-Type -MemberDefinition $sig -Name 'gdiplus_GdipStringFormatGetGenericTypographic' -Namespace Win32 -PassThru
# $api::GdipStringFormatGetGenericTypographic(format)#uselib "gdiplus.dll"
#func global GdipStringFormatGetGenericTypographic "GdipStringFormatGetGenericTypographic" sptr
; GdipStringFormatGetGenericTypographic varptr(format) ; 戻り値は stat
; format : GpStringFormat** in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "gdiplus.dll" #cfunc global GdipStringFormatGetGenericTypographic "GdipStringFormatGetGenericTypographic" var ; res = GdipStringFormatGetGenericTypographic(format) ; format : GpStringFormat** in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "gdiplus.dll" #cfunc global GdipStringFormatGetGenericTypographic "GdipStringFormatGetGenericTypographic" sptr ; res = GdipStringFormatGetGenericTypographic(varptr(format)) ; format : GpStringFormat** in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; Status GdipStringFormatGetGenericTypographic(GpStringFormat** format) #uselib "gdiplus.dll" #cfunc global GdipStringFormatGetGenericTypographic "GdipStringFormatGetGenericTypographic" var ; res = GdipStringFormatGetGenericTypographic(format) ; format : GpStringFormat** in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; Status GdipStringFormatGetGenericTypographic(GpStringFormat** format) #uselib "gdiplus.dll" #cfunc global GdipStringFormatGetGenericTypographic "GdipStringFormatGetGenericTypographic" intptr ; res = GdipStringFormatGetGenericTypographic(varptr(format)) ; format : GpStringFormat** in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
gdiplus = windows.NewLazySystemDLL("gdiplus.dll")
procGdipStringFormatGetGenericTypographic = gdiplus.NewProc("GdipStringFormatGetGenericTypographic")
)
// format (GpStringFormat** in/out)
r1, _, err := procGdipStringFormatGetGenericTypographic.Call(
uintptr(format),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // Statusfunction GdipStringFormatGetGenericTypographic(
format: Pointer // GpStringFormat** in/out
): Integer; stdcall;
external 'gdiplus.dll' name 'GdipStringFormatGetGenericTypographic';result := DllCall("gdiplus\GdipStringFormatGetGenericTypographic"
, "Ptr", format ; GpStringFormat** in/out
, "Int") ; return: Status●GdipStringFormatGetGenericTypographic(format) = DLL("gdiplus.dll", "int GdipStringFormatGetGenericTypographic(void*)")
# 呼び出し: GdipStringFormatGetGenericTypographic(format)
# format : GpStringFormat** in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。