Commit 0c4be325 authored by Dimi Paun's avatar Dimi Paun Committed by Alexandre Julliard

Remove the LOCAL_*() function calls from KERNEL.

parent 43201e07
......@@ -33,7 +33,6 @@
#include "wine/winbase16.h"
#include "winerror.h"
#include "thread.h"
#include "local.h"
#include "tlhelp32.h"
#include "toolhelp.h"
#include "wine/server.h"
......@@ -178,10 +177,15 @@ BOOL16 WINAPI TimerCount16( TIMERINFO *pTimerInfo )
*/
BOOL16 WINAPI SystemHeapInfo16( SYSHEAPINFO *pHeapInfo )
{
STACK16FRAME* stack16 = MapSL((SEGPTR)NtCurrentTeb()->WOW32Reserved);
HANDLE16 oldDS = stack16->ds;
WORD user = LoadLibrary16( "USER.EXE" );
WORD gdi = LoadLibrary16( "GDI.EXE" );
pHeapInfo->wUserFreePercent = (int)LOCAL_CountFree(user) * 100 / LOCAL_HeapSize(user);
pHeapInfo->wGDIFreePercent = (int)LOCAL_CountFree(gdi) * 100 / LOCAL_HeapSize(gdi);
stack16->ds = user;
pHeapInfo->wUserFreePercent = (int)LocalCountFree16() * 100 / LocalHeapSize16();
stack16->ds = gdi;
pHeapInfo->wGDIFreePercent = (int)LocalCountFree16() * 100 / LocalHeapSize16();
stack16->ds = oldDS;
pHeapInfo->hUserSegment = user;
pHeapInfo->hGDISegment = gdi;
FreeLibrary16( user );
......
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