Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
369116d9
Commit
369116d9
authored
Jul 26, 2003
by
Mike McCormack
Committed by
Alexandre Julliard
Jul 26, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When GetObject is called with a NULL pointer, return the object's
size.
parent
039e1311
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
6 deletions
+19
-6
bitmap.c
objects/bitmap.c
+4
-0
brush.c
objects/brush.c
+3
-0
font.c
objects/font.c
+6
-4
gdiobj.c
objects/gdiobj.c
+0
-2
palette.c
objects/palette.c
+3
-0
pen.c
objects/pen.c
+3
-0
No files found.
objects/bitmap.c
View file @
369116d9
...
...
@@ -555,6 +555,8 @@ static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
if
(
bmp
->
dib
)
{
if
(
!
buffer
)
return
sizeof
(
DIBSECTION
);
if
(
count
<
sizeof
(
DIBSECTION
))
{
if
(
count
>
sizeof
(
BITMAP
))
count
=
sizeof
(
BITMAP
);
...
...
@@ -569,6 +571,8 @@ static INT BITMAP_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
}
else
{
if
(
!
buffer
)
return
sizeof
(
BITMAP
);
if
(
count
>
sizeof
(
BITMAP
))
count
=
sizeof
(
BITMAP
);
memcpy
(
buffer
,
&
bmp
->
bitmap
,
count
);
return
count
;
...
...
objects/brush.c
View file @
369116d9
...
...
@@ -352,6 +352,9 @@ static INT BRUSH_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
{
BRUSHOBJ
*
brush
=
obj
;
if
(
!
buffer
)
return
sizeof
(
brush
->
logbrush
);
if
(
count
>
sizeof
(
brush
->
logbrush
))
count
=
sizeof
(
brush
->
logbrush
);
memcpy
(
buffer
,
&
brush
->
logbrush
,
count
);
return
count
;
...
...
objects/font.c
View file @
369116d9
...
...
@@ -472,11 +472,12 @@ static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
FONTOBJ
*
font
=
obj
;
LOGFONTA
lfA
;
if
(
!
buffer
)
return
sizeof
(
lfA
);
FONT_LogFontWToA
(
&
font
->
logfont
,
&
lfA
);
if
(
count
>
sizeof
(
lfA
))
count
=
sizeof
(
lfA
);
if
(
buffer
)
memcpy
(
buffer
,
&
lfA
,
count
);
memcpy
(
buffer
,
&
lfA
,
count
);
return
count
;
}
...
...
@@ -486,9 +487,10 @@ static INT FONT_GetObjectA( HGDIOBJ handle, void *obj, INT count, LPVOID buffer
static
INT
FONT_GetObjectW
(
HGDIOBJ
handle
,
void
*
obj
,
INT
count
,
LPVOID
buffer
)
{
FONTOBJ
*
font
=
obj
;
if
(
!
buffer
)
return
sizeof
(
LOGFONTW
);
if
(
count
>
sizeof
(
LOGFONTW
))
count
=
sizeof
(
LOGFONTW
);
if
(
buffer
)
memcpy
(
buffer
,
&
font
->
logfont
,
count
);
memcpy
(
buffer
,
&
font
->
logfont
,
count
);
return
count
;
}
...
...
objects/gdiobj.c
View file @
369116d9
...
...
@@ -941,7 +941,6 @@ INT WINAPI GetObjectA( HANDLE handle, INT count, LPVOID buffer )
GDIOBJHDR
*
ptr
;
INT
result
=
0
;
TRACE
(
"%p %d %p
\n
"
,
handle
,
count
,
buffer
);
if
(
!
count
)
return
0
;
if
(
!
(
ptr
=
GDI_GetObjPtr
(
handle
,
MAGIC_DONTCARE
)))
return
0
;
...
...
@@ -962,7 +961,6 @@ INT WINAPI GetObjectW( HANDLE handle, INT count, LPVOID buffer )
GDIOBJHDR
*
ptr
;
INT
result
=
0
;
TRACE
(
"%p %d %p
\n
"
,
handle
,
count
,
buffer
);
if
(
!
count
)
return
0
;
if
(
!
(
ptr
=
GDI_GetObjPtr
(
handle
,
MAGIC_DONTCARE
)))
return
0
;
...
...
objects/palette.c
View file @
369116d9
...
...
@@ -625,6 +625,9 @@ static INT PALETTE_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffe
{
PALETTEOBJ
*
palette
=
obj
;
if
(
!
buffer
)
return
sizeof
(
WORD
);
if
(
count
>
sizeof
(
WORD
))
count
=
sizeof
(
WORD
);
memcpy
(
buffer
,
&
palette
->
logpalette
.
palNumEntries
,
count
);
return
count
;
...
...
objects/pen.c
View file @
369116d9
...
...
@@ -167,6 +167,9 @@ static INT PEN_GetObject( HGDIOBJ handle, void *obj, INT count, LPVOID buffer )
{
PENOBJ
*
pen
=
obj
;
if
(
!
buffer
)
return
sizeof
(
pen
->
logpen
);
if
(
count
>
sizeof
(
pen
->
logpen
))
count
=
sizeof
(
pen
->
logpen
);
memcpy
(
buffer
,
&
pen
->
logpen
,
count
);
return
count
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment