Microsoft KB Archive/230747

{|
 * width="100%"|

BUG: GetGlyphOutline Causes Fatal Exception in Chinese, Japanese, and Korean Windows NT 4.0

 * }

Q230747

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), used with:
 * the operating system: Microsoft Windows NT, versions 4.0 SP2, 4.0 SP3, 4.0 SP4

-

NOTE: This information applies only to the Chinese, Japanese, and Korean (CJK) versions of Microsoft Windows NT 4.0.

SYMPTOMS
A call to the GetGlyphOutline function on Chinese, Japanese, or Korean version of Windows NT 4.0 causes a fatal exception (which appears on a blue screen).

CAUSE
The fatal exception occurs in a code path on the CJK versions of Windows NT where there is an attempt to process a nonexistent character with a matrix other than identity. This can occur when the character code is either not in the TrueType font that is currently selected in the device context or the character is an end user-defined character (EUDC).

RESOLUTION
To work around the problem, always call the GetGlyphOutline function on Chinese, Japanese, and Korean versions of Windows NT with an identity matrix for the last parameter. Using an identity matrix avoids the code path in the operating system that causes the fatal exception.

A formal identity matrix contains only zeros and ones. Such a matrix can be initialized by using the following code snippet:

// Make an identity matrix memset(&mat, 0, sizeof(mat)); mat.eM11.value = 1; mat.eM12.value = 0; mat.eM21.value = 0; mat.eM22.value = 1;

Note that this snippet of code creates a true identity matrix. Any other method of initializing an identity matrix may produce a matrix definition with values other than zeros and ones.

In particular, a floating point conversion to the FIXED data type may introduce a nonzero value into the fract member of the FIXED structure. A FIXED structure with a nonzero fract component does not form a true identity and will cause the fatal exception to occur.

The problem has been fixed on Windows NT Far East Service Pack 5. Therefore, a matrix other than an identity matrix can be used if the Service Pack level is Service Pack 5 or later. For additional information on checking the service pack level of Windows NT, click the article number below to view the article in the Microsoft Knowledge Base:

"Q225013 INFO: Windows Version Checking"

STATUS
This problem was corrected in Windows NT 4.0 Far East Service Pack 5.