Index: trunk/src/kernel32/HandleManager.cpp
===================================================================
--- trunk/src/kernel32/HandleManager.cpp	(revision 527)
+++ trunk/src/kernel32/HandleManager.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: HandleManager.cpp,v 1.8 1999-08-09 22:10:07 phaller Exp $ */
+/* $Id: HandleManager.cpp,v 1.9 1999-08-17 16:35:08 phaller Exp $ */
 
 /*
@@ -46,5 +46,4 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odincrt.h>
 
 #include "unicode.h"
@@ -310,10 +309,8 @@
 
                         /* create handle manager instance for Open32 handles */
-    ODIN_FS_BEGIN
     HMGlobals.pHMOpen32     = new HMDeviceOpen32Class("\\\\.\\");
     HMGlobals.pHMEvent      = new HMDeviceEventClass("\\\\EVENT\\");
     HMGlobals.pHMMutex      = new HMDeviceMutexClass("\\\\MUTEX\\");
     HMGlobals.pHMSemaphore  = new HMDeviceSemaphoreClass("\\\\SEM\\");
-    ODIN_FS_END
   }
   return (NO_ERROR);
@@ -337,10 +334,8 @@
   /* @@@PH we could deallocate the device list here */
 
-  ODIN_FS_BEGIN
   delete HMGlobals.pHMOpen32;
   delete HMGlobals.pHMEvent;
   delete HMGlobals.pHMMutex;
   delete HMGlobals.pHMSemaphore;
-  ODIN_FS_END
 
   return (NO_ERROR);
Index: trunk/src/kernel32/KERNEL32.CPP
===================================================================
--- trunk/src/kernel32/KERNEL32.CPP	(revision 527)
+++ trunk/src/kernel32/KERNEL32.CPP	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: KERNEL32.CPP,v 1.12 1999-08-09 22:38:01 phaller Exp $ */
+/* $Id: KERNEL32.CPP,v 1.13 1999-08-17 16:35:09 phaller Exp $ */
 
 /*
@@ -26,5 +26,5 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odincrt.h>
+//#include <odincrt.h>
 
 #include "misc.h"
Index: trunk/src/kernel32/heap.cpp
===================================================================
--- trunk/src/kernel32/heap.cpp	(revision 527)
+++ trunk/src/kernel32/heap.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: heap.cpp,v 1.11 1999-08-10 12:43:22 phaller Exp $ */
+/* $Id: heap.cpp,v 1.12 1999-08-17 16:35:09 phaller Exp $ */
 
 /*
@@ -16,5 +16,4 @@
 #define  _WIN32
 #include "os2heap.h"
-#include <odincrt.h>
 #include <heap.h>
 
@@ -67,7 +66,5 @@
     return(NULL);
 
-  ODIN_FS_BEGIN
   curheap = new OS2Heap(hHeap, flOptions, dwInitialSize, dwMaximumSize);
-  ODIN_FS_END
 
   if(curheap == NULL)
@@ -80,5 +77,5 @@
   {
     O32_HeapDestroy(hHeap);
-    ODIN_delete(curheap);
+    delete(curheap);
     return(NULL);
   }
@@ -95,5 +92,5 @@
 
   O32_HeapDestroy(curheap->getHeapHandle());
-  ODIN_delete(curheap);
+  delete curheap;
   return(TRUE);
 }
@@ -157,7 +154,5 @@
       hHeap = O32_HeapCreate(HEAP_GENERATE_EXCEPTIONS, 1, 0x4000);
 
-      ODIN_FS_BEGIN
       OS2ProcessHeap = new OS2Heap(hHeap, HEAP_GENERATE_EXCEPTIONS, 0x4000, 0);
-      ODIN_FS_END
 
       if(OS2ProcessHeap == NULL) {
Index: trunk/src/kernel32/initterm.cpp
===================================================================
--- trunk/src/kernel32/initterm.cpp	(revision 527)
+++ trunk/src/kernel32/initterm.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: initterm.cpp,v 1.9 1999-08-16 16:55:32 sandervl Exp $ */
+/* $Id: initterm.cpp,v 1.10 1999-08-17 16:35:09 phaller Exp $ */
 
 /*
@@ -28,5 +28,5 @@
 #define  INCL_DOSMISC
 #define  INCL_DOSPROCESS
-#include <os2wrap.h>	//Odin32 OS/2 api wrappers
+#include <os2wrap.h>    //Odin32 OS/2 api wrappers
 #include <stdlib.h>
 #include <stdio.h>
@@ -35,4 +35,5 @@
 #include <wprocess.h>
 #include "handlemanager.h"
+#include "profile.h"
 
 /*-------------------------------------------------------------------*/
@@ -106,8 +107,8 @@
             else   flAllocMem = 0;        // no high memory support
 
-	    InitializeTIB(TRUE);
-	    //SvL: Do it here instead of during the exe object creation
-	    //(std handles can be used in win32 dll initialization routines
-	    HMInitialize();             /* store standard handles within HandleManager */
+            InitializeTIB(TRUE);
+            //SvL: Do it here instead of during the exe object creation
+            //(std handles can be used in win32 dll initialization routines
+            HMInitialize();             /* store standard handles within HandleManager */
             break;
         case 1 :
@@ -127,4 +128,5 @@
 {
     dprintf(("kernel32 exit %d\n", ulReason));
+    WriteOutProfiles();
     _ctordtorTerm();
     DestroyTIB();
Index: trunk/src/kernel32/os2heap.cpp
===================================================================
--- trunk/src/kernel32/os2heap.cpp	(revision 527)
+++ trunk/src/kernel32/os2heap.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: os2heap.cpp,v 1.6 1999-08-09 22:10:08 phaller Exp $ */
+/* $Id: os2heap.cpp,v 1.7 1999-08-17 16:35:09 phaller Exp $ */
 
 /*
@@ -17,5 +17,4 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odincrt.h>
 
 #include "win32type.h"
@@ -54,7 +53,5 @@
   if(!(flOptions & HEAP_NO_SERIALIZE))
   {
-    ODIN_FS_BEGIN
     hmutex = new VMutex();
-    ODIN_FS_END
     dassert(hmutex, ("ERROR: new VMutex\n"));
   }
@@ -94,5 +91,5 @@
   {
     hmutex->leave();
-    ODIN_delete(hmutex);
+    delete hmutex;
   }
 
Index: trunk/src/kernel32/profile.cpp
===================================================================
--- trunk/src/kernel32/profile.cpp	(revision 527)
+++ trunk/src/kernel32/profile.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: profile.cpp,v 1.8 1999-08-06 12:14:12 phaller Exp $ */
+/* $Id: profile.cpp,v 1.9 1999-08-17 16:35:10 phaller Exp $ */
 
 /*
@@ -10,4 +10,5 @@
  * Copyright 1998 Sander van Leeuwen (sandervl@xs4all.nl)
  * Copyright 1998 Patrick Haller
+ * Copyright 1999 Christoph Bratschi
  */
 
@@ -63,5 +64,6 @@
     BOOL             changed;
     PROFILESECTION  *section;
-    char            *filename;
+    char            *filename; //first open name
+    char            *fullname; //name with path
     time_t           mtime;
 } PROFILE;
@@ -79,4 +81,5 @@
 
 #define PROFILE_MAX_LINE_LEN   1024
+#define WINININAME "WIN.INI"
 
 /* Wine profile name in $HOME directory; must begin with slash */
@@ -91,5 +94,5 @@
 #define WINE_INI_GLOBAL ETCDIR "/wine.conf"
 
-static LPCWSTR wininiW = NULL;
+static LPCWSTR wininiW = NULL; //CB: never freed
 
 static CRITICAL_SECTION PROFILE_CritSect;
@@ -398,16 +401,16 @@
 
     // try to open file
-    file = fopen(CurProfile->filename, "w");
+    file = fopen(CurProfile->fullname, "w");
     if (!file)
     {
-        dprintf(("Kernel32:Profile:could not save profile file %s\n", CurProfile->filename));
+        dprintf(("Kernel32:Profile:could not save profile file %s\n", CurProfile->fullname));
         return FALSE;
     }
 
-    dprintf(("Kernel32:Profile:Saving %s\n", CurProfile->filename ));
+    dprintf(("Kernel32:Profile:Saving %s\n", CurProfile->fullname ));
     PROFILE_Save( file, CurProfile->section );
     fclose( file );
     CurProfile->changed = FALSE;
-    if(!stat(CurProfile->filename,&buf))
+    if(!stat(CurProfile->fullname,&buf))
        CurProfile->mtime=buf.st_mtime;
     return TRUE;
@@ -425,7 +428,9 @@
     PROFILE_Free( CurProfile->section );
     if (CurProfile->filename) HeapFree( SystemHeap, 0, CurProfile->filename );
+    if (CurProfile->fullname) HeapFree(SystemHeap,0,CurProfile->fullname);
     CurProfile->changed   = FALSE;
     CurProfile->section   = NULL;
     CurProfile->filename  = NULL;
+    CurProfile->fullname  = NULL;
     CurProfile->mtime     = 0;
 }
@@ -439,9 +444,10 @@
 static BOOL PROFILE_Open( LPCSTR filename )
 {
-    char buffer[MAX_PATHNAME_LEN];
     FILE *file = NULL;
     int i,j;
     struct stat buf;
     PROFILE *tempProfile;
+
+    if (!filename || filename[0] == 0) return FALSE;
 
     /* First time around */
@@ -454,4 +460,5 @@
           MRUProfile[i]->section=NULL;
           MRUProfile[i]->filename=NULL;
+          MRUProfile[i]->fullname=NULL;
           MRUProfile[i]->mtime=0;
          }
@@ -459,16 +466,7 @@
     /* Check for a match */
 
-    if (!strchr( filename, '/' ) &&
-        !strchr( filename, '\\' ) &&
-        !strchr( filename, ':' ))
-    {
-        GetWindowsDirectoryA( buffer, sizeof(buffer) );
-        strcat( buffer, "\\" );
-        strcat( buffer, filename );
-    }
-
     for(i=0;i<N_CACHED_PROFILES;i++)
       {
-       if ((MRUProfile[i]->filename && !strcmp( filename, MRUProfile[i]->filename )))
+       if (MRUProfile[i]->filename && (!strcmp(filename,MRUProfile[i]->filename) || !strcmp(filename,MRUProfile[i]->fullname)))
          {
           if(i)
@@ -480,5 +478,5 @@
              CurProfile=tempProfile;
             }
-          if(!stat(CurProfile->filename,&buf) && CurProfile->mtime==buf.st_mtime)
+          if(!stat(CurProfile->fullname,&buf) && CurProfile->mtime==buf.st_mtime)
              dprintf(("Kernel32:Profile:(%s): already opened (mru=%d)\n",
                               filename, i ));
@@ -504,15 +502,29 @@
     if(CurProfile->filename) PROFILE_ReleaseFile();
 
-    CurProfile->filename  = HEAP_strdupA( SystemHeap, 0, filename );
-
-    file = fopen( filename, "r" );
+    CurProfile->filename  = HEAP_strdupA(SystemHeap,0,filename);
+
+    /* check for path */
+
+    if (!strchr( filename,'/') ||
+        !strchr( filename,'\\') ||
+        !strchr( filename,':'))
+    {
+      char fullname[MAX_PATHNAME_LEN];
+
+      GetWindowsDirectoryA(fullname,sizeof(fullname));
+      strcat(fullname,"\\");
+      strcat(fullname,filename);
+      CurProfile->fullname  = HEAP_strdupA(SystemHeap,0,fullname);
+    } else CurProfile->fullname  = HEAP_strdupA(SystemHeap,0,filename);
+
+    file = fopen(CurProfile->fullname,"r");
     if (file)
     {
       dprintf(("Kernel32:Profile:(%s): found it in %s\n",
-               filename, filename ));
+               filename, CurProfile->fullname ));
 
         CurProfile->section = PROFILE_Load( file );
         fclose( file );
-        if(!stat(CurProfile->filename,&buf))
+        if(!stat(CurProfile->fullname,&buf))
            CurProfile->mtime=buf.st_mtime;
     }
