GetClipboardFormatName function Null safety user32

int GetClipboardFormatName(
  1. int format,
  2. Pointer<Utf16> lpszFormatName,
  3. int cchMaxCount

Retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer.

int GetClipboardFormatNameW(
  UINT format,
  LPWSTR lpszFormatName,
  int cchMaxCount


int GetClipboardFormatName(
    int format, Pointer<Utf16> lpszFormatName, int cchMaxCount) {
  final _GetClipboardFormatName = _user32.lookupFunction<
      Int32 Function(
          Uint32 format, Pointer<Utf16> lpszFormatName, Int32 cchMaxCount),
      int Function(int format, Pointer<Utf16> lpszFormatName,
          int cchMaxCount)>('GetClipboardFormatNameW');
  return _GetClipboardFormatName(format, lpszFormatName, cchMaxCount);