mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Set last error in CreateDIBSection.
svn path=/trunk/; revision=12366
This commit is contained in:
parent
7d8d83ff01
commit
f87aca3585
1 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* $Id: dib.c,v 1.58 2004/12/18 17:15:10 royce Exp $
|
* $Id: dib.c,v 1.59 2004/12/27 16:47:02 navaraf Exp $
|
||||||
*
|
*
|
||||||
* ReactOS W32 Subsystem
|
* ReactOS W32 Subsystem
|
||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
|
||||||
|
@ -725,6 +725,10 @@ HBITMAP STDCALL NtGdiCreateDIBSection(HDC hDC,
|
||||||
hSection, dwOffset, 0);
|
hSection, dwOffset, 0);
|
||||||
DC_UnlockDc(hDC);
|
DC_UnlockDc(hDC);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
|
}
|
||||||
|
|
||||||
if (bDesktopDC)
|
if (bDesktopDC)
|
||||||
NtGdiDeleteDC(hDC);
|
NtGdiDeleteDC(hDC);
|
||||||
|
@ -774,6 +778,7 @@ DIB_CreateDIBSection(
|
||||||
/* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS,
|
/* bm.bmBits = MapViewOfFile(section, FILE_MAP_ALL_ACCESS,
|
||||||
0L, offset, totalSize); */
|
0L, offset, totalSize); */
|
||||||
DbgPrint("DIB_CreateDIBSection: Cannot yet handle section DIBs\n");
|
DbgPrint("DIB_CreateDIBSection: Cannot yet handle section DIBs\n");
|
||||||
|
SetLastWin32Error(ERROR_INVALID_FUNCTION);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
else if (ovr_pitch && offset)
|
else if (ovr_pitch && offset)
|
||||||
|
@ -839,11 +844,13 @@ DIB_CreateDIBSection(
|
||||||
bm.bmBits);
|
bm.bmBits);
|
||||||
if (! res)
|
if (! res)
|
||||||
{
|
{
|
||||||
|
SetLastWin32Error(ERROR_NO_SYSTEM_RESOURCES);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
bmp = BITMAPOBJ_LockBitmap(res);
|
bmp = BITMAPOBJ_LockBitmap(res);
|
||||||
if (NULL == bmp)
|
if (NULL == bmp)
|
||||||
{
|
{
|
||||||
|
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||||
NtGdiDeleteObject(bmp);
|
NtGdiDeleteObject(bmp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue