网站首页  词典首页

请输入您要查询的函数:

 

术语 foldstring
释义 FoldString
语法:
int FoldString( DWORD dwMapFlags,
LPCTSTR lpSrcStr,
int cchSrc,
LPTSTR lpDestStr,
int cchDest
);
FoldString功能
该FoldString一个字符串函数映射到另一个,执行指定的改造方案。
参数
dwMapFlags
[in]一位标志,表明了转型的类型将在用于测绘集。这个值可以是下列值的组合。
MAP_FOLDCZONE
折叠成标准Unicode字符区等值的兼容性。此标志相当于范式在Windows Vista科威特第纳尔,如果MAP_COMPOSITE标志也设置。如果复合标志不设置(默认),此标志相当于范式陈家在Windows Vista中。有关兼容性区的字符信息,请参见备注部分。
MAP_FOLDDIGITS
地图所有的数字为Unicode字符0到9。
MAP_PRECOMPOSED
地图重音字符预作字符,其中的口音和基本字符到一个单一的字符值的总和。这个标志是equvalent的范式C在Windows Vista中。此值不能结合MAP_COMPOSITE。
MAP_COMPOSITE
地图重音字符分解字符,即字符,其中一个基本字符和一个或多个nonspacing字符各有不同的码点值。此标志相当于正常化表D,在Windows Vista中。请注意,此标志不能与MB_PRECOMPOSED使用。此值不能结合MAP_PRECOMPOSED。
MAP_EXPAND_LIGATURES
展开所有结扎字符,以便他们是代表他们的两个字符相同。例如,结扎'?'扩展到两个字符'a'和'电子'。此值不能结合MAP_PRECOMPOSED或MAP_COMPOSITE。
lpSrcStr
[in]指向字符串映射。
cchSrc
[in]指定的大小,在TCHARs,在lpSrcStr缓冲区。这是指对函数或Unicode版本WCHARs ANSI版本字节。如果cchSrc任何负值,lpSrcStr被假定为空终止,长度自动计算。
lpDestStr
[out]指向缓冲区存储映射的字符串。
cchDest
[in]指定的大小,在TCHARs,在lpDestStr缓冲区。如果cchDest是零除在MAP_FOLDDIGITS情况下,该函数返回须持有映射的字符串和缓冲区的字符数指向lpDestStr不使用。
在MAP_FOLDDIGITS情况下,当cchDest为零返回值将是最大规模要求,即使实际的字符数需要的是小于最大大小。如果最大大小不获通过,该函数将失败并返回ERROR_INSUFFICIENT_BUFFER。
返回值
如果函数成功,返回值是写入到目标缓冲区,或者如果cchDest参数是零TCHARs人数,须持有对应的字符串的字符数。这是指对函数或Unicode版本WCHARs ANSI版本字节。请注意,当cchDest为零除在MAP_FOLDDIGITS案件中,返回值为空,包括终止空间,如果原始字符串包括空终止,如果cchSrc要么是-1或长度,其中包括空终止。
在MAP_FOLDDIGITS情况下,当cchDest为零返回值将是最大规模要求,即使实际的字符数需要的是小于最大大小。如果最大大小不获通过,该函数将失败并返回ERROR_INSUFFICIENT_BUFFER。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 GetLastError函数可能会返回下列错误代码之一:
ERROR_INSUFFICIENT_BUFFER
ERROR_INVALID_FLAGS
ERROR_INVALID_PARAMETER
ERROR_OUTOFMEMORY
ERROR_INVALID_DATA
ERROR_MOD_NOT_FOUND
ERROR_PROC_NOT_FOUND
备注
映射的字符串是空终止如果源字符串为空终止。
在lpSrcStr和lpDestStr指针必须不一样。如果它们是相同的,函数失败并GetLastError返回ERROR_INVALID_PARAMETER。
在Unicode的兼容性区组成的字符范围0xF900通过0xFFEF指派其他字符的字符编码标准,但实际上的字符在Unicode已经变种。区的兼容性,用于支持往返映射到这些标准。应用程序可以使用MAP_FOLDCZONE标志,以避免支持在兼容性区重复的字符。
Windows Vista的:支持Unicode正常化。兼容所有的Unicode字符映射。
Windows Vista的:在Windows Vista中,变革所指出的MAP_FOLDCZONE,MAP_PRECOMPOSED,并MAP_COMPOSITE标志使用Unicode正常化(通过NormalizeString函数)做映射。
安全警告:使用这个函数不当,可能会损害您的应用程序的安全。字符串不正确映射可以产生无效的输入。测试字符串,以确保它们在使用前,向他们提供有效的错误处理。有关更多信息,请参阅安全注意事项:国际特色。
功能信息
最低DLL版本 kernel32.dll
在Winnls.h HeaderDeclared,头文件:winuser.h
import libraryKernel32.lib
最低经营systemsWindows新台币3.1
UnicodeImplemented为Unicode版本。
参见
Strings 概述 ,LCMapString,CompareString
==英文原文==FoldString Function
The FoldString function maps one string to another, performing a specified transformation option.
Syntax
int FoldString( DWORD dwMapFlags,
LPCTSTR lpSrcStr,
int cchSrc,
LPTSTR lpDestStr,
int cchDest
);
Parameters
dwMapFlags
[in] A set of bit flags that indicate the type of transformation to be used during mapping. This value can be a combination of the following values.
MAP_FOLDCZONE
Fold compatibility zone characters into standard Unicode equivalents. This flag is equivalent to normalization form KD in Windows Vista, if the MAP_COMPOSITE flag is also set. If the composite flag is not set (default), this flag is equivalent to normalization form KC in Windows Vista. For information about compatibility zone characters, see the Remarks section.
MAP_FOLDDIGITS
Map all digits to Unicode characters 0 through 9.
MAP_PRECOMPOSED
Map accented characters to precomposed characters, in which the accent and base character are combined into a single character value. This flag is equvalent to normalization form C in Windows Vista. This value cannot be combined with MAP_COMPOSITE.
MAP_COMPOSITE
Map accented characters to decomposed characters, that is, characters in which a base character and one or more nonspacing characters each have distinct code point values. This flag is equivalent to normalization form D in Windows Vista. Note that this flag cannot be used with MB_PRECOMPOSED. This value cannot be combined with MAP_PRECOMPOSED.
MAP_EXPAND_LIGATURES
Expand all ligature characters so that they are represented by their two-character equivalent. For example, the ligature '?' expands to the two characters 'a' and 'e'. This value cannot be combined with MAP_PRECOMPOSED or MAP_COMPOSITE.
lpSrcStr
[in] Pointer to the string to be mapped.
cchSrc
[in] Specifies the size, in TCHARs, of the lpSrcStr buffer. This refers to bytes for ANSI versions of the function or WCHARs for Unicode versions. If cchSrc is any negative value, lpSrcStr is assumed to be null-terminated, and the length is calculated automatically.
lpDestStr
[out] Pointer to the buffer to store the mapped string.
cchDest
[in] Specifies the size, in TCHARs, of the lpDestStr buffer. If cchDest is zero, except in the case of MAP_FOLDDIGITS, the function returns the number of characters required to hold the mapped string and the buffer pointed to by lpDestStr is not used.
In the case of MAP_FOLDDIGITS, when cchDest is zero the return value will be the maximum size required, even if the actual number of characters needed is smaller than the maximum size. If the maximum size is not passed, the function will fail and return ERROR_INSUFFICIENT_BUFFER .
Return Value
If the function succeeds, the return value is the number of TCHARs written to the destination buffer, or if the cchDest parameter is zero, the number of characters required to hold the mapped string. This refers to bytes for ANSI versions of the function or WCHARs for Unicode versions. Note that, when cchDest is zero, except in the case of MAP_FOLDDIGITS, the return value includes space for the null termination if the original string includes a null termination and if cchSrc is either -1 or a length that includes the null termination.
In the case of MAP_FOLDDIGITS, when cchDest is zero the return value will be the maximum size required, even if the actual number of characters needed is smaller than the maximum size. If the maximum size is not passed, the function will fail and return ERROR_INSUFFICIENT_BUFFER .
If the function fails, the return value is zero. To get extended error information, call GetLastError . GetLastError may return one of the following error codes:
ERROR_INSUFFICIENT_BUFFER
ERROR_INVALID_FLAGS
ERROR_INVALID_PARAMETER
ERROR_OUTOFMEMORY
ERROR_INVALID_DATA
ERROR_MOD_NOT_FOUND
ERROR_PROC_NOT_FOUND
Remarks
The mapped string is null-terminated if the source string is null-terminated.
The lpSrcStr and lpDestStr pointers must not be the same. If they are the same, the function fails and GetLastError returns ERROR_INVALID_PARAMETER .
The compatibility zone in Unicode consists of characters in the range 0xF900 through 0xFFEF that are assigned to characters from other character-encoding standards but are actually variants of characters that are already in Unicode. The compatibility zone is used to support round-trip mapping to these standards. Applications can use the MAP_FOLDCZONE flag to avoid supporting the duplication of characters in the compatibility zone.
Windows Vista: Supports Unicode normalization. All Unicode compatibility characters are mapped.
Windows Vista: In Windows Vista, the transformations indicated by the MAP_FOLDCZONE, MAP_PRECOMPOSED, and MAP_COMPOSITE flags use Unicode normalization (through the NormalizeString function) to do the mappings.
Security Alert Using this function incorrectly can compromise the security of your application. Strings that are not mapped correctly can produce invalid input. Test strings to make sure they are valid before using them and provide error handlers. For more information, see Security Considerations: International Features .
Function Information
Minimum DLL Versionkernel32.dll
HeaderDeclared in Winnls.h, include Windows.h
Import libraryKernel32.lib
Minimum operating systemsWindows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Strings Overview , LCMapString , CompareString
==原始网址==http://msdn.microsoft.com/en-us/library/ms647478(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:24:41