Return the correct value from GetPrivateProfileSectionA.

Copy/convert back the buffer in GetPrivateProfileSectionW.
Replace some output pointers str/wstr->ptr in kernel32.spec.
This commit is contained in:
Marcus Meissner 1999-05-08 10:02:05 +00:00 committed by Alexandre Julliard
parent 1c971e3364
commit 264360fc21
2 changed files with 7 additions and 5 deletions

View File

@ -14,6 +14,7 @@
#include "winbase.h"
#include "wine/winbase16.h"
#include "winuser.h"
#include "winnls.h"
#include "file.h"
#include "heap.h"
#include "debug.h"
@ -1170,7 +1171,7 @@ INT WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer,
LeaveCriticalSection( &PROFILE_CritSect );
return 0;
return ret;
}
/***********************************************************************
@ -1186,6 +1187,7 @@ INT WINAPI GetPrivateProfileSectionW (LPCWSTR section, LPWSTR buffer,
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len );
INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len,
filenameA );
MultiByteToWideChar(CP_ACP,0,bufferA,ret,buffer,len);
HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, filenameA );
HeapFree( GetProcessHeap(), 0, bufferA);

View File

@ -379,10 +379,10 @@ init MAIN_KernelInit
361 stdcall GetPriorityClass(long) GetPriorityClass
362 stdcall GetPrivateProfileIntA(str str long str) GetPrivateProfileIntA
363 stdcall GetPrivateProfileIntW(wstr wstr long wstr) GetPrivateProfileIntW
364 stdcall GetPrivateProfileSectionA(str str long str) GetPrivateProfileSectionA
364 stdcall GetPrivateProfileSectionA(str ptr long str) GetPrivateProfileSectionA
365 stdcall GetPrivateProfileSectionNamesA(ptr long str) GetPrivateProfileSectionNamesA
366 stdcall GetPrivateProfileSectionNamesW(ptr long wstr) GetPrivateProfileSectionNamesW
367 stdcall GetPrivateProfileSectionW(wstr wstr long wstr) GetPrivateProfileSectionW
367 stdcall GetPrivateProfileSectionW(wstr ptr long wstr) GetPrivateProfileSectionW
368 stdcall GetPrivateProfileStringA(str str str ptr long str) GetPrivateProfileStringA
369 stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) GetPrivateProfileStringW
370 stdcall GetPrivateProfileStructA (str str ptr long str) GetPrivateProfileStructA
@ -399,8 +399,8 @@ init MAIN_KernelInit
381 stub GetProductName
382 stdcall GetProfileIntA(str str long) GetProfileIntA
383 stdcall GetProfileIntW(wstr wstr long) GetProfileIntW
384 stdcall GetProfileSectionA(str str long) GetProfileSectionA
385 stdcall GetProfileSectionW(wstr wstr long) GetProfileSectionW
384 stdcall GetProfileSectionA(str ptr long) GetProfileSectionA
385 stdcall GetProfileSectionW(wstr ptr long) GetProfileSectionW
386 stdcall GetProfileStringA(str str str ptr long) GetProfileStringA
387 stdcall GetProfileStringW(wstr wstr wstr ptr long) GetProfileStringW
388 stub GetQueuedCompletionStatus