Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
5b88f0d9
Commit
5b88f0d9
authored
Jan 06, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 06, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Add PICTYPE_NONE and PICTYPE_UNINITIALIZED to IPicture_get_Attributes.
parent
e46d25a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
olepicture.c
dlls/oleaut32/olepicture.c
+2
-0
olepicture.c
dlls/oleaut32/tests/olepicture.c
+27
-0
No files found.
dlls/oleaut32/olepicture.c
View file @
5b88f0d9
...
...
@@ -844,6 +844,8 @@ static HRESULT WINAPI OLEPictureImpl_get_Attributes(IPicture *iface,
TRACE
(
"(%p)->(%p).
\n
"
,
This
,
pdwAttr
);
*
pdwAttr
=
0
;
switch
(
This
->
desc
.
picType
)
{
case
PICTYPE_UNINITIALIZED
:
case
PICTYPE_NONE
:
break
;
case
PICTYPE_BITMAP
:
if
(
This
->
hbmMask
)
*
pdwAttr
=
PICTURE_TRANSPARENT
;
break
;
/* not 'truly' scalable, see MSDN. */
case
PICTYPE_ICON
:
*
pdwAttr
=
PICTURE_TRANSPARENT
;
break
;
case
PICTYPE_ENHMETAFILE
:
/* fall through */
...
...
dlls/oleaut32/tests/olepicture.c
View file @
5b88f0d9
...
...
@@ -324,6 +324,7 @@ static void test_empty_image(void) {
ULARGE_INTEGER
newpos1
;
LARGE_INTEGER
seekto
;
short
type
;
DWORD
attr
;
/* Empty image. Happens occasionally in VB programs. */
hglob
=
GlobalAlloc
(
0
,
8
);
...
...
@@ -347,6 +348,11 @@ static void test_empty_image(void) {
ok
(
hres
==
S_OK
,
"empty picture get type failed with hres 0x%08x
\n
"
,
hres
);
ok
(
type
==
PICTYPE_NONE
,
"type is %d, but should be PICTYPE_NONE(0)
\n
"
,
type
);
attr
=
0xdeadbeef
;
hres
=
IPicture_get_Attributes
(
pic
,
&
attr
);
ok
(
hres
==
S_OK
,
"empty picture get attributes failed with hres 0x%08x
\n
"
,
hres
);
ok
(
attr
==
0
,
"attr is %d, but should be 0
\n
"
,
attr
);
hres
=
IPicture_get_Handle
(
pic
,
&
handle
);
ok
(
hres
==
S_OK
,
"empty picture get handle failed with hres 0x%08x
\n
"
,
hres
);
ok
(
handle
==
0
,
"empty picture get handle did not return 0, but 0x%08x
\n
"
,
handle
);
...
...
@@ -645,6 +651,26 @@ static void test_Render(void)
ReleaseDC
(
NULL
,
hdc
);
}
static
void
test_get_Attributes
(
void
)
{
IPicture
*
pic
;
HRESULT
hres
;
short
type
;
DWORD
attr
;
OleCreatePictureIndirect
(
NULL
,
&
IID_IPicture
,
TRUE
,
(
VOID
**
)
&
pic
);
hres
=
IPicture_get_Type
(
pic
,
&
type
);
ok
(
hres
==
S_OK
,
"IPicture_get_Type does not return S_OK, but 0x%08x
\n
"
,
hres
);
ok
(
type
==
PICTYPE_UNINITIALIZED
,
"Expected type = PICTYPE_UNINITIALIZED, got = %d
\n
"
,
type
);
attr
=
0xdeadbeef
;
hres
=
IPicture_get_Attributes
(
pic
,
&
attr
);
ole_expect
(
hres
,
S_OK
);
ok
(
attr
==
0
,
"IPicture_get_Attributes does not reset attr to zero, got %d
\n
"
,
attr
);
IPicture_Release
(
pic
);
}
START_TEST
(
olepicture
)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
...
...
@@ -672,6 +698,7 @@ START_TEST(olepicture)
test_Invoke
();
test_OleCreatePictureIndirect
();
test_Render
();
test_get_Attributes
();
}
...
...
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