GetLogicalProcessorInformation
関数シグネチャ
// KERNEL32.dll
#include <windows.h>
BOOL GetLogicalProcessorInformation(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION* Buffer, // optional
DWORD* ReturnedLength
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| Buffer | SYSTEM_LOGICAL_PROCESSOR_INFORMATION* | outoptional | SYSTEM_LOGICAL_PROCESSOR_INFORMATION 構造体の配列を受け取るバッファへのポインタです。関数が失敗した場合、このバッファの内容は未定義です。 |
| ReturnedLength | DWORD* | inout | 入力時には、Buffer が指すバッファの長さをバイト単位で指定します。バッファがすべてのデータを格納できる十分な大きさである場合、この関数は成功し、ReturnLength には返されたバイト数が設定されます。バッファがすべてのデータを格納するには十分でない場合、関数は失敗し、GetLastError は ERROR_INSUFFICIENT_BUFFER を返し、ReturnLength にはすべてのデータを格納するのに必要なバッファ長が設定されます。関数が ERROR_INSUFFICIENT_BUFFER 以外のエラーで失敗した場合、ReturnLength の値は未定義です。 |
戻り値の型: BOOL
公式ドキュメント
論理プロセッサおよび関連するハードウェアに関する情報を取得します。
戻り値
関数が成功した場合、戻り値は TRUE であり、少なくとも 1 つの SYSTEM_LOGICAL_PROCESSOR_INFORMATION 構造体が出力バッファに書き込まれます。
関数が失敗した場合、戻り値は FALSE です。拡張エラー情報を取得するには、 GetLastError を呼び出してください。
解説(Remarks)
GetLogicalProcessorInformation は、システム内の論理プロセッサ間の関係に関する情報を取得するために使用できます。これには次のものが含まれます。
- NUMA ノードに属する論理プロセッサ。
- リソースを共有する論理プロセッサ。この種のリソース共有の例としては、ハイパースレッディングのシナリオが挙げられます。
バッファに返される各 SYSTEM_LOGICAL_PROCESSOR_INFORMATION 構造体には、次の情報が含まれます。
- 論理プロセッサのアフィニティマスク。構造体内の情報が適用される論理プロセッサを示します。
- LOGICAL_PROCESSOR_RELATIONSHIP 型の論理プロセッサマスク。マスク内の論理プロセッサ間の関係を示します。この関数を呼び出すアプリケーションは、将来追加される可能性のあるインジケータ値を処理できるようにしておく必要があります。
SYSTEM_LOGICAL_PROCESSOR_INFORMATION 構造体のサイズは、プロセッサアーキテクチャや Windows のバージョンによって異なります。このため、アプリケーションはまずこの関数を呼び出して必要なバッファサイズを取得し、その後でバッファ用のメモリを動的に割り当てる必要があります。
64 個を超える論理プロセッサを搭載したシステムでは、GetLogicalProcessorInformation 関数は、呼び出し元のスレッドが現在割り当てられているプロセッサグループ内のプロセッサに関する論理プロセッサ情報を取得します。システム上のすべてのプロセッサグループ内のプロセッサに関する情報を取得するには、GetLogicalProcessorInformationEx 関数を使用してください。
TBD Release Iron 以降、この関数およびその他の NUMA 関数の動作は、64 個を超えるプロセッサを含むノードを持つシステムをより適切にサポートするよう変更されました。この変更の詳細(この API の以前の動作を有効にする方法を含む)については、NUMA Support を参照してください。
TBD Release Iron 以降の動作
RelationNumaNode の関係構造体には、呼び出し元スレッドのグループ内におけるノードのアフィニティを表すアフィニティマスクが含まれます。
例
次の C++ の例では、GetLogicalProcessorInformation 関数を使用して、現在のシステム上のプロセッサに関する情報を表示します。GetLogicalProcessorInformation はすべてのシステムに存在するわけではないため、この例では GetLogicalProcessorInformation を直接呼び出す代わりに GetProcAddress 関数を使用しています。
この例では、アクティブなプロセッサコアの数を報告します。また、この情報をサポートするシステムでは、NUMA ノード、物理パッケージ、およびキャッシュの数も報告します。詳細については、SYSTEM_LOGICAL_PROCESSOR_INFORMATION 構造体の Relationship メンバーの説明を参照してください。Windows Server 2003、Windows XP Professional x64 Edition、および Windows XP with SP3: これらの環境では、この例はアクティブなプロセッサコアの数ではなく、物理プロセッサの数を報告します。
#include <windows.h>
#include <malloc.h>
#include <stdio.h>
#include <tchar.h>
typedef BOOL (WINAPI *LPFN_GLPI)(
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION,
PDWORD);
// Helper function to count set bits in the processor mask.
DWORD CountSetBits(ULONG_PTR bitMask)
{
DWORD LSHIFT = sizeof(ULONG_PTR)*8 - 1;
DWORD bitSetCount = 0;
ULONG_PTR bitTest = (ULONG_PTR)1 << LSHIFT;
DWORD i;
for (i = 0; i <= LSHIFT; ++i)
{
bitSetCount += ((bitMask & bitTest)?1:0);
bitTest/=2;
}
return bitSetCount;
}
int _cdecl _tmain ()
{
LPFN_GLPI glpi;
BOOL done = FALSE;
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer = NULL;
PSYSTEM_LOGICAL_PROCESSOR_INFORMATION ptr = NULL;
DWORD returnLength = 0;
DWORD logicalProcessorCount = 0;
DWORD numaNodeCount = 0;
DWORD processorCoreCount = 0;
DWORD processorL1CacheCount = 0;
DWORD processorL2CacheCount = 0;
DWORD processorL3CacheCount = 0;
DWORD processorPackageCount = 0;
DWORD byteOffset = 0;
PCACHE_DESCRIPTOR Cache;
glpi = (LPFN_GLPI) GetProcAddress(
GetModuleHandle(TEXT("kernel32")),
"GetLogicalProcessorInformation");
if (NULL == glpi)
{
_tprintf(TEXT("\nGetLogicalProcessorInformation is not supported.\n"));
return (1);
}
while (!done)
{
DWORD rc = glpi(buffer, &returnLength);
if (FALSE == rc)
{
if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
if (buffer)
free(buffer);
buffer = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION)malloc(
returnLength);
if (NULL == buffer)
{
_tprintf(TEXT("\nError: Allocation failure\n"));
return (2);
}
}
else
{
_tprintf(TEXT("\nError %d\n"), GetLastError());
return (3);
}
}
else
{
done = TRUE;
}
}
ptr = buffer;
while (byteOffset + sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) <= returnLength)
{
switch (ptr->Relationship)
{
case RelationNumaNode:
// Non-NUMA systems report a single record of this type.
numaNodeCount++;
break;
case RelationProcessorCore:
processorCoreCount++;
// A hyperthreaded core supplies more than one logical processor.
logicalProcessorCount += CountSetBits(ptr->ProcessorMask);
break;
case RelationCache:
// Cache data is in ptr->Cache, one CACHE_DESCRIPTOR structure for each cache.
Cache = &ptr->Cache;
if (Cache->Level == 1)
{
processorL1CacheCount++;
}
else if (Cache->Level == 2)
{
processorL2CacheCount++;
}
else if (Cache->Level == 3)
{
processorL3CacheCount++;
}
break;
case RelationProcessorPackage:
// Logical processors share a physical package.
processorPackageCount++;
break;
default:
_tprintf(TEXT("\nError: Unsupported LOGICAL_PROCESSOR_RELATIONSHIP value.\n"));
break;
}
byteOffset += sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);
ptr++;
}
_tprintf(TEXT("\nGetLogicalProcessorInformation results:\n"));
_tprintf(TEXT("Number of NUMA nodes: %d\n"),
numaNodeCount);
_tprintf(TEXT("Number of physical processor packages: %d\n"),
processorPackageCount);
_tprintf(TEXT("Number of processor cores: %d\n"),
processorCoreCount);
_tprintf(TEXT("Number of logical processors: %d\n"),
logicalProcessorCount);
_tprintf(TEXT("Number of processor L1/L2/L3 caches: %d/%d/%d\n"),
processorL1CacheCount,
processorL2CacheCount,
processorL3CacheCount);
free(buffer);
return 0;
}
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// KERNEL32.dll
#include <windows.h>
BOOL GetLogicalProcessorInformation(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION* Buffer, // optional
DWORD* ReturnedLength
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool GetLogicalProcessorInformation(
IntPtr Buffer, // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ref uint ReturnedLength // DWORD* in/out
);<DllImport("KERNEL32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function GetLogicalProcessorInformation(
Buffer As IntPtr, ' SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ByRef ReturnedLength As UInteger ' DWORD* in/out
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function' Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
' ReturnedLength : DWORD* in/out
Declare PtrSafe Function GetLogicalProcessorInformation Lib "kernel32" ( _
ByVal Buffer As LongPtr, _
ByRef ReturnedLength As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetLogicalProcessorInformation = ctypes.windll.kernel32.GetLogicalProcessorInformation
GetLogicalProcessorInformation.restype = wintypes.BOOL
GetLogicalProcessorInformation.argtypes = [
ctypes.c_void_p, # Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ctypes.POINTER(wintypes.DWORD), # ReturnedLength : DWORD* in/out
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('KERNEL32.dll')
GetLogicalProcessorInformation = Fiddle::Function.new(
lib['GetLogicalProcessorInformation'],
[
Fiddle::TYPE_VOIDP, # Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
Fiddle::TYPE_VOIDP, # ReturnedLength : DWORD* in/out
],
Fiddle::TYPE_INT)#[link(name = "kernel32")]
extern "system" {
fn GetLogicalProcessorInformation(
Buffer: *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION, // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength: *mut u32 // DWORD* in/out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("KERNEL32.dll", SetLastError = true)]
public static extern bool GetLogicalProcessorInformation(IntPtr Buffer, ref uint ReturnedLength);
"@
$api = Add-Type -MemberDefinition $sig -Name 'KERNEL32_GetLogicalProcessorInformation' -Namespace Win32 -PassThru
# $api::GetLogicalProcessorInformation(Buffer, ReturnedLength)#uselib "KERNEL32.dll"
#func global GetLogicalProcessorInformation "GetLogicalProcessorInformation" sptr, sptr
; GetLogicalProcessorInformation varptr(Buffer), varptr(ReturnedLength) ; 戻り値は stat
; Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "sptr"
; ReturnedLength : DWORD* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "KERNEL32.dll" #cfunc global GetLogicalProcessorInformation "GetLogicalProcessorInformation" var, var ; res = GetLogicalProcessorInformation(Buffer, ReturnedLength) ; Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "var" ; ReturnedLength : DWORD* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "KERNEL32.dll" #cfunc global GetLogicalProcessorInformation "GetLogicalProcessorInformation" sptr, sptr ; res = GetLogicalProcessorInformation(varptr(Buffer), varptr(ReturnedLength)) ; Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "sptr" ; ReturnedLength : DWORD* in/out -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
; BOOL GetLogicalProcessorInformation(SYSTEM_LOGICAL_PROCESSOR_INFORMATION* Buffer, DWORD* ReturnedLength) #uselib "KERNEL32.dll" #cfunc global GetLogicalProcessorInformation "GetLogicalProcessorInformation" var, var ; res = GetLogicalProcessorInformation(Buffer, ReturnedLength) ; Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "var" ; ReturnedLength : DWORD* in/out -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL GetLogicalProcessorInformation(SYSTEM_LOGICAL_PROCESSOR_INFORMATION* Buffer, DWORD* ReturnedLength) #uselib "KERNEL32.dll" #cfunc global GetLogicalProcessorInformation "GetLogicalProcessorInformation" intptr, intptr ; res = GetLogicalProcessorInformation(varptr(Buffer), varptr(ReturnedLength)) ; Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "intptr" ; ReturnedLength : DWORD* in/out -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
kernel32 = windows.NewLazySystemDLL("KERNEL32.dll")
procGetLogicalProcessorInformation = kernel32.NewProc("GetLogicalProcessorInformation")
)
// Buffer (SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out), ReturnedLength (DWORD* in/out)
r1, _, err := procGetLogicalProcessorInformation.Call(
uintptr(Buffer),
uintptr(ReturnedLength),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction GetLogicalProcessorInformation(
Buffer: Pointer; // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength: Pointer // DWORD* in/out
): BOOL; stdcall;
external 'KERNEL32.dll' name 'GetLogicalProcessorInformation';result := DllCall("KERNEL32\GetLogicalProcessorInformation"
, "Ptr", Buffer ; SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
, "Ptr", ReturnedLength ; DWORD* in/out
, "Int") ; return: BOOL●GetLogicalProcessorInformation(Buffer, ReturnedLength) = DLL("KERNEL32.dll", "bool GetLogicalProcessorInformation(void*, void*)")
# 呼び出し: GetLogicalProcessorInformation(Buffer, ReturnedLength)
# Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "void*"
# ReturnedLength : DWORD* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "kernel32" fn GetLogicalProcessorInformation(
Buffer: [*c]SYSTEM_LOGICAL_PROCESSOR_INFORMATION, // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength: [*c]u32 // DWORD* in/out
) callconv(std.os.windows.WINAPI) i32;proc GetLogicalProcessorInformation(
Buffer: ptr SYSTEM_LOGICAL_PROCESSOR_INFORMATION, # SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength: ptr uint32 # DWORD* in/out
): int32 {.importc: "GetLogicalProcessorInformation", stdcall, dynlib: "KERNEL32.dll".}pragma(lib, "kernel32");
extern(Windows)
int GetLogicalProcessorInformation(
SYSTEM_LOGICAL_PROCESSOR_INFORMATION* Buffer, // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
uint* ReturnedLength // DWORD* in/out
);ccall((:GetLogicalProcessorInformation, "KERNEL32.dll"), stdcall, Int32,
(Ptr{SYSTEM_LOGICAL_PROCESSOR_INFORMATION}, Ptr{UInt32}),
Buffer, ReturnedLength)
# Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> Ptr{SYSTEM_LOGICAL_PROCESSOR_INFORMATION}
# ReturnedLength : DWORD* in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t GetLogicalProcessorInformation(
void* Buffer,
uint32_t* ReturnedLength);
]]
local kernel32 = ffi.load("kernel32")
-- kernel32.GetLogicalProcessorInformation(Buffer, ReturnedLength)
-- Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
-- ReturnedLength : DWORD* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('KERNEL32.dll');
const GetLogicalProcessorInformation = lib.func('__stdcall', 'GetLogicalProcessorInformation', 'int32_t', ['void *', 'uint32_t *']);
// GetLogicalProcessorInformation(Buffer, ReturnedLength)
// Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> 'void *'
// ReturnedLength : DWORD* in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("KERNEL32.dll", {
GetLogicalProcessorInformation: { parameters: ["pointer", "pointer"], result: "i32" },
});
// lib.symbols.GetLogicalProcessorInformation(Buffer, ReturnedLength)
// Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> "pointer"
// ReturnedLength : DWORD* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t GetLogicalProcessorInformation(
void* Buffer,
uint32_t* ReturnedLength);
C, "KERNEL32.dll");
// $ffi->GetLogicalProcessorInformation(Buffer, ReturnedLength);
// Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
// ReturnedLength : DWORD* in/out
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Kernel32 extends StdCallLibrary {
Kernel32 INSTANCE = Native.load("kernel32", Kernel32.class);
boolean GetLogicalProcessorInformation(
Pointer Buffer, // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
IntByReference ReturnedLength // DWORD* in/out
);
}@[Link("kernel32")]
lib LibKERNEL32
fun GetLogicalProcessorInformation = GetLogicalProcessorInformation(
Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION*, # SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength : UInt32* # DWORD* in/out
) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef GetLogicalProcessorInformationNative = Int32 Function(Pointer<Void>, Pointer<Uint32>);
typedef GetLogicalProcessorInformationDart = int Function(Pointer<Void>, Pointer<Uint32>);
final GetLogicalProcessorInformation = DynamicLibrary.open('KERNEL32.dll')
.lookupFunction<GetLogicalProcessorInformationNative, GetLogicalProcessorInformationDart>('GetLogicalProcessorInformation');
// Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> Pointer<Void>
// ReturnedLength : DWORD* in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function GetLogicalProcessorInformation(
Buffer: Pointer; // SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
ReturnedLength: Pointer // DWORD* in/out
): BOOL; stdcall;
external 'KERNEL32.dll' name 'GetLogicalProcessorInformation';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "GetLogicalProcessorInformation"
c_GetLogicalProcessorInformation :: Ptr () -> Ptr Word32 -> IO CInt
-- Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> Ptr ()
-- ReturnedLength : DWORD* in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let getlogicalprocessorinformation =
foreign "GetLogicalProcessorInformation"
((ptr void) @-> (ptr uint32_t) @-> returning int32_t)
(* Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> (ptr void) *)
(* ReturnedLength : DWORD* in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library kernel32 (t "KERNEL32.dll"))
(cffi:use-foreign-library kernel32)
(cffi:defcfun ("GetLogicalProcessorInformation" get-logical-processor-information :convention :stdcall) :int32
(buffer :pointer) ; SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out
(returned-length :pointer)) ; DWORD* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $GetLogicalProcessorInformation = Win32::API::More->new('KERNEL32',
'BOOL GetLogicalProcessorInformation(LPVOID Buffer, LPVOID ReturnedLength)');
# my $ret = $GetLogicalProcessorInformation->Call($Buffer, $ReturnedLength);
# Buffer : SYSTEM_LOGICAL_PROCESSOR_INFORMATION* optional, out -> LPVOID
# ReturnedLength : DWORD* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
- f GetLogicalProcessorInformationEx — 指定種別の論理プロセッサ関連情報を拡張形式で取得する。