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

RtmMarkDestForChangeNotification

関数
指定した宛先を変更通知の対象としてマーク設定する。
DLLrtm.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

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

DWORD RtmMarkDestForChangeNotification(
    INT_PTR RtmRegHandle,
    INT_PTR NotifyHandle,
    INT_PTR DestHandle,
    BOOL MarkDest
);

パラメーター

名前方向
RtmRegHandleINT_PTRin
NotifyHandleINT_PTRin
DestHandleINT_PTRin
MarkDestBOOLin

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD RtmMarkDestForChangeNotification(
    INT_PTR RtmRegHandle,
    INT_PTR NotifyHandle,
    INT_PTR DestHandle,
    BOOL MarkDest
);
[DllImport("rtm.dll", ExactSpelling = true)]
static extern uint RtmMarkDestForChangeNotification(
    IntPtr RtmRegHandle,   // INT_PTR
    IntPtr NotifyHandle,   // INT_PTR
    IntPtr DestHandle,   // INT_PTR
    bool MarkDest   // BOOL
);
<DllImport("rtm.dll", ExactSpelling:=True)>
Public Shared Function RtmMarkDestForChangeNotification(
    RtmRegHandle As IntPtr,   ' INT_PTR
    NotifyHandle As IntPtr,   ' INT_PTR
    DestHandle As IntPtr,   ' INT_PTR
    MarkDest As Boolean   ' BOOL
) As UInteger
End Function
' RtmRegHandle : INT_PTR
' NotifyHandle : INT_PTR
' DestHandle : INT_PTR
' MarkDest : BOOL
Declare PtrSafe Function RtmMarkDestForChangeNotification Lib "rtm" ( _
    ByVal RtmRegHandle As LongPtr, _
    ByVal NotifyHandle As LongPtr, _
    ByVal DestHandle As LongPtr, _
    ByVal MarkDest As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RtmMarkDestForChangeNotification = ctypes.windll.rtm.RtmMarkDestForChangeNotification
RtmMarkDestForChangeNotification.restype = wintypes.DWORD
RtmMarkDestForChangeNotification.argtypes = [
    ctypes.c_ssize_t,  # RtmRegHandle : INT_PTR
    ctypes.c_ssize_t,  # NotifyHandle : INT_PTR
    ctypes.c_ssize_t,  # DestHandle : INT_PTR
    wintypes.BOOL,  # MarkDest : BOOL
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('rtm.dll')
RtmMarkDestForChangeNotification = Fiddle::Function.new(
  lib['RtmMarkDestForChangeNotification'],
  [
    Fiddle::TYPE_INTPTR_T,  # RtmRegHandle : INT_PTR
    Fiddle::TYPE_INTPTR_T,  # NotifyHandle : INT_PTR
    Fiddle::TYPE_INTPTR_T,  # DestHandle : INT_PTR
    Fiddle::TYPE_INT,  # MarkDest : BOOL
  ],
  -Fiddle::TYPE_INT)
#[link(name = "rtm")]
extern "system" {
    fn RtmMarkDestForChangeNotification(
        RtmRegHandle: isize,  // INT_PTR
        NotifyHandle: isize,  // INT_PTR
        DestHandle: isize,  // INT_PTR
        MarkDest: i32  // BOOL
    ) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("rtm.dll")]
public static extern uint RtmMarkDestForChangeNotification(IntPtr RtmRegHandle, IntPtr NotifyHandle, IntPtr DestHandle, bool MarkDest);
"@
$api = Add-Type -MemberDefinition $sig -Name 'rtm_RtmMarkDestForChangeNotification' -Namespace Win32 -PassThru
# $api::RtmMarkDestForChangeNotification(RtmRegHandle, NotifyHandle, DestHandle, MarkDest)
#uselib "rtm.dll"
#func global RtmMarkDestForChangeNotification "RtmMarkDestForChangeNotification" sptr, sptr, sptr, sptr
; RtmMarkDestForChangeNotification RtmRegHandle, NotifyHandle, DestHandle, MarkDest   ; 戻り値は stat
; RtmRegHandle : INT_PTR -> "sptr"
; NotifyHandle : INT_PTR -> "sptr"
; DestHandle : INT_PTR -> "sptr"
; MarkDest : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "rtm.dll"
#cfunc global RtmMarkDestForChangeNotification "RtmMarkDestForChangeNotification" sptr, sptr, sptr, int
; res = RtmMarkDestForChangeNotification(RtmRegHandle, NotifyHandle, DestHandle, MarkDest)
; RtmRegHandle : INT_PTR -> "sptr"
; NotifyHandle : INT_PTR -> "sptr"
; DestHandle : INT_PTR -> "sptr"
; MarkDest : BOOL -> "int"
; DWORD RtmMarkDestForChangeNotification(INT_PTR RtmRegHandle, INT_PTR NotifyHandle, INT_PTR DestHandle, BOOL MarkDest)
#uselib "rtm.dll"
#cfunc global RtmMarkDestForChangeNotification "RtmMarkDestForChangeNotification" intptr, intptr, intptr, int
; res = RtmMarkDestForChangeNotification(RtmRegHandle, NotifyHandle, DestHandle, MarkDest)
; RtmRegHandle : INT_PTR -> "intptr"
; NotifyHandle : INT_PTR -> "intptr"
; DestHandle : INT_PTR -> "intptr"
; MarkDest : BOOL -> "int"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	rtm = windows.NewLazySystemDLL("rtm.dll")
	procRtmMarkDestForChangeNotification = rtm.NewProc("RtmMarkDestForChangeNotification")
)

// RtmRegHandle (INT_PTR), NotifyHandle (INT_PTR), DestHandle (INT_PTR), MarkDest (BOOL)
r1, _, err := procRtmMarkDestForChangeNotification.Call(
	uintptr(RtmRegHandle),
	uintptr(NotifyHandle),
	uintptr(DestHandle),
	uintptr(MarkDest),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // DWORD
function RtmMarkDestForChangeNotification(
  RtmRegHandle: NativeInt;   // INT_PTR
  NotifyHandle: NativeInt;   // INT_PTR
  DestHandle: NativeInt;   // INT_PTR
  MarkDest: BOOL   // BOOL
): DWORD; stdcall;
  external 'rtm.dll' name 'RtmMarkDestForChangeNotification';
result := DllCall("rtm\RtmMarkDestForChangeNotification"
    , "Ptr", RtmRegHandle   ; INT_PTR
    , "Ptr", NotifyHandle   ; INT_PTR
    , "Ptr", DestHandle   ; INT_PTR
    , "Int", MarkDest   ; BOOL
    , "UInt")   ; return: DWORD
●RtmMarkDestForChangeNotification(RtmRegHandle, NotifyHandle, DestHandle, MarkDest) = DLL("rtm.dll", "dword RtmMarkDestForChangeNotification(int, int, int, bool)")
# 呼び出し: RtmMarkDestForChangeNotification(RtmRegHandle, NotifyHandle, DestHandle, MarkDest)
# RtmRegHandle : INT_PTR -> "int"
# NotifyHandle : INT_PTR -> "int"
# DestHandle : INT_PTR -> "int"
# MarkDest : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。