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
6717f544
Commit
6717f544
authored
Jan 09, 2012
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Skip some tests when OleLoadPictureEx() is not available.
For the early NT4 releases.
parent
b682e3b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
olepicture.c
dlls/oleaut32/tests/olepicture.c
+10
-4
No files found.
dlls/oleaut32/tests/olepicture.c
View file @
6717f544
...
...
@@ -54,6 +54,7 @@
static
HMODULE
hOleaut32
;
static
HRESULT
(
WINAPI
*
pOleLoadPicture
)(
LPSTREAM
,
LONG
,
BOOL
,
REFIID
,
LPVOID
*
);
static
HRESULT
(
WINAPI
*
pOleLoadPictureEx
)(
LPSTREAM
,
LONG
,
BOOL
,
REFIID
,
DWORD
,
DWORD
,
DWORD
,
LPVOID
*
);
static
HRESULT
(
WINAPI
*
pOleCreatePictureIndirect
)(
PICTDESC
*
,
REFIID
,
BOOL
,
LPVOID
*
);
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
...
...
@@ -531,7 +532,7 @@ static void test_apm(void)
memcpy
(
data
,
apmdata
,
sizeof
(
apmdata
));
ole_check
(
CreateStreamOnHGlobal
(
hglob
,
TRUE
,
&
stream
));
ole_check
(
OleLoadPictureEx
(
stream
,
sizeof
(
apmdata
),
TRUE
,
&
IID_IPicture
,
100
,
100
,
0
,
(
LPVOID
*
)
&
pict
));
ole_check
(
p
OleLoadPictureEx
(
stream
,
sizeof
(
apmdata
),
TRUE
,
&
IID_IPicture
,
100
,
100
,
0
,
(
LPVOID
*
)
&
pict
));
ole_check
(
IPicture_get_Handle
(
pict
,
&
handle
));
ok
(
handle
!=
0
,
"handle is null
\n
"
);
...
...
@@ -566,7 +567,7 @@ static void test_metafile(void)
ole_check
(
CreateStreamOnHGlobal
(
hglob
,
TRUE
,
&
stream
));
/* Windows does not load simple metafiles */
ole_expect
(
OleLoadPictureEx
(
stream
,
sizeof
(
metafile
),
TRUE
,
&
IID_IPicture
,
100
,
100
,
0
,
(
LPVOID
*
)
&
pict
),
E_FAIL
);
ole_expect
(
p
OleLoadPictureEx
(
stream
,
sizeof
(
metafile
),
TRUE
,
&
IID_IPicture
,
100
,
100
,
0
,
(
LPVOID
*
)
&
pict
),
E_FAIL
);
IStream_Release
(
stream
);
}
...
...
@@ -587,7 +588,7 @@ static void test_enhmetafile(void)
memcpy
(
data
,
enhmetafile
,
sizeof
(
enhmetafile
));
ole_check
(
CreateStreamOnHGlobal
(
hglob
,
TRUE
,
&
stream
));
ole_check
(
OleLoadPictureEx
(
stream
,
sizeof
(
enhmetafile
),
TRUE
,
&
IID_IPicture
,
10
,
10
,
0
,
(
LPVOID
*
)
&
pict
));
ole_check
(
p
OleLoadPictureEx
(
stream
,
sizeof
(
enhmetafile
),
TRUE
,
&
IID_IPicture
,
10
,
10
,
0
,
(
LPVOID
*
)
&
pict
));
ole_check
(
IPicture_get_Handle
(
pict
,
&
handle
));
ok
(
handle
!=
0
,
"handle is null
\n
"
);
...
...
@@ -969,6 +970,7 @@ START_TEST(olepicture)
{
hOleaut32
=
GetModuleHandleA
(
"oleaut32.dll"
);
pOleLoadPicture
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"OleLoadPicture"
);
pOleLoadPictureEx
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"OleLoadPictureEx"
);
pOleCreatePictureIndirect
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"OleCreatePictureIndirect"
);
if
(
!
pOleLoadPicture
)
{
...
...
@@ -985,10 +987,14 @@ START_TEST(olepicture)
if
(
0
)
test_pic
(
pngimage
,
sizeof
(
pngimage
));
test_empty_image
();
test_empty_image_2
();
if
(
pOleLoadPictureEx
)
{
test_apm
();
test_metafile
();
test_enhmetafile
();
}
else
win_skip
(
"OleLoadPictureEx is not available
\n
"
);
test_Invoke
();
test_OleCreatePictureIndirect
();
test_Render
();
...
...
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