ホーム › UI.Input.Ime › ImmConfigureIMEW
ImmConfigureIMEW
関数IMEの構成ダイアログを表示する(Unicode版)。
シグネチャ
// IMM32.dll (Unicode / -W)
#include <windows.h>
BOOL ImmConfigureIMEW(
HKL param0,
HWND param1,
DWORD param2,
void* param3
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| param0 | HKL | in |
| param1 | HWND | in |
| param2 | DWORD | in |
| param3 | void* | inout |
戻り値の型: BOOL
各言語での呼び出し定義
// IMM32.dll (Unicode / -W)
#include <windows.h>
BOOL ImmConfigureIMEW(
HKL param0,
HWND param1,
DWORD param2,
void* param3
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("IMM32.dll", CharSet = CharSet.Unicode, ExactSpelling = true)]
static extern bool ImmConfigureIMEW(
IntPtr param0, // HKL
IntPtr param1, // HWND
uint param2, // DWORD
IntPtr param3 // void* in/out
);<DllImport("IMM32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=True)>
Public Shared Function ImmConfigureIMEW(
param0 As IntPtr, ' HKL
param1 As IntPtr, ' HWND
param2 As UInteger, ' DWORD
param3 As IntPtr ' void* in/out
) As Boolean
End Function' param0 : HKL
' param1 : HWND
' param2 : DWORD
' param3 : void* in/out
Declare PtrSafe Function ImmConfigureIMEW Lib "imm32" ( _
ByVal param0 As LongPtr, _
ByVal param1 As LongPtr, _
ByVal param2 As Long, _
ByVal param3 As LongPtr) As Long
' Unicode(W): 文字列は ByVal As LongPtr とし StrPtr(unicodeStr) を渡す
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ImmConfigureIMEW = ctypes.windll.imm32.ImmConfigureIMEW
ImmConfigureIMEW.restype = wintypes.BOOL
ImmConfigureIMEW.argtypes = [
wintypes.HANDLE, # param0 : HKL
wintypes.HANDLE, # param1 : HWND
wintypes.DWORD, # param2 : DWORD
ctypes.POINTER(None), # param3 : void* in/out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('IMM32.dll')
ImmConfigureIMEW = Fiddle::Function.new(
lib['ImmConfigureIMEW'],
[
Fiddle::TYPE_VOIDP, # param0 : HKL
Fiddle::TYPE_VOIDP, # param1 : HWND
-Fiddle::TYPE_INT, # param2 : DWORD
Fiddle::TYPE_VOIDP, # param3 : void* in/out
],
Fiddle::TYPE_INT)
# Wide strings: pass str.encode("UTF-16LE") + "\x00\x00"#[link(name = "imm32")]
extern "system" {
fn ImmConfigureIMEW(
param0: *mut core::ffi::c_void, // HKL
param1: *mut core::ffi::c_void, // HWND
param2: u32, // DWORD
param3: *mut () // void* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("IMM32.dll", CharSet = CharSet.Unicode)]
public static extern bool ImmConfigureIMEW(IntPtr param0, IntPtr param1, uint param2, IntPtr param3);
"@
$api = Add-Type -MemberDefinition $sig -Name 'IMM32_ImmConfigureIMEW' -Namespace Win32 -PassThru
# $api::ImmConfigureIMEW(param0, param1, param2, param3)#uselib "IMM32.dll"
#func global ImmConfigureIMEW "ImmConfigureIMEW" wptr, wptr, wptr, wptr
; ImmConfigureIMEW param0, param1, param2, param3 ; 戻り値は stat
; param0 : HKL -> "wptr"
; param1 : HWND -> "wptr"
; param2 : DWORD -> "wptr"
; param3 : void* in/out -> "wptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "IMM32.dll"
#cfunc global ImmConfigureIMEW "ImmConfigureIMEW" sptr, sptr, int, sptr
; res = ImmConfigureIMEW(param0, param1, param2, param3)
; param0 : HKL -> "sptr"
; param1 : HWND -> "sptr"
; param2 : DWORD -> "int"
; param3 : void* in/out -> "sptr"; BOOL ImmConfigureIMEW(HKL param0, HWND param1, DWORD param2, void* param3)
#uselib "IMM32.dll"
#cfunc global ImmConfigureIMEW "ImmConfigureIMEW" intptr, intptr, int, intptr
; res = ImmConfigureIMEW(param0, param1, param2, param3)
; param0 : HKL -> "intptr"
; param1 : HWND -> "intptr"
; param2 : DWORD -> "int"
; param3 : void* in/out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
imm32 = windows.NewLazySystemDLL("IMM32.dll")
procImmConfigureIMEW = imm32.NewProc("ImmConfigureIMEW")
)
// param0 (HKL), param1 (HWND), param2 (DWORD), param3 (void* in/out)
r1, _, err := procImmConfigureIMEW.Call(
uintptr(param0),
uintptr(param1),
uintptr(param2),
uintptr(param3),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction ImmConfigureIMEW(
param0: THandle; // HKL
param1: THandle; // HWND
param2: DWORD; // DWORD
param3: Pointer // void* in/out
): BOOL; stdcall;
external 'IMM32.dll' name 'ImmConfigureIMEW';result := DllCall("IMM32\ImmConfigureIMEW"
, "Ptr", param0 ; HKL
, "Ptr", param1 ; HWND
, "UInt", param2 ; DWORD
, "Ptr", param3 ; void* in/out
, "Int") ; return: BOOL●ImmConfigureIMEW(param0, param1, param2, param3) = DLL("IMM32.dll", "bool ImmConfigureIMEW(void*, void*, dword, void*)")
# 呼び出し: ImmConfigureIMEW(param0, param1, param2, param3)
# param0 : HKL -> "void*"
# param1 : HWND -> "void*"
# param2 : DWORD -> "dword"
# param3 : void* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
# ※-W(Unicode)関数。なでしこ1はANSIのため -A 版の利用を推奨。