ホーム › UI.Controls › DPA_GetSize
DPA_GetSize
関数動的ポインタ配列が使用するメモリサイズを取得する。
シグネチャ
// COMCTL32.dll
#include <windows.h>
ULONGLONG DPA_GetSize(
HDPA hdpa // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hdpa | HDPA | inoptional |
戻り値の型: ULONGLONG
各言語での呼び出し定義
// COMCTL32.dll
#include <windows.h>
ULONGLONG DPA_GetSize(
HDPA hdpa // optional
);[DllImport("COMCTL32.dll", ExactSpelling = true)]
static extern ulong DPA_GetSize(
IntPtr hdpa // HDPA optional
);<DllImport("COMCTL32.dll", ExactSpelling:=True)>
Public Shared Function DPA_GetSize(
hdpa As IntPtr ' HDPA optional
) As ULong
End Function' hdpa : HDPA optional
Declare PtrSafe Function DPA_GetSize Lib "comctl32" ( _
ByVal hdpa As LongPtr) As LongLong
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DPA_GetSize = ctypes.windll.comctl32.DPA_GetSize
DPA_GetSize.restype = ctypes.c_ulonglong
DPA_GetSize.argtypes = [
ctypes.c_ssize_t, # hdpa : HDPA optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('COMCTL32.dll')
DPA_GetSize = Fiddle::Function.new(
lib['DPA_GetSize'],
[
Fiddle::TYPE_INTPTR_T, # hdpa : HDPA optional
],
-Fiddle::TYPE_LONG_LONG)#[link(name = "comctl32")]
extern "system" {
fn DPA_GetSize(
hdpa: isize // HDPA optional
) -> u64;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("COMCTL32.dll")]
public static extern ulong DPA_GetSize(IntPtr hdpa);
"@
$api = Add-Type -MemberDefinition $sig -Name 'COMCTL32_DPA_GetSize' -Namespace Win32 -PassThru
# $api::DPA_GetSize(hdpa)#uselib "COMCTL32.dll"
#func global DPA_GetSize "DPA_GetSize" sptr
; DPA_GetSize hdpa ; 戻り値は stat
; hdpa : HDPA optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "COMCTL32.dll"
#cfunc global DPA_GetSize "DPA_GetSize" sptr
; res = DPA_GetSize(hdpa)
; hdpa : HDPA optional -> "sptr"; ULONGLONG DPA_GetSize(HDPA hdpa)
#uselib "COMCTL32.dll"
#cfunc global DPA_GetSize "DPA_GetSize" intptr
; res = DPA_GetSize(hdpa)
; hdpa : HDPA optional -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
comctl32 = windows.NewLazySystemDLL("COMCTL32.dll")
procDPA_GetSize = comctl32.NewProc("DPA_GetSize")
)
// hdpa (HDPA optional)
r1, _, err := procDPA_GetSize.Call(
uintptr(hdpa),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // ULONGLONGfunction DPA_GetSize(
hdpa: NativeInt // HDPA optional
): UInt64; stdcall;
external 'COMCTL32.dll' name 'DPA_GetSize';result := DllCall("COMCTL32\DPA_GetSize"
, "Ptr", hdpa ; HDPA optional
, "Int64") ; return: ULONGLONG●DPA_GetSize(hdpa) = DLL("COMCTL32.dll", "qword DPA_GetSize(int)")
# 呼び出し: DPA_GetSize(hdpa)
# hdpa : HDPA optional -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。