Win32 API 日本語リファレンス
ホームNetworkManagement.Rras › RtmUpdateAndUnlockRoute

RtmUpdateAndUnlockRoute

関数
ロック中のルートを更新しロックを解除する。
DLLrtm.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

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

DWORD RtmUpdateAndUnlockRoute(
    INT_PTR RtmRegHandle,
    INT_PTR RouteHandle,
    DWORD TimeToLive,
    INT_PTR RouteListHandle,
    DWORD NotifyType,
    INT_PTR NotifyHandle,
    DWORD* ChangeFlags
);

パラメーター

名前方向説明
RtmRegHandleINT_PTRinRtmRegisterEntityで取得したRTM登録ハンドル。
RouteHandleINT_PTRin更新してロック解除する対象ルートのハンドル。
TimeToLiveDWORDinルートの新しい有効期間(秒単位)。無期限はINFINITEを指定する。
RouteListHandleINT_PTRinルートを関連付けるルートリストのハンドル。不要なら0を指定する。
NotifyTypeDWORDin変更通知の種類を示す値。
NotifyHandleINT_PTRin変更通知に関連付けるハンドル。
ChangeFlagsDWORD*inout更新によって生じた変更内容を示すフラグを受け取るポインタ。

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD RtmUpdateAndUnlockRoute(
    INT_PTR RtmRegHandle,
    INT_PTR RouteHandle,
    DWORD TimeToLive,
    INT_PTR RouteListHandle,
    DWORD NotifyType,
    INT_PTR NotifyHandle,
    DWORD* ChangeFlags
);
[DllImport("rtm.dll", ExactSpelling = true)]
static extern uint RtmUpdateAndUnlockRoute(
    IntPtr RtmRegHandle,   // INT_PTR
    IntPtr RouteHandle,   // INT_PTR
    uint TimeToLive,   // DWORD
    IntPtr RouteListHandle,   // INT_PTR
    uint NotifyType,   // DWORD
    IntPtr NotifyHandle,   // INT_PTR
    ref uint ChangeFlags   // DWORD* in/out
);
<DllImport("rtm.dll", ExactSpelling:=True)>
Public Shared Function RtmUpdateAndUnlockRoute(
    RtmRegHandle As IntPtr,   ' INT_PTR
    RouteHandle As IntPtr,   ' INT_PTR
    TimeToLive As UInteger,   ' DWORD
    RouteListHandle As IntPtr,   ' INT_PTR
    NotifyType As UInteger,   ' DWORD
    NotifyHandle As IntPtr,   ' INT_PTR
    ByRef ChangeFlags As UInteger   ' DWORD* in/out
) As UInteger
End Function
' RtmRegHandle : INT_PTR
' RouteHandle : INT_PTR
' TimeToLive : DWORD
' RouteListHandle : INT_PTR
' NotifyType : DWORD
' NotifyHandle : INT_PTR
' ChangeFlags : DWORD* in/out
Declare PtrSafe Function RtmUpdateAndUnlockRoute Lib "rtm" ( _
    ByVal RtmRegHandle As LongPtr, _
    ByVal RouteHandle As LongPtr, _
    ByVal TimeToLive As Long, _
    ByVal RouteListHandle As LongPtr, _
    ByVal NotifyType As Long, _
    ByVal NotifyHandle As LongPtr, _
    ByRef ChangeFlags As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RtmUpdateAndUnlockRoute = ctypes.windll.rtm.RtmUpdateAndUnlockRoute
RtmUpdateAndUnlockRoute.restype = wintypes.DWORD
RtmUpdateAndUnlockRoute.argtypes = [
    ctypes.c_ssize_t,  # RtmRegHandle : INT_PTR
    ctypes.c_ssize_t,  # RouteHandle : INT_PTR
    wintypes.DWORD,  # TimeToLive : DWORD
    ctypes.c_ssize_t,  # RouteListHandle : INT_PTR
    wintypes.DWORD,  # NotifyType : DWORD
    ctypes.c_ssize_t,  # NotifyHandle : INT_PTR
    ctypes.POINTER(wintypes.DWORD),  # ChangeFlags : DWORD* in/out
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('rtm.dll')
RtmUpdateAndUnlockRoute = Fiddle::Function.new(
  lib['RtmUpdateAndUnlockRoute'],
  [
    Fiddle::TYPE_INTPTR_T,  # RtmRegHandle : INT_PTR
    Fiddle::TYPE_INTPTR_T,  # RouteHandle : INT_PTR
    -Fiddle::TYPE_INT,  # TimeToLive : DWORD
    Fiddle::TYPE_INTPTR_T,  # RouteListHandle : INT_PTR
    -Fiddle::TYPE_INT,  # NotifyType : DWORD
    Fiddle::TYPE_INTPTR_T,  # NotifyHandle : INT_PTR
    Fiddle::TYPE_VOIDP,  # ChangeFlags : DWORD* in/out
  ],
  -Fiddle::TYPE_INT)
#[link(name = "rtm")]
extern "system" {
    fn RtmUpdateAndUnlockRoute(
        RtmRegHandle: isize,  // INT_PTR
        RouteHandle: isize,  // INT_PTR
        TimeToLive: u32,  // DWORD
        RouteListHandle: isize,  // INT_PTR
        NotifyType: u32,  // DWORD
        NotifyHandle: isize,  // INT_PTR
        ChangeFlags: *mut u32  // DWORD* in/out
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("rtm.dll")]
public static extern uint RtmUpdateAndUnlockRoute(IntPtr RtmRegHandle, IntPtr RouteHandle, uint TimeToLive, IntPtr RouteListHandle, uint NotifyType, IntPtr NotifyHandle, ref uint ChangeFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'rtm_RtmUpdateAndUnlockRoute' -Namespace Win32 -PassThru
# $api::RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
#uselib "rtm.dll"
#func global RtmUpdateAndUnlockRoute "RtmUpdateAndUnlockRoute" sptr, sptr, sptr, sptr, sptr, sptr, sptr
; RtmUpdateAndUnlockRoute RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, varptr(ChangeFlags)   ; 戻り値は stat
; RtmRegHandle : INT_PTR -> "sptr"
; RouteHandle : INT_PTR -> "sptr"
; TimeToLive : DWORD -> "sptr"
; RouteListHandle : INT_PTR -> "sptr"
; NotifyType : DWORD -> "sptr"
; NotifyHandle : INT_PTR -> "sptr"
; ChangeFlags : DWORD* in/out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
出力引数:
#uselib "rtm.dll"
#cfunc global RtmUpdateAndUnlockRoute "RtmUpdateAndUnlockRoute" sptr, sptr, int, sptr, int, sptr, var
; res = RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
; RtmRegHandle : INT_PTR -> "sptr"
; RouteHandle : INT_PTR -> "sptr"
; TimeToLive : DWORD -> "int"
; RouteListHandle : INT_PTR -> "sptr"
; NotifyType : DWORD -> "int"
; NotifyHandle : INT_PTR -> "sptr"
; ChangeFlags : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
出力引数:
; DWORD RtmUpdateAndUnlockRoute(INT_PTR RtmRegHandle, INT_PTR RouteHandle, DWORD TimeToLive, INT_PTR RouteListHandle, DWORD NotifyType, INT_PTR NotifyHandle, DWORD* ChangeFlags)
#uselib "rtm.dll"
#cfunc global RtmUpdateAndUnlockRoute "RtmUpdateAndUnlockRoute" intptr, intptr, int, intptr, int, intptr, var
; res = RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
; RtmRegHandle : INT_PTR -> "intptr"
; RouteHandle : INT_PTR -> "intptr"
; TimeToLive : DWORD -> "int"
; RouteListHandle : INT_PTR -> "intptr"
; NotifyType : DWORD -> "int"
; NotifyHandle : INT_PTR -> "intptr"
; ChangeFlags : DWORD* in/out -> "var"
; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rtm = windows.NewLazySystemDLL("rtm.dll")
	procRtmUpdateAndUnlockRoute = rtm.NewProc("RtmUpdateAndUnlockRoute")
)

// RtmRegHandle (INT_PTR), RouteHandle (INT_PTR), TimeToLive (DWORD), RouteListHandle (INT_PTR), NotifyType (DWORD), NotifyHandle (INT_PTR), ChangeFlags (DWORD* in/out)
r1, _, err := procRtmUpdateAndUnlockRoute.Call(
	uintptr(RtmRegHandle),
	uintptr(RouteHandle),
	uintptr(TimeToLive),
	uintptr(RouteListHandle),
	uintptr(NotifyType),
	uintptr(NotifyHandle),
	uintptr(ChangeFlags),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function RtmUpdateAndUnlockRoute(
  RtmRegHandle: NativeInt;   // INT_PTR
  RouteHandle: NativeInt;   // INT_PTR
  TimeToLive: DWORD;   // DWORD
  RouteListHandle: NativeInt;   // INT_PTR
  NotifyType: DWORD;   // DWORD
  NotifyHandle: NativeInt;   // INT_PTR
  ChangeFlags: Pointer   // DWORD* in/out
): DWORD; stdcall;
  external 'rtm.dll' name 'RtmUpdateAndUnlockRoute';
result := DllCall("rtm\RtmUpdateAndUnlockRoute"
    , "Ptr", RtmRegHandle   ; INT_PTR
    , "Ptr", RouteHandle   ; INT_PTR
    , "UInt", TimeToLive   ; DWORD
    , "Ptr", RouteListHandle   ; INT_PTR
    , "UInt", NotifyType   ; DWORD
    , "Ptr", NotifyHandle   ; INT_PTR
    , "Ptr", ChangeFlags   ; DWORD* in/out
    , "UInt")   ; return: DWORD
●RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags) = DLL("rtm.dll", "dword RtmUpdateAndUnlockRoute(int, int, dword, int, dword, int, void*)")
# 呼び出し: RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
# RtmRegHandle : INT_PTR -> "int"
# RouteHandle : INT_PTR -> "int"
# TimeToLive : DWORD -> "dword"
# RouteListHandle : INT_PTR -> "int"
# NotifyType : DWORD -> "dword"
# NotifyHandle : INT_PTR -> "int"
# ChangeFlags : DWORD* in/out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。
const std = @import("std");

extern "rtm" fn RtmUpdateAndUnlockRoute(
    RtmRegHandle: isize, // INT_PTR
    RouteHandle: isize, // INT_PTR
    TimeToLive: u32, // DWORD
    RouteListHandle: isize, // INT_PTR
    NotifyType: u32, // DWORD
    NotifyHandle: isize, // INT_PTR
    ChangeFlags: [*c]u32 // DWORD* in/out
) callconv(std.os.windows.WINAPI) u32;
proc RtmUpdateAndUnlockRoute(
    RtmRegHandle: int,  # INT_PTR
    RouteHandle: int,  # INT_PTR
    TimeToLive: uint32,  # DWORD
    RouteListHandle: int,  # INT_PTR
    NotifyType: uint32,  # DWORD
    NotifyHandle: int,  # INT_PTR
    ChangeFlags: ptr uint32  # DWORD* in/out
): uint32 {.importc: "RtmUpdateAndUnlockRoute", stdcall, dynlib: "rtm.dll".}
pragma(lib, "rtm");
extern(Windows)
uint RtmUpdateAndUnlockRoute(
    ptrdiff_t RtmRegHandle,   // INT_PTR
    ptrdiff_t RouteHandle,   // INT_PTR
    uint TimeToLive,   // DWORD
    ptrdiff_t RouteListHandle,   // INT_PTR
    uint NotifyType,   // DWORD
    ptrdiff_t NotifyHandle,   // INT_PTR
    uint* ChangeFlags   // DWORD* in/out
);
ccall((:RtmUpdateAndUnlockRoute, "rtm.dll"), stdcall, UInt32,
      (Int, Int, UInt32, Int, UInt32, Int, Ptr{UInt32}),
      RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
# RtmRegHandle : INT_PTR -> Int
# RouteHandle : INT_PTR -> Int
# TimeToLive : DWORD -> UInt32
# RouteListHandle : INT_PTR -> Int
# NotifyType : DWORD -> UInt32
# NotifyHandle : INT_PTR -> Int
# ChangeFlags : DWORD* in/out -> Ptr{UInt32}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
uint32_t RtmUpdateAndUnlockRoute(
    intptr_t RtmRegHandle,
    intptr_t RouteHandle,
    uint32_t TimeToLive,
    intptr_t RouteListHandle,
    uint32_t NotifyType,
    intptr_t NotifyHandle,
    uint32_t* ChangeFlags);
]]
local rtm = ffi.load("rtm")
-- rtm.RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
-- RtmRegHandle : INT_PTR
-- RouteHandle : INT_PTR
-- TimeToLive : DWORD
-- RouteListHandle : INT_PTR
-- NotifyType : DWORD
-- NotifyHandle : INT_PTR
-- ChangeFlags : DWORD* in/out
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('rtm.dll');
const RtmUpdateAndUnlockRoute = lib.func('__stdcall', 'RtmUpdateAndUnlockRoute', 'uint32_t', ['intptr_t', 'intptr_t', 'uint32_t', 'intptr_t', 'uint32_t', 'intptr_t', 'uint32_t *']);
// RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
// RtmRegHandle : INT_PTR -> 'intptr_t'
// RouteHandle : INT_PTR -> 'intptr_t'
// TimeToLive : DWORD -> 'uint32_t'
// RouteListHandle : INT_PTR -> 'intptr_t'
// NotifyType : DWORD -> 'uint32_t'
// NotifyHandle : INT_PTR -> 'intptr_t'
// ChangeFlags : DWORD* in/out -> 'uint32_t *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("rtm.dll", {
  RtmUpdateAndUnlockRoute: { parameters: ["isize", "isize", "u32", "isize", "u32", "isize", "pointer"], result: "u32" },
});
// lib.symbols.RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags)
// RtmRegHandle : INT_PTR -> "isize"
// RouteHandle : INT_PTR -> "isize"
// TimeToLive : DWORD -> "u32"
// RouteListHandle : INT_PTR -> "isize"
// NotifyType : DWORD -> "u32"
// NotifyHandle : INT_PTR -> "isize"
// ChangeFlags : DWORD* in/out -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
uint32_t RtmUpdateAndUnlockRoute(
    intptr_t RtmRegHandle,
    intptr_t RouteHandle,
    uint32_t TimeToLive,
    intptr_t RouteListHandle,
    uint32_t NotifyType,
    intptr_t NotifyHandle,
    uint32_t* ChangeFlags);
C, "rtm.dll");
// $ffi->RtmUpdateAndUnlockRoute(RtmRegHandle, RouteHandle, TimeToLive, RouteListHandle, NotifyType, NotifyHandle, ChangeFlags);
// RtmRegHandle : INT_PTR
// RouteHandle : INT_PTR
// TimeToLive : DWORD
// RouteListHandle : INT_PTR
// NotifyType : DWORD
// NotifyHandle : INT_PTR
// ChangeFlags : 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 Rtm extends StdCallLibrary {
    Rtm INSTANCE = Native.load("rtm", Rtm.class);
    int RtmUpdateAndUnlockRoute(
        long RtmRegHandle,   // INT_PTR
        long RouteHandle,   // INT_PTR
        int TimeToLive,   // DWORD
        long RouteListHandle,   // INT_PTR
        int NotifyType,   // DWORD
        long NotifyHandle,   // INT_PTR
        IntByReference ChangeFlags   // DWORD* in/out
    );
}
@[Link("rtm")]
lib Librtm
  fun RtmUpdateAndUnlockRoute = RtmUpdateAndUnlockRoute(
    RtmRegHandle : LibC::SSizeT,   # INT_PTR
    RouteHandle : LibC::SSizeT,   # INT_PTR
    TimeToLive : UInt32,   # DWORD
    RouteListHandle : LibC::SSizeT,   # INT_PTR
    NotifyType : UInt32,   # DWORD
    NotifyHandle : LibC::SSizeT,   # INT_PTR
    ChangeFlags : UInt32*   # DWORD* in/out
  ) : UInt32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef RtmUpdateAndUnlockRouteNative = Uint32 Function(IntPtr, IntPtr, Uint32, IntPtr, Uint32, IntPtr, Pointer<Uint32>);
