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