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