At 01:07 AM 7/19/01 +0200, Lionel Ulmer wrote
pAppName [in] Pointer to a null-terminated string that specifies the name of the section containing the key name. If this parameter is NULL, the GetPrivateProfileString function copies all section names in the file to the supplied buffer.
lpKeyName [in] Pointer to the null-terminated string specifying the name of the key whose associated string is to be retrieved. If this parameter is NULL, all key names in the section specified by the lpAppName parameter are copied to the buffer specified by the lpReturnedString parameter.
so if lpAppName is NULL, it's supposed to copy all section names, and if lpKeyName is NULL, it copesi all key names in lpAppName section...maybe someone wasn't sure what to do if they were both NULL? It seems like as long as lpAppName is NULL, it doesn't really matter what lpKeyName is, right? If that is so, IMHO the code should reflect these rules by ordering the code so that you check AppName for NULL, and if it isn't, THEN you check KeyName for NULL.
- Brandon