EnumPrinters function Null safety winspool

int EnumPrinters(
  1. int Flags,
  2. Pointer<Utf16> Name,
  3. int Level,
  4. Pointer<Uint8> pPrinterEnum,
  5. int cbBuf,
  6. Pointer<Uint32> pcbNeeded,
  7. Pointer<Uint32> pcReturned
)

The EnumPrinters function enumerates available printers, print servers, domains, or print providers.

BOOL EnumPrintersW(
   _In_  DWORD   Flags,
   _In_  LPTSTR  Name,
   _In_  DWORD   Level,
   _Out_ LPBYTE  pPrinterEnum,
   _In_  DWORD   cbBuf,
   _Out_ LPDWORD pcbNeeded,
   _Out_ LPDWORD pcReturned
);

Implementation

int EnumPrinters(
        int Flags,
        Pointer<Utf16> Name,
        int Level,
        Pointer<Uint8> pPrinterEnum,
        int cbBuf,
        Pointer<Uint32> pcbNeeded,
        Pointer<Uint32> pcReturned) =>
    _EnumPrinters(
        Flags, Name, Level, pPrinterEnum, cbBuf, pcbNeeded, pcReturned);