mciSendCommand function Null safety winmm

int mciSendCommand(
  1. int mciId,
  2. int uMsg,
  3. int dwParam1,
  4. int dwParam2
)

The mciSendCommand function sends a command message to the specified MCI device.

MCIERROR mciSendCommandW(
  MCIDEVICEID IDDevice,
  UINT        uMsg,
  DWORD_PTR   fdwCommand,
  DWORD_PTR   dwParam
);

Implementation

int mciSendCommand(int mciId, int uMsg, int dwParam1, int dwParam2) {
  final _mciSendCommand = _winmm.lookupFunction<
      Uint32 Function(
          Uint32 mciId, Uint32 uMsg, IntPtr dwParam1, IntPtr dwParam2),
      int Function(
          int mciId, int uMsg, int dwParam1, int dwParam2)>('mciSendCommandW');
  return _mciSendCommand(mciId, uMsg, dwParam1, dwParam2);
}