Replaced GLOBAL_Alloc by GlobalAlloc16 where possible.

diff --git a/loader/ne/module.c b/loader/ne/module.c
index eda0be7..c473cde 100644
--- a/loader/ne/module.c
+++ b/loader/ne/module.c
@@ -19,7 +19,6 @@
 #include "file.h"
 #include "heap.h"
 #include "task.h"
-#include "global.h"
 #include "snoop.h"
 #include "builtin16.h"
 #include "stackframe.h"
@@ -710,13 +709,13 @@
 
     if (ne_header.ne_cbnrestab)
     {
-        pModule->nrname_handle = GLOBAL_Alloc( 0, ne_header.ne_cbnrestab,
-                                               hModule, WINE_LDT_FLAGS_DATA );
+        pModule->nrname_handle = GlobalAlloc16( 0, ne_header.ne_cbnrestab );
         if (!pModule->nrname_handle)
         {
             GlobalFree16( hModule );
             return (HMODULE16)11;  /* invalid exe */
         }
+        FarSetOwner16( pModule->nrname_handle, hModule );
         buffer = GlobalLock16( pModule->nrname_handle );
         _llseek( hFile, ne_header.ne_nrestab, SEEK_SET );
         if (_lread( hFile, buffer, ne_header.ne_cbnrestab )
@@ -733,15 +732,15 @@
 
     if (pModule->modref_count)
     {
-        pModule->dlls_to_init = GLOBAL_Alloc(GMEM_ZEROINIT,
-                                    (pModule->modref_count+1)*sizeof(HMODULE16),
-                                    hModule, WINE_LDT_FLAGS_DATA );
+        pModule->dlls_to_init = GlobalAlloc16( GMEM_ZEROINIT,
+                                               (pModule->modref_count+1)*sizeof(HMODULE16) );
         if (!pModule->dlls_to_init)
         {
             if (pModule->nrname_handle) GlobalFree16( pModule->nrname_handle );
             GlobalFree16( hModule );
             return (HMODULE16)11;  /* invalid exe */
         }
+        FarSetOwner16( pModule->dlls_to_init, hModule );
     }
     else pModule->dlls_to_init = 0;
 
diff --git a/loader/ne/resource.c b/loader/ne/resource.c
index 835f935..799e939 100644
--- a/loader/ne/resource.c
+++ b/loader/ne/resource.c
@@ -17,7 +17,6 @@
 #include "wine/port.h"
 #include "wine/winbase16.h"
 #include "wine/library.h"
-#include "global.h"
 #include "module.h"
 #include "callback.h"
 #include "debugtools.h"
@@ -367,6 +366,7 @@
 {
     NE_NAMEINFO *pNameInfo=NULL;
     WORD sizeShift;
+    HGLOBAL16 ret;
 
     NE_MODULE *pModule = NE_GetPtr( hModule );
     if (!pModule || !pModule->res_table || !hRsrc) return 0;
@@ -377,7 +377,9 @@
     pNameInfo = (NE_NAMEINFO*)((char*)pModule + hRsrc);
     if (size < (DWORD)pNameInfo->length << sizeShift)
         size = (DWORD)pNameInfo->length << sizeShift;
-    return GLOBAL_Alloc( GMEM_FIXED, size, hModule, WINE_LDT_FLAGS_DATA );
+    ret = GlobalAlloc16( GMEM_FIXED, size );
+    if (ret) FarSetOwner16( ret, hModule );
+    return ret;
 }
 
 
@@ -389,13 +391,15 @@
 HGLOBAL16 WINAPI DirectResAlloc16( HINSTANCE16 hInstance, WORD wType,
                                  UINT16 wSize )
 {
-    TRACE("(%04x,%04x,%04x)\n",
-                     hInstance, wType, wSize );
+    HGLOBAL16 ret;
+    TRACE("(%04x,%04x,%04x)\n", hInstance, wType, wSize );
     if (!(hInstance = GetExePtr( hInstance ))) return 0;
     if(wType != 0x10)	/* 0x10 is the only observed value, passed from
                            CreateCursorIndirect. */
         TRACE("(wType=%x)\n", wType);
-    return GLOBAL_Alloc(GMEM_MOVEABLE, wSize, hInstance, WINE_LDT_FLAGS_DATA );
+    ret = GlobalAlloc16( GMEM_MOVEABLE, wSize );
+    if (ret) FarSetOwner16( ret, hInstance );
+    return ret;
 }
 
 
diff --git a/loader/task.c b/loader/task.c
index 14e1407..2192c15 100644
--- a/loader/task.c
+++ b/loader/task.c
@@ -226,10 +226,10 @@
 
       /* Allocate the task structure */
 
-    hTask = GLOBAL_Alloc( GMEM_FIXED | GMEM_ZEROINIT, sizeof(TDB),
-                          pModule->self, WINE_LDT_FLAGS_DATA );
+    hTask = GlobalAlloc16( GMEM_FIXED | GMEM_ZEROINIT, sizeof(TDB) );
     if (!hTask) return FALSE;
     pTask = (TDB *)GlobalLock16( hTask );
+    FarSetOwner16( hTask, pModule->self );
 
     /* Fill the task structure */