Win32 API 日本語リファレンス
ホームUI.Magnification › MagShowSystemCursor

MagShowSystemCursor

関数
拡大鏡使用時のシステムカーソルの表示を切り替える。
DLLMAGNIFICATION.dll呼出規約winapi対応OSwindows8.0

シグネチャ

// MAGNIFICATION.dll
#include <windows.h>

BOOL MagShowSystemCursor(
    BOOL fShowCursor
);

パラメーター

名前方向
fShowCursorBOOLin

戻り値の型: BOOL

各言語での呼び出し定義

// MAGNIFICATION.dll
#include <windows.h>

BOOL MagShowSystemCursor(
    BOOL fShowCursor
);
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MAGNIFICATION.dll", ExactSpelling = true)]
static extern bool MagShowSystemCursor(
    bool fShowCursor   // BOOL
);
<DllImport("MAGNIFICATION.dll", ExactSpelling:=True)>
Public Shared Function MagShowSystemCursor(
    fShowCursor As Boolean   ' BOOL
) As Boolean
End Function
' fShowCursor : BOOL
Declare PtrSafe Function MagShowSystemCursor Lib "magnification" ( _
    ByVal fShowCursor As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MagShowSystemCursor = ctypes.windll.magnification.MagShowSystemCursor
MagShowSystemCursor.restype = wintypes.BOOL
MagShowSystemCursor.argtypes = [
    wintypes.BOOL,  # fShowCursor : BOOL
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('MAGNIFICATION.dll')
MagShowSystemCursor = Fiddle::Function.new(
  lib['MagShowSystemCursor'],
  [
    Fiddle::TYPE_INT,  # fShowCursor : BOOL
  ],
  Fiddle::TYPE_INT)
#[link(name = "magnification")]
extern "system" {
    fn MagShowSystemCursor(
        fShowCursor: i32  // BOOL
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("MAGNIFICATION.dll")]
public static extern bool MagShowSystemCursor(bool fShowCursor);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MAGNIFICATION_MagShowSystemCursor' -Namespace Win32 -PassThru
# $api::MagShowSystemCursor(fShowCursor)
#uselib "MAGNIFICATION.dll"
#func global MagShowSystemCursor "MagShowSystemCursor" sptr
; MagShowSystemCursor fShowCursor   ; 戻り値は stat
; fShowCursor : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "MAGNIFICATION.dll"
#cfunc global MagShowSystemCursor "MagShowSystemCursor" int
; res = MagShowSystemCursor(fShowCursor)
; fShowCursor : BOOL -> "int"
; BOOL MagShowSystemCursor(BOOL fShowCursor)
#uselib "MAGNIFICATION.dll"
#cfunc global MagShowSystemCursor "MagShowSystemCursor" int
; res = MagShowSystemCursor(fShowCursor)
; fShowCursor : BOOL -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	magnification = windows.NewLazySystemDLL("MAGNIFICATION.dll")
	procMagShowSystemCursor = magnification.NewProc("MagShowSystemCursor")
)

// fShowCursor (BOOL)
r1, _, err := procMagShowSystemCursor.Call(
	uintptr(fShowCursor),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // BOOL
function MagShowSystemCursor(
  fShowCursor: BOOL   // BOOL
): BOOL; stdcall;
  external 'MAGNIFICATION.dll' name 'MagShowSystemCursor';
result := DllCall("MAGNIFICATION\MagShowSystemCursor"
    , "Int", fShowCursor   ; BOOL
    , "Int")   ; return: BOOL
●MagShowSystemCursor(fShowCursor) = DLL("MAGNIFICATION.dll", "bool MagShowSystemCursor(bool)")
# 呼び出し: MagShowSystemCursor(fShowCursor)
# fShowCursor : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。