@@ -520,5 +532,5 @@
     {
         /* Does not exist yet, we will create it in PROFILE_FlushFile */
-        dprintf(("Kernel32:Profile:profile file %s not found\n", filename ));
+        dprintf(("Kernel32:Profile:profile file %s not found\n", CurProfile->fullname ));
     }
     return TRUE;
@@ -966,5 +978,5 @@
 UINT WINAPI GetProfileIntA( LPCSTR section, LPCSTR entry, INT def_val )
 {
-    return GetPrivateProfileIntA( section, entry, def_val, "win.ini" );
+    return GetPrivateProfileIntA( section, entry, def_val, WINININAME );
 }
 
@@ -974,5 +986,5 @@
 UINT WINAPI GetProfileIntW( LPCWSTR section, LPCWSTR entry, INT def_val )
 {
-    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
+    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME );
     return GetPrivateProfileIntW( section, entry, def_val, wininiW );
 }
@@ -985,5 +997,5 @@
 {
     return GetPrivateProfileStringA( section, entry, def_val,
-                 buffer, len, "win.ini" );
+                 buffer, len, WINININAME );
 }
 
@@ -994,5 +1006,5 @@
                LPCWSTR def_val, LPWSTR buffer, UINT len )
 {
-    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
+    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME );
     return GetPrivateProfileStringW( section, entry, def_val,
                  buffer, len, wininiW );
@@ -1005,5 +1017,5 @@
              LPCSTR string )
 {
-    return WritePrivateProfileStringA( section, entry, string, "win.ini" );
+    return WritePrivateProfileStringA( section, entry, string, WINININAME );
 }
 
@@ -1014,5 +1026,5 @@
                                      LPCWSTR string )
 {
-    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
+    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME );
     return WritePrivateProfileStringW( section, entry, string, wininiW );
 }
@@ -1062,5 +1074,5 @@
 
     if (!filename)
-   filename = "win.ini";
+   filename = WINININAME;
 
     EnterCriticalSection( &PROFILE_CritSect );
@@ -1145,5 +1157,5 @@
 INT WINAPI GetProfileSectionA( LPCSTR section, LPSTR buffer, DWORD len )
 {
-    return GetPrivateProfileSectionA( section, buffer, len, "win.ini" );
+    return GetPrivateProfileSectionA( section, buffer, len, WINININAME );
 }
 
@@ -1153,5 +1165,5 @@
 INT WINAPI GetProfileSectionW( LPCWSTR section, LPWSTR buffer, DWORD len )
 {
-    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini" );
+    if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME );
     return GetPrivateProfileSectionW( section, buffer, len, wininiW );
 }
@@ -1233,5 +1245,5 @@
 
 {
-    return WritePrivateProfileSectionA( section, keys_n_values, "win.ini");
+    return WritePrivateProfileSectionA( section, keys_n_values, WINININAME);
 }
 
@@ -1241,5 +1253,5 @@
 BOOL WINAPI WriteProfileSectionW( LPCWSTR section, LPCWSTR keys_n_values)
 {
-   if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, "win.ini");
+   if (!wininiW) wininiW = HEAP_strdupAtoW( SystemHeap, 0, WINININAME);
 
    return (WritePrivateProfileSectionW (section,keys_n_values, wininiW));
@@ -1375,2 +1387,28 @@
     return ret;
 }
