Win32 API 日本語リファレンス
ホームGraphics.Printing › RouterUnregisterForPrintAsyncNotifications

RouterUnregisterForPrintAsyncNotifications

関数
ルーター経由の印刷非同期通知登録を解除する。
DLLSPOOLSS.dll呼出規約winapi

シグネチャ

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

HRESULT RouterUnregisterForPrintAsyncNotifications(
    HANDLE hNotify
);

パラメーター

名前方向
hNotifyHANDLEin

戻り値の型: HRESULT

各言語での呼び出し定義

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

HRESULT RouterUnregisterForPrintAsyncNotifications(
    HANDLE hNotify
);
[DllImport("SPOOLSS.dll", ExactSpelling = true)]
static extern int RouterUnregisterForPrintAsyncNotifications(
    IntPtr hNotify   // HANDLE
);
<DllImport("SPOOLSS.dll", ExactSpelling:=True)>
Public Shared Function RouterUnregisterForPrintAsyncNotifications(
    hNotify As IntPtr   ' HANDLE
) As Integer
End Function
' hNotify : HANDLE
Declare PtrSafe Function RouterUnregisterForPrintAsyncNotifications Lib "spoolss" ( _
    ByVal hNotify As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

RouterUnregisterForPrintAsyncNotifications = ctypes.windll.spoolss.RouterUnregisterForPrintAsyncNotifications
RouterUnregisterForPrintAsyncNotifications.restype = ctypes.c_int
RouterUnregisterForPrintAsyncNotifications.argtypes = [
    wintypes.HANDLE,  # hNotify : HANDLE
]
require 'fiddle'
require 'fiddle/import'

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

var (
	spoolss = windows.NewLazySystemDLL("SPOOLSS.dll")
	procRouterUnregisterForPrintAsyncNotifications = spoolss.NewProc("RouterUnregisterForPrintAsyncNotifications")
)

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