网站首页  词典首页

请输入您要查询的函数:

 

术语 getcpinfo
释义 GetCPInfo
语法:
BOOL GetCPInfo(
__in UINT CodePage,
__out LPCPINFO lpCPInfo
);
GetCPInfo功能
检索有关任何有效的安装或使用的代码页。
注意:要获取有关有效安装或使用的代码页的其他信息,应用程序应该使用GetCPInfoEx。
参数
代码页 [in]
标识符代码页的检索信息。应用程序可以指定任何安装或使用代码页代码页标识符,或以下预定义值之一。请参阅为ANSI和其他代码页标识符列表代码页标识符。
ValueMeaning
CP_ACPUse系统默认的Windows ANSI代码页。
CP_MACCPUse系统默认的Macintosh代码页。
CP_OEMCPUse系统默认的OEM代码页。
CP_THREAD_ACPUse当前线程的ANSI代码页。
lpCPInfo [out]
指针CPINFO结构,收到有关的代码页的信息。参见备注部分。
返回值
如果成功则返回1,或否则为0。为了获得更多错误信息,应用程序可以调用GetLastError函数,可以返回以下错误代码之一:
ERROR_INVALID_PARAMETER。该参数值的任何无效。
备注
在CPINFO结构检索到的信息并不总是有益的所有代码页。要确定缓冲区的大小,例如,应用程序应调用MultiByteToWideChar或WideCharToMultiByte要求准确的缓冲区大小。如果CPINFO设置表明,前导字节存在,转换功能,并不一定导致字节不同的处理,例如,一名失踪或非法线索字节的情况。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinnls.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
国家语言支持
国家语言支持功能
代码页标识符
GetACP
GetCPInfoEx
GetOEMCP
MultiByteToWideChar
WideCharToMultiByte
CPINFO
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月12号
==英文原文==GetCPInfo Function
Retrieves information about any valid installed or available code page.
Note To obtain additional information about valid installed or available code pages, the application should use GetCPInfoEx .
Syntax
BOOL GetCPInfo(
__in UINT CodePage,
__out LPCPINFO lpCPInfo
);
Parameters
CodePage [in]
Identifier for the code page for which to retrieve information. The application can specify the code page identifier for any installed or available code page, or one of the following predefined values. See Code Page Identifiers for a list of identifiers for ANSI and other code pages.
ValueMeaning
CP_ACPUse the system default Windows ANSI code page.
CP_MACCPUse the system default Macintosh code page.
CP_OEMCPUse the system default OEM code page.
CP_THREAD_ACPUse the current thread's ANSI code page.

lpCPInfo [out]
Pointer to a CPINFO structure that receives information about the code page. See the Remarks section.
Return Value
Returns 1 if successful, or 0 otherwise. To get extended error information, the application can call GetLastError , which can return one of the following error codes:
ERROR_INVALID_PARAMETER. Any of the parameter values was invalid.
Remarks
The information retrieved in the CPINFO structure is not always useful for all code pages. To determine buffer sizes, for example, the application should call MultiByteToWideChar or WideCharToMultiByte to request an accurate buffer size. If CPINFO settings indicate that a lead byte exists, the conversion function does not necessarily handle lead bytes differently, for example, in the case of a missing or illegal trail byte.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinnls.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
National Language Support
National Language Support Functions
Code Page Identifiers
GetACP
GetCPInfoEx
GetOEMCP
MultiByteToWideChar
WideCharToMultiByte
CPINFO
Send comments about this topic to Microsoft
Build date: 7/12/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd318078(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:28:45