Microsoft KB Archive/105681

From BetaArchive Wiki

PRB: GetPrivateProfileSection() Can Read Only 32K Sections PSS ID Number: Q105681 Article last modified on 04-23-1994

3.10

WINDOWS NT

The information in this article applies to:
- Microsoft Win32 Software Development Kit (SDK) for Windows NT version 3.1

SYMPTOMS

The documentation for GetProfileSection(), GetProfileString(), GetPrivateProfileSection(), GetPrivateProfileString(), and GetPrivateProfileSection() indicate that the application programming interface (API) can read all the keys and values of a section, regardless of size. However, these functions only seem to handle sections that are smaller than 32K, even though the size of the buffer is a DWORD.

CAUSE

The code is casting this value to a signed short, and therefore you are having problems with sections that are greater than 32K in size.

STATUS

Microsoft has confirmed this to be a problem in Windows NT 3.1. We are researching this problem and will post new information here in this Knowledge Base as it becomes available.

Additional reference words: 3.10 KBCategory: Prg KBSubcategory: BseMisc

=================================================================

Copyright Microsoft Corporation 1994.