SetPrinter function winspool
Win32Result<bool>
SetPrinter(
- PRINTER_HANDLE hPrinter,
- int level,
- Pointer<
Uint8> ? pPrinter, - int command,
Sets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.
To learn more, see learn.microsoft.com/windows/win32/printdocs/setprinter.
Implementation
Win32Result<bool> SetPrinter(
PRINTER_HANDLE hPrinter,
int level,
Pointer<Uint8>? pPrinter,
int command,
) {
final result_ = SetPrinterW_Wrapper(
hPrinter,
level,
pPrinter ?? nullptr,
command,
);
return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}