SetPort function winspool

Win32Result<bool> SetPort(
  1. PCWSTR? pName,
  2. PCWSTR pPortName,
  3. int dwLevel,
  4. Pointer<Uint8> pPortInfo,
)

Sets the status associated with a printer port.

To learn more, see learn.microsoft.com/windows/win32/printdocs/setport.

Implementation

Win32Result<bool> SetPort(
  PCWSTR? pName,
  PCWSTR pPortName,
  int dwLevel,
  Pointer<Uint8> pPortInfo,
) {
  final result_ = SetPortW_Wrapper(
    pName ?? nullptr,
    pPortName,
    dwLevel,
    pPortInfo,
  );
  return Win32Result(value: result_.value.i32 != FALSE, error: result_.error);
}