typedef RtmUpdateAndUnlockRouteDart = int Function(int, int, int, int, int, int, Pointer<Uint32>);
final RtmUpdateAndUnlockRoute = DynamicLibrary.open('rtm.dll')
    .lookupFunction<RtmUpdateAndUnlockRouteNative, RtmUpdateAndUnlockRouteDart>('RtmUpdateAndUnlockRoute');
// RtmRegHandle : INT_PTR -> IntPtr
// RouteHandle : INT_PTR -> IntPtr
// TimeToLive : DWORD -> Uint32
// RouteListHandle : INT_PTR -> IntPtr
// NotifyType : DWORD -> Uint32
// NotifyHandle : INT_PTR -> IntPtr
// ChangeFlags : DWORD* in/out -> Pointer<Uint32>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function RtmUpdateAndUnlockRoute(
  RtmRegHandle: NativeInt;   // INT_PTR
  RouteHandle: NativeInt;   // INT_PTR
  TimeToLive: DWORD;   // DWORD
  RouteListHandle: NativeInt;   // INT_PTR
  NotifyType: DWORD;   // DWORD
  NotifyHandle: NativeInt;   // INT_PTR
  ChangeFlags: Pointer   // DWORD* in/out
): DWORD; stdcall;
  external 'rtm.dll' name 'RtmUpdateAndUnlockRoute';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "RtmUpdateAndUnlockRoute"
  c_RtmUpdateAndUnlockRoute :: CIntPtr -> CIntPtr -> Word32 -> CIntPtr -> Word32 -> CIntPtr -> Ptr Word32 -> IO Word32
