IsDBCSLeadByte

The IsDBCSLeadByte function determines whether a character is a lead byte — that is, the first byte of a character in a double-byte character set (DBCS).

BOOL IsDBCSLeadByte(
  BYTE TestChar   // character to test
);
 

Parameters

TestChar
Specifies the character to be tested.

Return Values

If the character is a lead byte, the return value is nonzero.

If the character is not a lead byte, the return value is zero. To get extended error information, call GetLastError.

Remarks

Lead bytes are unique to double-byte character sets. A lead byte introduces a double-byte character. Lead bytes occupy a specific range of byte values. The IsDBCSLeadByte function uses the ANSI code page to check lead-byte ranges. To specify a different code page, use the IsDBCSLeadByteEx function.

Windows CE: The IsDBCSLeadByte function returns the following values:

TRUE
The character is a lead byte.
FALSE
Either the character is not a lead byte, or an error was generated. Call GetLastError for extended error information.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Requires version 1.0 or later.
  Header: Declared in winnls.h.
  Import Library: Use kernel32.lib.

See Also

Unicode and Character Sets Overview, Unicode and Character Set Functions, IsDBCSLeadByteEx, MultiByteToWideChar