ホーム › Graphics.Printing › RouterFreePrinterNotifyInfo
RouterFreePrinterNotifyInfo
関数ルーターで確保したプリンター通知情報を解放する。
シグネチャ
// SPOOLSS.dll
#include <windows.h>
BOOL RouterFreePrinterNotifyInfo(
PRINTER_NOTIFY_INFO* pInfo // optional
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pInfo | PRINTER_NOTIFY_INFO* | inoptional |
戻り値の型: BOOL
各言語での呼び出し定義
// SPOOLSS.dll
#include <windows.h>
BOOL RouterFreePrinterNotifyInfo(
PRINTER_NOTIFY_INFO* pInfo // optional
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("SPOOLSS.dll", ExactSpelling = true)]
static extern bool RouterFreePrinterNotifyInfo(
IntPtr pInfo // PRINTER_NOTIFY_INFO* optional
);<DllImport("SPOOLSS.dll", ExactSpelling:=True)>
Public Shared Function RouterFreePrinterNotifyInfo(
pInfo As IntPtr ' PRINTER_NOTIFY_INFO* optional
) As Boolean
End Function' pInfo : PRINTER_NOTIFY_INFO* optional
Declare PtrSafe Function RouterFreePrinterNotifyInfo Lib "spoolss" ( _
ByVal pInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
RouterFreePrinterNotifyInfo = ctypes.windll.spoolss.RouterFreePrinterNotifyInfo
RouterFreePrinterNotifyInfo.restype = wintypes.BOOL
RouterFreePrinterNotifyInfo.argtypes = [
ctypes.c_void_p, # pInfo : PRINTER_NOTIFY_INFO* optional
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('SPOOLSS.dll')
RouterFreePrinterNotifyInfo = Fiddle::Function.new(
lib['RouterFreePrinterNotifyInfo'],
[
Fiddle::TYPE_VOIDP, # pInfo : PRINTER_NOTIFY_INFO* optional
],
Fiddle::TYPE_INT)#[link(name = "spoolss")]
extern "system" {
fn RouterFreePrinterNotifyInfo(
pInfo: *mut PRINTER_NOTIFY_INFO // PRINTER_NOTIFY_INFO* optional
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("SPOOLSS.dll")]
public static extern bool RouterFreePrinterNotifyInfo(IntPtr pInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'SPOOLSS_RouterFreePrinterNotifyInfo' -Namespace Win32 -PassThru
# $api::RouterFreePrinterNotifyInfo(pInfo)#uselib "SPOOLSS.dll"
#func global RouterFreePrinterNotifyInfo "RouterFreePrinterNotifyInfo" sptr
; RouterFreePrinterNotifyInfo varptr(pInfo) ; 戻り値は stat
; pInfo : PRINTER_NOTIFY_INFO* optional -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。出力引数:
#uselib "SPOOLSS.dll" #cfunc global RouterFreePrinterNotifyInfo "RouterFreePrinterNotifyInfo" var ; res = RouterFreePrinterNotifyInfo(pInfo) ; pInfo : PRINTER_NOTIFY_INFO* optional -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。#uselib "SPOOLSS.dll" #cfunc global RouterFreePrinterNotifyInfo "RouterFreePrinterNotifyInfo" sptr ; res = RouterFreePrinterNotifyInfo(varptr(pInfo)) ; pInfo : PRINTER_NOTIFY_INFO* optional -> "sptr" ; ※出力/バッファ引数はポインタ方式(token=sptr / 呼び出しは varptr(変数))。
出力引数:
; BOOL RouterFreePrinterNotifyInfo(PRINTER_NOTIFY_INFO* pInfo) #uselib "SPOOLSS.dll" #cfunc global RouterFreePrinterNotifyInfo "RouterFreePrinterNotifyInfo" var ; res = RouterFreePrinterNotifyInfo(pInfo) ; pInfo : PRINTER_NOTIFY_INFO* optional -> "var" ; ※出力/バッファ引数は var 方式(変数を直接渡す)。varptr 方式にも切替可。; BOOL RouterFreePrinterNotifyInfo(PRINTER_NOTIFY_INFO* pInfo) #uselib "SPOOLSS.dll" #cfunc global RouterFreePrinterNotifyInfo "RouterFreePrinterNotifyInfo" intptr ; res = RouterFreePrinterNotifyInfo(varptr(pInfo)) ; pInfo : PRINTER_NOTIFY_INFO* optional -> "intptr" ; ※出力/バッファ引数はポインタ方式(token=intptr / 呼び出しは varptr(変数))。
import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
spoolss = windows.NewLazySystemDLL("SPOOLSS.dll")
procRouterFreePrinterNotifyInfo = spoolss.NewProc("RouterFreePrinterNotifyInfo")
)
// pInfo (PRINTER_NOTIFY_INFO* optional)
r1, _, err := procRouterFreePrinterNotifyInfo.Call(
uintptr(pInfo),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction RouterFreePrinterNotifyInfo(
pInfo: Pointer // PRINTER_NOTIFY_INFO* optional
): BOOL; stdcall;
external 'SPOOLSS.dll' name 'RouterFreePrinterNotifyInfo';result := DllCall("SPOOLSS\RouterFreePrinterNotifyInfo"
, "Ptr", pInfo ; PRINTER_NOTIFY_INFO* optional
, "Int") ; return: BOOL●RouterFreePrinterNotifyInfo(pInfo) = DLL("SPOOLSS.dll", "bool RouterFreePrinterNotifyInfo(void*)")
# 呼び出し: RouterFreePrinterNotifyInfo(pInfo)
# pInfo : PRINTER_NOTIFY_INFO* optional -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。