Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
e848f6d5
Commit
e848f6d5
authored
17 years ago
by
Huw Davies
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
oleaut32: Fixes for the PICTYPE_UNINITIALIZED case.
parent
f19f4de5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/oleaut32/olepicture.c
+2
-0
2 additions, 0 deletions
dlls/oleaut32/olepicture.c
dlls/oleaut32/tests/olepicture.c
+30
-0
30 additions, 0 deletions
dlls/oleaut32/tests/olepicture.c
with
32 additions
and
0 deletions
dlls/oleaut32/olepicture.c
+
2
−
0
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
:
...
...
This diff is collapsed.
Click to expand it.
dlls/oleaut32/tests/olepicture.c
+
30
−
0
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
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment