术语 | getclipboardformatname |
释义 | GetClipboardFormatName 语法: int GetClipboardFormatName( UINT format, LPTSTR lpszFormatName, int cchMaxCount ); GetClipboardFormatName功能 从剪贴板中指定的格式名称登记GetClipboardFormatName函数检索。函数的名称复制到指定的缓冲区。 参数 格式 [in]指定格式类型的检索。这个参数不能指定预定义的剪贴板格式的。 lpszFormatName [out]指向的缓冲区接收格式的名称。 cchMaxCount [in]指定的最大长度,在TCHARs,字符串复制到缓冲区。如果名称超过此限制,它被截断。对于函数的ANSI版本,这是字节数。对于宽字符(Unicode)版本,这是字符数。 返回值 如果函数成功,返回值是长度,TCHARs,复制到缓冲区的字符串。 如果函数失败,返回值是零,表明该请求的格式不存在或预定义。为了获得更多错误信息,调用GetLastError。 备注 安全警告:使用这个函数不正确可能会损害您的程序的安全性。例如,错估了lpszFormatName适当大小的缓冲区,特别是当应用程序在ANSI和Unicode版本使用,可能导致缓冲区溢出。此外,请注意该字符串被截断,如果超过了cchMaxCount参数,它可能导致信息丢失。 在Windows 95/98/Me:GetClipboardFormatNameW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。 例如 举例说,看到一个剪贴板查看示例。 功能信息 最低DLL版本 user32.dll 在Winuser.h中HeaderDeclared,头文件:winuser.h import libraryUser32.lib 最低操作系统Windows 95,Windows NT 3.1 UnicodeImplemented为ANSI和Unicode版本。 参见 剪贴板概述,EnumClipboardFormats,RegisterClipboardFormat ==英文原文==GetClipboardFormatName Function The GetClipboardFormatName function retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer. Syntax int GetClipboardFormatName( UINT format, LPTSTR lpszFormatName, int cchMaxCount ); Parameters format [in] Specifies the type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats. lpszFormatName [out] Pointer to the buffer that is to receive the format name. cchMaxCount [in] Specifies the maximum length, in TCHARs, of the string to be copied to the buffer. If the name exceeds this limit, it is truncated. For the ANSI version of the function, this is the number of bytes. For the wide-character (Unicode) version, this is the number of characters. Return Value If the function succeeds, the return value is the length, in TCHARs, 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 . Remarks Security Alert Using this function incorrectly might compromise the security of your program. For example, miscalculating the proper size of the lpszFormatName buffer, especially when the application is used in both ANSI and Unicode versions, can cause a buffer overflow. Also, note that the string is truncated if it is longer than the cchMaxCount parameter, which can lead to loss of information. Windows 95/98/Me: GetClipboardFormatNameW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems . Example For an example, see Example of a Clipboard Viewer . Function Information Minimum DLL Versionuser32.dll HeaderDeclared in Winuser.h, include Windows.h Import libraryUser32.lib Minimum operating systemsWindows 95, Windows NT 3.1 UnicodeImplemented as ANSI and Unicode versions. See Also Clipboard Overview , EnumClipboardFormats , RegisterClipboardFormat ==原始网址==http://msdn.microsoft.com/en-us/library/ms649040(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。