The information in this article applies to:
SYMPTOMSGetPrivateProfileSection sometimes returns 0, even though the specified section is contained in the initialization file. CAUSEThe GetPrivateProfileSection API opens the initialization file with read and write access. If the initialization file is read only, this function returns 0. RESOLUTIONYou can resolve this error by making a call to GetPrivateProfileString before GetPrivateProfileSection. Make the GetPrivateProfileString call as follows before calling any other profile functions:
The profile functions are provided for compatibility with 16-bit applications written for Windows. It is recommended that all Win32-based applications store initialization information in the registry and use the Win32 registry APIs to retrieve these values.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Additional query words:
Keywords : kbKernBase kbRegistry kbWinOS95 kbWinOS98 |
Last Reviewed: March 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |