BUG: GetKerningPairs Sometimes Fails on Win32s 1.2 and 1.25aID: Q125872
|
GetKerningPairs will sometimes fail on Win32s version 1.2 causing the 32-bit application to exit mysteriously. The problem may only occur once in a while with many successful runs interrupted by a single unsuccessful run.
The thunking layer for GetKerningPairs contains a bug in the code that allocates a temporary buffer passed to the 16-bit version of GetKerningPairs. The errant code executes whenever the number of kerning pairs requested is equal to or less than 128. Requesting GetKerningPairs to return 129 or more kerning pairs forces the thunking layer to use an alternative buffer allocation method.
To work around the problem, ensure that the number of kerning pairs
requested from GetKerningPairs is greater than 128.
Typically, kerning pairs are retrieved with two calls to GetKerningPairs.
The first call retrieves the number of kerning pairs available. A buffer is
allocated based on the number of pairs returned. Then the second call to
GetKerningPairs retrieves the kerning pairs into the buffer.
To avoid the bug in GetKerningPairs, follow these steps:
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
Additional query words: 1.20 font kerning
Keywords : kbSDKWin32 kbDSupport
Version : winnt:
Platform : winnt
Issue type : kbbug
Last Reviewed: June 25, 1999