kernel32: Implement registry mapping in GetPrivateProfileSectionNames().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9ed6d24ed8
commit
3c1ebfdf82
|
@ -1807,11 +1807,26 @@ DWORD WINAPI GetPrivateProfileSectionNamesW( LPWSTR buffer, DWORD size,
|
|||
LPCWSTR filename)
|
||||
{
|
||||
DWORD ret = 0;
|
||||
HKEY key;
|
||||
|
||||
if ((key = open_file_mapping_key( filename )))
|
||||
{
|
||||
WCHAR *section;
|
||||
DWORD i;
|
||||
|
||||
for (i = 0; (section = enum_key( key, i )); ++i)
|
||||
{
|
||||
lstrcpynW( buffer + ret, section, size - ret - 1 );
|
||||
ret = min( ret + strlenW( section ) + 1, size - 1 );
|
||||
}
|
||||
|
||||
RegCloseKey( key );
|
||||
}
|
||||
|
||||
RtlEnterCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
if (PROFILE_Open( filename, FALSE ))
|
||||
ret = PROFILE_GetSectionNames(buffer, size);
|
||||
ret += PROFILE_GetSectionNames( buffer + ret, size - ret );
|
||||
|
||||
RtlLeaveCriticalSection( &PROFILE_CritSect );
|
||||
|
||||
|
|
Loading…
Reference in New Issue