Ignore:
Timestamp:
Oct 8, 1999, 8:39:35 PM (26 years ago)
Author:
sandervl
Message:

Property fixes, set last error when window creation fails

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r1189 r1194  
    1 /* $Id: win32wbase.cpp,v 1.30 1999-10-08 16:13:08 cbratschi Exp $ */
     1/* $Id: win32wbase.cpp,v 1.31 1999-10-08 18:39:35 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    306306        {
    307307            dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
     308            SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    308309            return FALSE;
    309310        }
     
    320321            {
    321322                dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
     323                SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    322324                return FALSE;
    323325            }
     
    450452  if(OS2Hwnd == 0) {
    451453        dprintf(("Window creation failed!!"));
     454        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    452455        return FALSE;
    453456  }
     
    455458  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
    456459        dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd));
     460        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    457461        return FALSE;
    458462  }
    459463  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) {
    460464        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
     465        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    461466        return FALSE;
    462467  }
     
    464469  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {
    465470        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
     471        SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    466472        return FALSE;
    467473  }
     
    470476    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
    471477            dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2HwndFrame));
     478            SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    472479            return FALSE;
    473480    }
    474481    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) {
    475482            dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
     483            SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    476484            return FALSE;
    477485    }
     
    479487    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {
    480488            dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
     489            SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    481490            return FALSE;
    482491    }
     
    576585        }
    577586  }
     587  dprintf(("Window creation FAILED (NCCREATE cancelled creation)"));
    578588  fCreated = FALSE;
    579589  OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, 0);
    580590  OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, 0);
    581591  DestroyWindow();
     592  SetLastError(ERROR_OUTOFMEMORY); //TODO: Better error
    582593  return FALSE;
    583594}
Note: See TracChangeset for help on using the changeset viewer.