Win32 API 日本語リファレンス
ホームSystem.Diagnostics.Debug › RangeMapCreate

RangeMapCreate

関数
アドレス範囲マップを作成しハンドルを返す。
DLLdbghelp.dll呼出規約winapi

シグネチャ

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

void* RangeMapCreate(void);

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

各言語での呼び出し定義

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

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

RangeMapCreate = ctypes.windll.dbghelp.RangeMapCreate
RangeMapCreate.restype = ctypes.c_void_p
RangeMapCreate.argtypes = []
require 'fiddle'
require 'fiddle/import'

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

var (
	dbghelp = windows.NewLazySystemDLL("dbghelp.dll")
	procRangeMapCreate = dbghelp.NewProc("RangeMapCreate")
)

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