-- RtmRegHandle : INT_PTR -> CIntPtr
-- RouteHandle : INT_PTR -> CIntPtr
-- TimeToLive : DWORD -> Word32
-- RouteListHandle : INT_PTR -> CIntPtr
-- NotifyType : DWORD -> Word32
-- NotifyHandle : INT_PTR -> CIntPtr
-- ChangeFlags : DWORD* in/out -> Ptr Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let rtmupdateandunlockroute =
  foreign "RtmUpdateAndUnlockRoute"
    (intptr_t @-> intptr_t @-> uint32_t @-> intptr_t @-> uint32_t @-> intptr_t @-> (ptr uint32_t) @-> returning uint32_t)
(* RtmRegHandle : INT_PTR -> intptr_t *)
(* RouteHandle : INT_PTR -> intptr_t *)
(* TimeToLive : DWORD -> uint32_t *)
(* RouteListHandle : INT_PTR -> intptr_t *)
(* NotifyType : DWORD -> uint32_t *)
(* NotifyHandle : INT_PTR -> intptr_t *)
(* ChangeFlags : DWORD* in/out -> (ptr uint32_t) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library rtm (t "rtm.dll"))
(cffi:use-foreign-library rtm)

(cffi:defcfun ("RtmUpdateAndUnlockRoute" rtm-update-and-unlock-route :convention :stdcall) :uint32
  (rtm-reg-handle :int64)   ; INT_PTR
  (route-handle :int64)   ; INT_PTR
  (time-to-live :uint32)   ; DWORD
  (route-list-handle :int64)   ; INT_PTR
  (notify-type :uint32)   ; DWORD
  (notify-handle :int64)   ; INT_PTR
  (change-flags :pointer))   ; DWORD* in/out
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $RtmUpdateAndUnlockRoute = Win32::API::More->new('rtm',
    'DWORD RtmUpdateAndUnlockRoute(LPARAM RtmRegHandle, LPARAM RouteHandle, DWORD TimeToLive, LPARAM RouteListHandle, DWORD NotifyType, LPARAM NotifyHandle, LPVOID ChangeFlags)');
# my $ret = $RtmUpdateAndUnlockRoute->Call($RtmRegHandle, $RouteHandle, $TimeToLive, $RouteListHandle, $NotifyType, $NotifyHandle, $ChangeFlags);
# RtmRegHandle : INT_PTR -> LPARAM
# RouteHandle : INT_PTR -> LPARAM
# TimeToLive : DWORD -> DWORD
# RouteListHandle : INT_PTR -> LPARAM
# NotifyType : DWORD -> DWORD
# NotifyHandle : INT_PTR -> LPARAM
# ChangeFlags : DWORD* in/out -> LPVOID
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。