Commit 264360fc authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Return the correct value from GetPrivateProfileSectionA.

Copy/convert back the buffer in GetPrivateProfileSectionW. Replace some output pointers str/wstr->ptr in kernel32.spec.
parent 1c971e33
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "winbase.h" #include "winbase.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "winuser.h" #include "winuser.h"
#include "winnls.h"
#include "file.h" #include "file.h"
#include "heap.h" #include "heap.h"
#include "debug.h" #include "debug.h"
...@@ -1170,7 +1171,7 @@ INT WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer, ...@@ -1170,7 +1171,7 @@ INT WINAPI GetPrivateProfileSectionA( LPCSTR section, LPSTR buffer,
LeaveCriticalSection( &PROFILE_CritSect ); LeaveCriticalSection( &PROFILE_CritSect );
return 0; return ret;
} }
/*********************************************************************** /***********************************************************************
...@@ -1186,6 +1187,7 @@ INT WINAPI GetPrivateProfileSectionW (LPCWSTR section, LPWSTR buffer, ...@@ -1186,6 +1187,7 @@ INT WINAPI GetPrivateProfileSectionW (LPCWSTR section, LPWSTR buffer,
LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len ); LPSTR bufferA = HeapAlloc( GetProcessHeap(), 0, len );
INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len, INT ret = GetPrivateProfileSectionA( sectionA, bufferA, len,
filenameA ); filenameA );
MultiByteToWideChar(CP_ACP,0,bufferA,ret,buffer,len);
HeapFree( GetProcessHeap(), 0, sectionA ); HeapFree( GetProcessHeap(), 0, sectionA );
HeapFree( GetProcessHeap(), 0, filenameA ); HeapFree( GetProcessHeap(), 0, filenameA );
HeapFree( GetProcessHeap(), 0, bufferA); HeapFree( GetProcessHeap(), 0, bufferA);
......
...@@ -379,10 +379,10 @@ init MAIN_KernelInit ...@@ -379,10 +379,10 @@ init MAIN_KernelInit
361 stdcall GetPriorityClass(long) GetPriorityClass 361 stdcall GetPriorityClass(long) GetPriorityClass
362 stdcall GetPrivateProfileIntA(str str long str) GetPrivateProfileIntA 362 stdcall GetPrivateProfileIntA(str str long str) GetPrivateProfileIntA
363 stdcall GetPrivateProfileIntW(wstr wstr long wstr) GetPrivateProfileIntW 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 365 stdcall GetPrivateProfileSectionNamesA(ptr long str) GetPrivateProfileSectionNamesA
366 stdcall GetPrivateProfileSectionNamesW(ptr long wstr) GetPrivateProfileSectionNamesW 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 368 stdcall GetPrivateProfileStringA(str str str ptr long str) GetPrivateProfileStringA
369 stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) GetPrivateProfileStringW 369 stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) GetPrivateProfileStringW
370 stdcall GetPrivateProfileStructA (str str ptr long str) GetPrivateProfileStructA 370 stdcall GetPrivateProfileStructA (str str ptr long str) GetPrivateProfileStructA
...@@ -399,8 +399,8 @@ init MAIN_KernelInit ...@@ -399,8 +399,8 @@ init MAIN_KernelInit
381 stub GetProductName 381 stub GetProductName
382 stdcall GetProfileIntA(str str long) GetProfileIntA 382 stdcall GetProfileIntA(str str long) GetProfileIntA
383 stdcall GetProfileIntW(wstr wstr long) GetProfileIntW 383 stdcall GetProfileIntW(wstr wstr long) GetProfileIntW
384 stdcall GetProfileSectionA(str str long) GetProfileSectionA 384 stdcall GetProfileSectionA(str ptr long) GetProfileSectionA
385 stdcall GetProfileSectionW(wstr wstr long) GetProfileSectionW 385 stdcall GetProfileSectionW(wstr ptr long) GetProfileSectionW
386 stdcall GetProfileStringA(str str str ptr long) GetProfileStringA 386 stdcall GetProfileStringA(str str str ptr long) GetProfileStringA
387 stdcall GetProfileStringW(wstr wstr wstr ptr long) GetProfileStringW 387 stdcall GetProfileStringW(wstr wstr wstr ptr long) GetProfileStringW
388 stub GetQueuedCompletionStatus 388 stub GetQueuedCompletionStatus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment