mciGetErrorString function Null safety winmm

int mciGetErrorString(
  1. int mcierr,
  2. Pointer<Utf16> pszText,
  3. int cchText
)

The mciGetErrorString function retrieves a string that describes the specified MCI error code.

BOOL mciGetErrorStringW(
  DWORD  fdwError,
  LPTSTR lpszErrorText,
  UINT   cchErrorText
);

Implementation

int mciGetErrorString(int mcierr, Pointer<Utf16> pszText, int cchText) {
  final _mciGetErrorString = _winmm.lookupFunction<
      Int32 Function(Uint32 mcierr, Pointer<Utf16> pszText, Uint32 cchText),
      int Function(int mcierr, Pointer<Utf16> pszText,
          int cchText)>('mciGetErrorStringW');
  return _mciGetErrorString(mcierr, pszText, cchText);
}