From 85a7ff4090a08a84c897c75b63a7201b7cb6d725 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 11 Oct 1998 19:10:10 +0000 Subject: [PATCH] GlobalFix16 is supposed to return selector to the memory area. --- include/windows.h | 2 +- memory/global.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/windows.h b/include/windows.h index 0bc876cc741..9efad10eb23 100644 --- a/include/windows.h +++ b/include/windows.h @@ -8234,7 +8234,7 @@ UINT32 WINAPI GlobalGetAtomName32W(ATOM,LPWSTR,INT32); DWORD WINAPI GlobalHandle16(WORD); HGLOBAL32 WINAPI GlobalHandle32(LPCVOID); #define GlobalHandle WINELIB_NAME(GlobalHandle) -VOID WINAPI GlobalFix16(HGLOBAL16); +WORD WINAPI GlobalFix16(HGLOBAL16); VOID WINAPI GlobalFix32(HGLOBAL32); #define GlobalFix WINELIB_NAME(GlobalFix) LPVOID WINAPI GlobalLock16(HGLOBAL16); diff --git a/memory/global.c b/memory/global.c index 799eb9f4556..80411ce6332 100644 --- a/memory/global.c +++ b/memory/global.c @@ -808,14 +808,16 @@ WORD WINAPI GlobalPageUnlock( HGLOBAL16 handle ) /*********************************************************************** * GlobalFix16 (KERNEL.197) */ -void WINAPI GlobalFix16( HGLOBAL16 handle ) +WORD WINAPI GlobalFix16( HGLOBAL16 handle ) { TRACE(global, "%04x\n", handle ); if (!VALID_HANDLE(handle)) { WARN(global,"Invalid handle 0x%04x passed to GlobalFix16!\n",handle); - return; + return 0; } GET_ARENA_PTR(handle)->lockCount++; + + return GlobalHandleToSel(handle); }