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