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

UnRegisterForPrintAsyncNotifications

関数
印刷の非同期通知受信の登録を解除する。
DLLwinspool.drv呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// winspool.drv
#include <windows.h>

HRESULT UnRegisterForPrintAsyncNotifications(
    HANDLE param0
);

パラメーター

名前方向
param0HANDLEin

戻り値の型: HRESULT

各言語での呼び出し定義

// winspool.drv
#include <windows.h>

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

UnRegisterForPrintAsyncNotifications = ctypes.windll.LoadLibrary("winspool.drv").UnRegisterForPrintAsyncNotifications
UnRegisterForPrintAsyncNotifications.restype = ctypes.c_int
UnRegisterForPrintAsyncNotifications.argtypes = [
    wintypes.HANDLE,  # param0 : HANDLE
]
require 'fiddle'
require 'fiddle/import'

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

var (
	winspool_drv = windows.NewLazySystemDLL("winspool.drv")
	procUnRegisterForPrintAsyncNotifications = winspool_drv.NewProc("UnRegisterForPrintAsyncNotifications")
)

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