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

RtmIsMarkedForChangeNotification

関数
指定した宛先が変更通知の対象としてマーク済みか調べる。
DLLrtm.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

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

DWORD RtmIsMarkedForChangeNotification(
    INT_PTR RtmRegHandle,
    INT_PTR NotifyHandle,
    INT_PTR DestHandle,
    BOOL* DestMarked
);

パラメーター

名前方向
RtmRegHandleINT_PTRin
NotifyHandleINT_PTRin
DestHandleINT_PTRin
DestMarkedBOOL*inout

戻り値の型: DWORD

各言語での呼び出し定義

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

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

RtmIsMarkedForChangeNotification = ctypes.windll.rtm.RtmIsMarkedForChangeNotification
RtmIsMarkedForChangeNotification.restype = wintypes.DWORD
RtmIsMarkedForChangeNotification.argtypes = [
    ctypes.c_ssize_t,  # RtmRegHandle : INT_PTR
    ctypes.c_ssize_t,  # NotifyHandle : INT_PTR
    ctypes.c_ssize_t,  # DestHandle : INT_PTR
    ctypes.c_void_p,  # DestMarked : BOOL* in/out
]
require 'fiddle'
require 'fiddle/import'

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

var (
	rtm = windows.NewLazySystemDLL("rtm.dll")
	procRtmIsMarkedForChangeNotification = rtm.NewProc("RtmIsMarkedForChangeNotification")
)

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