GetDefaultCommConfig function kernel32

Win32Result<bool> GetDefaultCommConfig(
  1. PCWSTR lpszName,
  2. Pointer<COMMCONFIG> lpCC,
  3. Pointer<Uint32> lpdwSize
)

Retrieves the default configuration for the specified communications device.

To learn more, see learn.microsoft.com/windows/win32/api/winbase/nf-winbase-getdefaultcommconfigw.

Implementation

Win32Result<bool> GetDefaultCommConfig(
  PCWSTR lpszName,
  Pointer<COMMCONFIG> lpCC,
  Pointer<Uint32> lpdwSize,
) {
  resolveGetLastError();
  final result_ = _GetDefaultCommConfig(lpszName, lpCC, lpdwSize);
  return .new(value: result_ != FALSE, error: GetLastError());
}