Index: trunk/src/kernel32/heap.cpp
===================================================================
--- trunk/src/kernel32/heap.cpp	(revision 21434)
+++ trunk/src/kernel32/heap.cpp	(revision 21435)
@@ -37,5 +37,5 @@
 {
   HANDLE _processheap;
-  
+
   //SvL: Only one process heap per process
   OS2ProcessHeap = new OS2Heap(HEAP_GENERATE_EXCEPTIONS, 0x4000, 0);
@@ -44,5 +44,5 @@
     return(NULL);
   _processheap = OS2ProcessHeap->getHeapHandle();
-  
+
   return _processheap;
 }
@@ -70,10 +70,10 @@
   else                               \
     curheap = OS2Heap::find(hHeap);  \
-  
-
-
-//******************************************************************************
-//******************************************************************************
-LPVOID WIN32API HeapAlloc(HANDLE hHeap, 
+
+
+
+//******************************************************************************
+//******************************************************************************
+LPVOID WIN32API HeapAlloc(HANDLE hHeap,
                           DWORD dwFlags,
                           DWORD dwBytes)
@@ -91,7 +91,7 @@
 //******************************************************************************
 //******************************************************************************
-LPVOID HeapReAlloc(HANDLE hHeap, 
+LPVOID HeapReAlloc(HANDLE hHeap,
                    DWORD dwFlags,
-                   LPVOID lpMem, 
+                   LPVOID lpMem,
                    DWORD dwBytes)
 {
@@ -110,5 +110,5 @@
 //******************************************************************************
 //******************************************************************************
-BOOL WIN32API HeapFree(HANDLE hHeap, 
+BOOL WIN32API HeapFree(HANDLE hHeap,
                        DWORD dwFlags,
                        LPVOID lpMem)
@@ -121,20 +121,20 @@
 
   BOOL fResult = curheap->Free(dwFlags, lpMem);
-  
+
   /* 2002-04-25 PH
    * Apparently, Win2k does not do this. It does not touch last error,
    * it does not even return FALSE but just anything != TRUE.
    *
-   
+
   if (fResult == FALSE)
     SetLastError(ERROR_INVALID_HANDLE);
-  
+
   */
-  
+
   return fResult;
 }
 //******************************************************************************
 //******************************************************************************
-HANDLE WIN32API HeapCreate(DWORD flOptions, DWORD dwInitialSize, 
+HANDLE WIN32API HeapCreate(DWORD flOptions, DWORD dwInitialSize,
                            DWORD dwMaximumSize)
 {
@@ -219,6 +219,7 @@
 BOOL WIN32API HeapWalk(HANDLE hHeap, LPVOID lpEntry)
 {
-  dprintf(("KERNEL32:  HeapWalk - stub (TRUE)\n"));
-  return(TRUE);
+  dprintf(("KERNEL32:  HeapWalk - stub (FALSE, ERROR_CALL_NOT_IMPLEMENTED)\n"));
+  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+  return(FALSE);
 }
 //******************************************************************************
@@ -232,10 +233,10 @@
  * Win32 Global heap functions (GlobalXXX).
  * These functions included in Win32 for compatibility with 16 bit Windows
- * Especially the moveable blocks and handles are oldish. 
+ * Especially the moveable blocks and handles are oldish.
  * But the ability to directly allocate memory with GPTR and LPTR is widely
  * used.
  *
  * The handle stuff looks horrible, but it's implemented almost like Win95
- * does it. 
+ * does it.
  *
  */
@@ -280,5 +281,5 @@
    else
       hpflags=0;
-    
+
    if((flags & GMEM_MOVEABLE)==0) /* POINTER */
    {
@@ -308,7 +309,7 @@
       pintern->Flags=flags>>8;
       pintern->LockCount=0;
-      
+
       /* HeapUnlock(heap); */
-       
+
       return INTERN_TO_HANDLE(pintern);
    }
@@ -340,5 +341,5 @@
 
    /* HeapLock(GETPROCESSHEAP); */
-   
+
    pintern=HANDLE_TO_INTERN(hmem);
    if(pintern->Magic==MAGIC_GLOBAL_USED)
@@ -384,5 +385,5 @@
    /* HeapLock(GETPROCESSHEAP); */
    pintern=HANDLE_TO_INTERN(hmem);
-   
+
    if(pintern->Magic==MAGIC_GLOBAL_USED)
    {
@@ -616,5 +617,5 @@
    PGLOBAL32_INTERN pintern;
    HGLOBAL        hreturned = 0;
-  
+
   // 2001-10-17 PH
   // Note: we do have a *HANDLE* here still ...
@@ -630,5 +631,5 @@
    }
 #endif
-  
+
    if(ISPOINTER(hmem)) /* POINTER */
    {
@@ -642,7 +643,7 @@
       /* HeapLock(heap); */
       pintern=HANDLE_TO_INTERN(hmem);
-      
+
       if(pintern->Magic==MAGIC_GLOBAL_USED)
-      {	 
+      {
 
 /* WIN98 does not make this test. That is you can free a */
@@ -656,5 +657,5 @@
 	 if(!HeapFree(GETPROCESSHEAP, 0, pintern))
 	    hreturned=hmem;
-      }      
+      }
       else
       {
@@ -663,8 +664,8 @@
         hreturned = hmem;
       }
-     
+
       /* HeapUnlock(heap); */
    }
-  
+
    return hreturned;
 }
@@ -682,5 +683,5 @@
    PGLOBAL32_INTERN     pintern;
 
-   if(ISPOINTER(hmem)) 
+   if(ISPOINTER(hmem))
    {
       retval=HeapSize(GETPROCESSHEAP, 0,  (LPVOID) hmem);
@@ -690,5 +691,5 @@
       /* HeapLock(heap); */
       pintern=HANDLE_TO_INTERN(hmem);
-      
+
       if(pintern->Magic==MAGIC_GLOBAL_USED)
       {
@@ -775,5 +776,5 @@
       pintern=HANDLE_TO_INTERN(hmem);
       if(pintern->Magic==MAGIC_GLOBAL_USED)
-      {               
+      {
 	 retval=pintern->LockCount + (pintern->Flags<<8);
 	 if(pintern->Pointer==0)