+
+/***********************************************************************
+ *           WriteOutProfiles   (KERNEL.315)
+ * CB: original: 16 bit function
+ *     here: necessary to save open ini files
+ */
+void WINAPI WriteOutProfiles(void)
+{
+    PROFILE *lastCurProfile;
+    INT x;
+
+    EnterCriticalSection(&PROFILE_CritSect);
+    PROFILE_FlushFile(); //flash current
+    lastCurProfile = CurProfile;
+    for(x = 1;x < N_CACHED_PROFILES;x++)
+    {
+      if (MRUProfile[x]->filename)
+      {
+        CurProfile = MRUProfile[x];
+        PROFILE_FlushFile();
+      }
+    }
+    CurProfile = lastCurProfile;
+    LeaveCriticalSection(&PROFILE_CritSect);
+}
+
Index: trunk/src/kernel32/profile.h
===================================================================
--- trunk/src/kernel32/profile.h	(revision 529)
+++ trunk/src/kernel32/profile.h	(revision 529)
@@ -0,0 +1,13 @@
+/* $Id */
+/*
+ * Profile header for initterm
+ * Copyright 1999 Christoph Bratschi
+ * Project Odin Software License can be found in LICENSE.TXT
+ */
+
+#ifndef __PROFILE_H__
+#define __PROFILE_H__
+
+void WINAPI WriteOutProfiles(void);
+
+#endif
Index: trunk/src/kernel32/thread.cpp
===================================================================
--- trunk/src/kernel32/thread.cpp	(revision 527)
+++ trunk/src/kernel32/thread.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: thread.cpp,v 1.8 1999-08-09 22:10:08 phaller Exp $ */
+/* $Id: thread.cpp,v 1.9 1999-08-17 16:35:10 phaller Exp $ */
 
 /*
@@ -12,5 +12,5 @@
 #include <os2win.h>
 #include <stdarg.h>
-#include <odincrt.h>
+//#include <odincrt.h>
 #include "thread.h"
 #include "except.h"
@@ -32,7 +32,5 @@
  Win32Thread *winthread;
 
- ODIN_FS_BEGIN
  winthread = new Win32Thread(lpStartAddr, lpvThreadParm, fdwCreate);
- ODIN_FS_END
 
   if(winthread == 0)
@@ -162,5 +160,5 @@
  DWORD            rc;
 
- ODIN_delete(me)    //only called once
+ delete(me);    //only called once
 
   dprintf(("Win32ThreadProc %d\n", GetCurrentThreadId()));
Index: trunk/src/kernel32/winimage.cpp
===================================================================
--- trunk/src/kernel32/winimage.cpp	(revision 527)
+++ trunk/src/kernel32/winimage.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: winimage.cpp,v 1.7 1999-08-11 22:27:56 phaller Exp $ */
+/* $Id: winimage.cpp,v 1.8 1999-08-17 16:35:10 phaller Exp $ */
 
 /*
@@ -24,6 +24,4 @@
 #include <string.h>
 #include <stdlib.h>
-
-#include <odincrt.h>
 
 //#include <iostream.h>
@@ -146,5 +144,5 @@
   {
     res    = winres->next;
-    ODIN_delete(winres);
+    delete winres;
     winres = res;
   }
@@ -983,7 +981,5 @@
     if(WinDll == NULL)
      {  //not found, so load it
-        ODIN_FS_BEGIN
         WinDll = new Win32Dll(pszCurModule);
-        ODIN_FS_END
 
         if(WinDll == NULL) {
Index: trunk/src/kernel32/winimgres.cpp
===================================================================
--- trunk/src/kernel32/winimgres.cpp	(revision 527)
+++ trunk/src/kernel32/winimgres.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: winimgres.cpp,v 1.5 1999-08-09 22:55:11 phaller Exp $ */
+/* $Id: winimgres.cpp,v 1.6 1999-08-17 16:35:11 phaller Exp $ */
 
 /*
@@ -16,5 +16,4 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odincrt.h>
 
 #include "misc.h"
@@ -161,7 +160,6 @@
         unicodestr += *unicodestr;
     }
-    ODIN_FS_BEGIN
+
     res = new Win32Resource(this, id, NTRT_STRING, (ULONG)*unicodestr, (char *)unicodestr);
-    ODIN_FS_END
     if(res == NULL) {
         dprintf(("new Win32Resource failed!\n"));
@@ -170,7 +168,5 @@
   }
   else
-    ODIN_FS_BEGIN
     res = new Win32Resource(this, id, type, pData->Size, resdata);
-    ODIN_FS_END
 
   return res;
@@ -307,7 +303,5 @@
     if(hres)
     {
-      ODIN_FS_BEGIN
       res = new Win32Resource(this, hres, (ULONG)lpszName, (ULONG)szType);
-      ODIN_FS_END
     }
 
@@ -316,7 +310,5 @@
       if(hres)
       {
-         ODIN_FS_BEGIN
          res = new Win32Resource(this, hres, (ULONG)lpszName, (ULONG)szType);
-         ODIN_FS_END
       }
       else    dprintf(("FindResourceA can't find string %d\n", (int)lpszName));
@@ -408,7 +400,5 @@
     if(hres)
     {
-      ODIN_FS_BEGIN
       res = new Win32Resource(this, hres, (ULONG)lpszName, (ULONG)szType);
-      ODIN_FS_END
     }
 
@@ -417,7 +407,5 @@
       if(hres)
       {
-        ODIN_FS_BEGIN
         res = new Win32Resource(this, hres, (ULONG)lpszName, (ULONG)szType);
-        ODIN_FS_END
       }
       else    dprintf(("FindResourceW can't find string %d\n", (int)lpszName));
Index: trunk/src/kernel32/wprocess.cpp
===================================================================
--- trunk/src/kernel32/wprocess.cpp	(revision 527)
+++ trunk/src/kernel32/wprocess.cpp	(revision 529)
@@ -1,3 +1,3 @@
-/* $Id: wprocess.cpp,v 1.18 1999-08-11 22:27:56 phaller Exp $ */
+/* $Id: wprocess.cpp,v 1.19 1999-08-17 16:35:11 phaller Exp $ */
 
 /*
@@ -14,5 +14,4 @@
 #include <stdlib.h>
 #include <string.h>
-#include <odincrt.h>
 #include <odinwrap.h>
 
@@ -43,6 +42,4 @@
 extern "C" ULONG QueryExceptionChain();
 
-
-ODINDEBUGCHANNEL(KERNEL32-WPROCESS)
 
 //******************************************************************************
@@ -211,5 +208,5 @@
 {
   if(WinExe != NULL) //should never happen
-    ODIN_delete(WinExe);
+    delete WinExe;
 
 
@@ -223,7 +220,5 @@
   Win32Exe *winexe;
 
-  ODIN_FS_BEGIN
   winexe = new Win32Exe(0, NameTableId, Win32TableId);
-  ODIN_FS_END
 
   if(winexe) {
@@ -288,7 +283,5 @@
    else {
       //converted win32 dll loaded by OS/2 loader
-      ODIN_FS_BEGIN
       winmod = new Win32Dll(hinstance, NameTableId, Win32TableId, pfnDllEntry);
-      ODIN_FS_END
       if(winmod == NULL) {
             eprintf(("Failed to allocate module object!\n"));
@@ -328,5 +321,5 @@
 
   if(WinExe) {
-    ODIN_delete(WinExe);
+    delete WinExe;
     WinExe = NULL;
   }
@@ -400,7 +393,5 @@
     }
 
-    ODIN_FS_BEGIN
     module = new Win32Dll((char *)lpszLibFile);
-    ODIN_FS_END
     if(module == NULL)
         return(0);
@@ -409,10 +400,10 @@
     if(module->getError() != NO_ERROR) {
         dprintf(("LoadLibary %s failed (::init)\n", lpszLibFile));
-        ODIN_delete(module);
+        delete module;
         return(0);
     }
     if(module->attachProcess() == FALSE) {
         dprintf(("LoadLibary %s failed (::attachProcess)\n", lpszLibFile));
-        ODIN_delete(module);
+        delete module;
         return(0);
     }
@@ -425,6 +416,5 @@
 
 
-ODINFUNCTION1(HINSTANCE,LoadLibraryA,LPCTSTR,lpszLibFile)
-//HINSTANCE WIN32API LoadLibraryA(LPCTSTR lpszLibFile)
+HINSTANCE WIN32API LoadLibraryA(LPCTSTR lpszLibFile)
 {
   HINSTANCE hDll;
@@ -474,8 +464,5 @@
     }
 
-    ODIN_FS_BEGIN
     module = new Win32Dll((char *)lpszLibFile);
-    ODIN_FS_END
-
     if(module == NULL)
         return(0);
@@ -484,5 +471,5 @@
     if(module->getError() != NO_ERROR) {
         dprintf(("LoadLibary %s failed (::init)\n", lpszLibFile));
-        ODIN_delete(module);
+        delete module;
         return(0);
     }
@@ -492,5 +479,5 @@
     if(module->attachProcess() == FALSE) {
         dprintf(("LoadLibary %s failed (::attachProcess)\n", lpszLibFile));
-        ODIN_delete(module);
+        delete module;
         return(0);
     }
