registerEndpointNotificationCallback method

void registerEndpointNotificationCallback(
  1. IMMNotificationClient? pClient
)

Registers a client's notification callback interface.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/mmdeviceapi/nf-mmdeviceapi-immdeviceenumerator-registerendpointnotificationcallback.

Implementation

@pragma('vm:prefer-inline')
void registerEndpointNotificationCallback(IMMNotificationClient? pClient) {
  final hr$ = HRESULT(
    _RegisterEndpointNotificationCallbackFn(ptr, pClient?.ptr ?? nullptr),
  );
  if (hr$.isError) throw WindowsException(hr$);
}