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

MprAdminDeregisterConnectionNotification

関数
接続状態変化通知の登録を解除する。
DLLMPRAPI.dll呼出規約winapi対応OSwindowsserver2000

シグネチャ

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

DWORD MprAdminDeregisterConnectionNotification(
    INT_PTR hMprServer,
    HANDLE hEventNotification
);

パラメーター

名前方向
hMprServerINT_PTRin
hEventNotificationHANDLEin

戻り値の型: DWORD

各言語での呼び出し定義

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

DWORD MprAdminDeregisterConnectionNotification(
    INT_PTR hMprServer,
    HANDLE hEventNotification
);
[DllImport("MPRAPI.dll", ExactSpelling = true)]
static extern uint MprAdminDeregisterConnectionNotification(
    IntPtr hMprServer,   // INT_PTR
    IntPtr hEventNotification   // HANDLE
);
<DllImport("MPRAPI.dll", ExactSpelling:=True)>
Public Shared Function MprAdminDeregisterConnectionNotification(
    hMprServer As IntPtr,   ' INT_PTR
    hEventNotification As IntPtr   ' HANDLE
) As UInteger
End Function
' hMprServer : INT_PTR
' hEventNotification : HANDLE
Declare PtrSafe Function MprAdminDeregisterConnectionNotification Lib "mprapi" ( _
    ByVal hMprServer As LongPtr, _
    ByVal hEventNotification As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

MprAdminDeregisterConnectionNotification = ctypes.windll.mprapi.MprAdminDeregisterConnectionNotification
MprAdminDeregisterConnectionNotification.restype = wintypes.DWORD
MprAdminDeregisterConnectionNotification.argtypes = [
    ctypes.c_ssize_t,  # hMprServer : INT_PTR
    wintypes.HANDLE,  # hEventNotification : HANDLE
]
require 'fiddle'
require 'fiddle/import'

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

var (
	mprapi = windows.NewLazySystemDLL("MPRAPI.dll")
	procMprAdminDeregisterConnectionNotification = mprapi.NewProc("MprAdminDeregisterConnectionNotification")
)

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