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
e848f6d5
Commit
e848f6d5
authored
Jun 05, 2007
by
Huw Davies
Committed by
Alexandre Julliard
Jun 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fixes for the PICTYPE_UNINITIALIZED case.
parent
f19f4de5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
olepicture.c
dlls/oleaut32/olepicture.c
+2
-0
olepicture.c
dlls/oleaut32/tests/olepicture.c
+30
-0
No files found.
dlls/oleaut32/olepicture.c
View file @
e848f6d5
...
...
@@ -365,6 +365,7 @@ static void OLEPictureImpl_Destroy(OLEPictureImpl* Obj)
DeleteEnhMetaFile
(
Obj
->
desc
.
u
.
emf
.
hemf
);
break
;
case
PICTYPE_NONE
:
case
PICTYPE_UNINITIALIZED
:
/* Nothing to do */
break
;
default:
...
...
@@ -505,6 +506,7 @@ static HRESULT WINAPI OLEPictureImpl_get_Handle(IPicture *iface,
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
phandle
);
switch
(
This
->
desc
.
picType
)
{
case
PICTYPE_NONE
:
case
PICTYPE_UNINITIALIZED
:
*
phandle
=
0
;
break
;
case
PICTYPE_BITMAP
:
...
...
dlls/oleaut32/tests/olepicture.c
View file @
e848f6d5
...
...
@@ -43,6 +43,7 @@
static
HMODULE
hOleaut32
;
static
HRESULT
(
WINAPI
*
pOleLoadPicture
)(
LPSTREAM
,
LONG
,
BOOL
,
REFIID
,
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)
...
...
@@ -396,10 +397,38 @@ static void test_Invoke(void)
IPictureDisp_Release
(
picdisp
);
}
static
void
test_OleCreatePictureIndirect
(
void
)
{
IPicture
*
pict
;
HRESULT
hr
;
short
type
;
OLE_HANDLE
handle
;
if
(
!
pOleCreatePictureIndirect
)
{
skip
(
"Skipping OleCreatePictureIndirect tests
\n
"
);
return
;
}
hr
=
pOleCreatePictureIndirect
(
NULL
,
&
IID_IPicture
,
TRUE
,
(
void
**
)
&
pict
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
hr
=
IPicture_get_Type
(
pict
,
&
type
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
ok
(
type
==
PICTYPE_UNINITIALIZED
,
"type %d
\n
"
,
type
);
hr
=
IPicture_get_Handle
(
pict
,
&
handle
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
ok
(
handle
==
0
,
"handle %08x
\n
"
,
handle
);
IPicture_Release
(
pict
);
}
START_TEST
(
olepicture
)
{
hOleaut32
=
LoadLibraryA
(
"oleaut32.dll"
);
pOleLoadPicture
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"OleLoadPicture"
);
pOleCreatePictureIndirect
=
(
void
*
)
GetProcAddress
(
hOleaut32
,
"OleCreatePictureIndirect"
);
if
(
!
pOleLoadPicture
)
return
;
...
...
@@ -414,6 +443,7 @@ START_TEST(olepicture)
test_empty_image_2
();
test_Invoke
();
test_OleCreatePictureIndirect
();
}
...
...
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