ホーム › UI.TextServices › InitLocalMsCtfMonitor
InitLocalMsCtfMonitor
関数ローカルのMsCtfMonitorを初期化する。
シグネチャ
// MsCtfMonitor.dll
#include <windows.h>
HRESULT InitLocalMsCtfMonitor(
DWORD dwFlags
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| dwFlags | DWORD | in |
戻り値の型: HRESULT
各言語での呼び出し定義
// MsCtfMonitor.dll
#include <windows.h>
HRESULT InitLocalMsCtfMonitor(
DWORD dwFlags
);[DllImport("MsCtfMonitor.dll", ExactSpelling = true)]
static extern int InitLocalMsCtfMonitor(
uint dwFlags // DWORD
);<DllImport("MsCtfMonitor.dll", ExactSpelling:=True)>
Public Shared Function InitLocalMsCtfMonitor(
dwFlags As UInteger ' DWORD
) As Integer
End Function' dwFlags : DWORD
Declare PtrSafe Function InitLocalMsCtfMonitor Lib "msctfmonitor" ( _
ByVal dwFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
InitLocalMsCtfMonitor = ctypes.windll.msctfmonitor.InitLocalMsCtfMonitor
InitLocalMsCtfMonitor.restype = ctypes.c_int
InitLocalMsCtfMonitor.argtypes = [
wintypes.DWORD, # dwFlags : DWORD
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MsCtfMonitor.dll')
InitLocalMsCtfMonitor = Fiddle::Function.new(
lib['InitLocalMsCtfMonitor'],
[
-Fiddle::TYPE_INT, # dwFlags : DWORD
],
Fiddle::TYPE_INT)#[link(name = "msctfmonitor")]
extern "system" {
fn InitLocalMsCtfMonitor(
dwFlags: u32 // DWORD
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MsCtfMonitor.dll")]
public static extern int InitLocalMsCtfMonitor(uint dwFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MsCtfMonitor_InitLocalMsCtfMonitor' -Namespace Win32 -PassThru
# $api::InitLocalMsCtfMonitor(dwFlags)#uselib "MsCtfMonitor.dll"
#func global InitLocalMsCtfMonitor "InitLocalMsCtfMonitor" sptr
; InitLocalMsCtfMonitor dwFlags ; 戻り値は stat
; dwFlags : DWORD -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MsCtfMonitor.dll"
#cfunc global InitLocalMsCtfMonitor "InitLocalMsCtfMonitor" int
; res = InitLocalMsCtfMonitor(dwFlags)
; dwFlags : DWORD -> "int"; HRESULT InitLocalMsCtfMonitor(DWORD dwFlags)
#uselib "MsCtfMonitor.dll"
#cfunc global InitLocalMsCtfMonitor "InitLocalMsCtfMonitor" int
; res = InitLocalMsCtfMonitor(dwFlags)
; dwFlags : DWORD -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
msctfmonitor = windows.NewLazySystemDLL("MsCtfMonitor.dll")
procInitLocalMsCtfMonitor = msctfmonitor.NewProc("InitLocalMsCtfMonitor")
)
// dwFlags (DWORD)
r1, _, err := procInitLocalMsCtfMonitor.Call(
uintptr(dwFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction InitLocalMsCtfMonitor(
dwFlags: DWORD // DWORD
): Integer; stdcall;
external 'MsCtfMonitor.dll' name 'InitLocalMsCtfMonitor';result := DllCall("MsCtfMonitor\InitLocalMsCtfMonitor"
, "UInt", dwFlags ; DWORD
, "Int") ; return: HRESULT●InitLocalMsCtfMonitor(dwFlags) = DLL("MsCtfMonitor.dll", "int InitLocalMsCtfMonitor(dword)")
# 呼び出し: InitLocalMsCtfMonitor(dwFlags)
# dwFlags : DWORD -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。