OpenPrinter function Null safety winspool

int OpenPrinter(
  1. Pointer<Utf16> pPrinterName,
  2. Pointer<IntPtr> phPrinter,
  3. Pointer<PRINTER_DEFAULTS> pDefault
)

The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem.

BOOL OpenPrinterW(
  _In_  LPTSTR             pPrinterName,
  _Out_ LPHANDLE           phPrinter,
  _In_  LPPRINTER_DEFAULTS pDefault
);

Implementation

int OpenPrinter(Pointer<Utf16> pPrinterName, Pointer<IntPtr> phPrinter,
        Pointer<PRINTER_DEFAULTS> pDefault) =>
    _OpenPrinter(pPrinterName, phPrinter, pDefault);