Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer.
int GetClipboardFormatNameW(
[in] UINT format,
[out] LPWSTR lpszFormatName,
[in] int cchMaxCount
);
[in] format
Type: UINT
The type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats.
[out] lpszFormatName
Type: LPTSTR
The buffer that is to receive the format name.
[in] cchMaxCount
Type: int
The maximum length, in characters, of the string to be copied to the buffer. If the name exceeds this limit, it is truncated.
Type: int
If the function succeeds, the return value is the length, in characters, of the string copied to the buffer.
If the function fails, the return value is zero, indicating that the requested format does not exist or is predefined. To get extended error information, call GetLastError.
For an example, see Example of a Clipboard Viewer.
Note
The winuser.h header defines GetClipboardFormatName as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
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-1-0 (introduced in Windows 8) |
Conceptual
Reference
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today