Win32 API 日本語リファレンス
ホームSystem.Memory › GetLargePageMinimum

GetLargePageMinimum

関数
ラージページの最小サイズをバイト単位で取得する。
DLLKERNEL32.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

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

UINT_PTR GetLargePageMinimum(void);

パラメーターなし。戻り値: UINT_PTR

各言語での呼び出し定義

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

UINT_PTR GetLargePageMinimum(void);
[DllImport("KERNEL32.dll", ExactSpelling = true)]
static extern UIntPtr GetLargePageMinimum();
<DllImport("KERNEL32.dll", ExactSpelling:=True)>
Public Shared Function GetLargePageMinimum() As UIntPtr
End Function
Declare PtrSafe Function GetLargePageMinimum Lib "kernel32" () As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

GetLargePageMinimum = ctypes.windll.kernel32.GetLargePageMinimum
GetLargePageMinimum.restype = ctypes.c_size_t
GetLargePageMinimum.argtypes = []
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('KERNEL32.dll')
GetLargePageMinimum = Fiddle::Function.new(
  lib['GetLargePageMinimum'],
  [],
  Fiddle::TYPE_UINTPTR_T)
#[link(name = "kernel32")]
extern "system" {
    fn GetLargePageMinimum() -> usize;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("KERNEL32.dll")]
public static extern UIntPtr GetLargePageMinimum();
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_GetLargePageMinimum' -Namespace Win32 -PassThru
# $api::GetLargePageMinimum()
#uselib "KERNEL32.dll"
#func global GetLargePageMinimum "GetLargePageMinimum"
; GetLargePageMinimum   ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "KERNEL32.dll"
#cfunc global GetLargePageMinimum "GetLargePageMinimum"
; res = GetLargePageMinimum()
; UINT_PTR GetLargePageMinimum()
#uselib "KERNEL32.dll"
#cfunc global GetLargePageMinimum "GetLargePageMinimum"
; res = GetLargePageMinimum()
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
	procGetLargePageMinimum = kernel32.NewProc("GetLargePageMinimum")
)

r1, _, err := procGetLargePageMinimum.Call()
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // UINT_PTR
function GetLargePageMinimum: NativeUInt; stdcall;
  external 'KERNEL32.dll' name 'GetLargePageMinimum';
result := DllCall("KERNEL32\GetLargePageMinimum", "UPtr")
●GetLargePageMinimum() = DLL("KERNEL32.dll", "int GetLargePageMinimum()")
# 呼び出し: GetLargePageMinimum()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。