GetPriorityClipboardFormat function (winuser.h)

Retrieves the first available clipboard format in the specified list.

Syntax

int GetPriorityClipboardFormat(
  [in] UINT *paFormatPriorityList,
  [in] int  cFormats
);

Parameters

[in] paFormatPriorityList

Type: UINT*

The clipboard formats, in priority order. For a description of the standard clipboard formats, see Standard Clipboard Formats .

[in] cFormats

Type: int

The number of entries in the paFormatPriorityList array. This value must not be greater than the number of entries in the list.

Return value

Type: int

If the function succeeds, the return value is the first clipboard format in the list for which data is available. If the clipboard is empty, the return value is NULL. If the clipboard contains data, but not in any of the specified formats, the return value is –1. To get extended error information, call GetLastError.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-misc-l1-5-1 (introduced in Windows 10, version 10.0.14393)

See also

Clipboard

Conceptual

CountClipboardFormats

EnumClipboardFormats

GetClipboardFormatName

IsClipboardFormatAvailable

Reference

RegisterClipboardFormat