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
e0e7d96e
Commit
e0e7d96e
authored
Jul 28, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 28, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Implement getting of all properties in IPictureDisp::Invoke.
parent
9985f503
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
21 deletions
+57
-21
olepicture.c
dlls/oleaut32/olepicture.c
+46
-19
olepicture.c
dlls/oleaut32/tests/olepicture.c
+11
-2
No files found.
dlls/oleaut32/olepicture.c
View file @
e0e7d96e
...
...
@@ -2065,6 +2065,11 @@ static HRESULT WINAPI OLEPictureImpl_Invoke(
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
if
(
pDispParams
->
cArgs
!=
0
)
{
ERR
(
"param count for DISPATCH_PROPERTYGET was %d instead of 0
\n
"
,
pDispParams
->
cArgs
);
return
DISP_E_BADPARAMCOUNT
;
}
if
(
!
pVarResult
)
{
ERR
(
"null pVarResult not allowed when DISPATCH_PROPERTYGET specified
\n
"
);
...
...
@@ -2085,30 +2090,52 @@ static HRESULT WINAPI OLEPictureImpl_Invoke(
return
DISP_E_MEMBERNOTFOUND
;
}
if
(
dispIdMember
==
DISPID_PICT_TYPE
)
switch
(
dispIdMember
)
{
TRACE
(
"DISPID_PICT_TYPE
\n
"
);
if
(
!
(
wFlags
&
INVOKE_PROPERTYGET
))
return
DISP_E_PARAMNOTFOUND
;
if
(
pDispParams
->
cArgs
!=
0
)
return
DISP_E_BADPARAMCOUNT
;
if
(
pVarResult
)
case
DISPID_PICT_HANDLE
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
VariantInit
(
pVarResult
);
V_VT
(
pVarResult
)
=
VT_I2
;
return
OLEPictureImpl_get_Type
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_I2
(
pVarResult
));
TRACE
(
"DISPID_PICT_HANDLE
\n
"
);
V_VT
(
pVarResult
)
=
VT_I4
;
return
IPicture_get_Handle
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_UINT
(
pVarResult
));
}
return
S_OK
;
break
;
case
DISPID_PICT_HPAL
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
TRACE
(
"DISPID_PICT_HPAL
\n
"
);
V_VT
(
pVarResult
)
=
VT_I4
;
return
IPicture_get_hPal
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_UINT
(
pVarResult
));
}
break
;
case
DISPID_PICT_TYPE
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
TRACE
(
"DISPID_PICT_TYPE
\n
"
);
V_VT
(
pVarResult
)
=
VT_I2
;
return
OLEPictureImpl_get_Type
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_I2
(
pVarResult
));
}
break
;
case
DISPID_PICT_WIDTH
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
TRACE
(
"DISPID_PICT_WIDTH
\n
"
);
V_VT
(
pVarResult
)
=
VT_I4
;
return
IPicture_get_Width
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_I4
(
pVarResult
));
}
break
;
case
DISPID_PICT_HEIGHT
:
if
(
wFlags
&
DISPATCH_PROPERTYGET
)
{
TRACE
(
"DISPID_PICT_HEIGHT
\n
"
);
V_VT
(
pVarResult
)
=
VT_I4
;
return
IPicture_get_Height
((
IPicture
*
)
&
This
->
lpVtbl
,
&
V_I4
(
pVarResult
));
}
break
;
}
else
{
FIXME
(
"(dispid: %ld):Stub
\n
"
,
dispIdMember
);
VariantInit
(
pVarResult
);
V_VT
(
pVarResult
)
=
VT_BOOL
;
V_BOOL
(
pVarResult
)
=
FALSE
;
return
S_OK
;
}
ERR
(
"invalid dispid 0x%lx or wFlags 0x%x
\n
"
,
dispIdMember
,
wFlags
);
return
DISP_E_MEMBERNOTFOUND
;
}
...
...
dlls/oleaut32/tests/olepicture.c
View file @
e0e7d96e
...
...
@@ -337,14 +337,23 @@ static void test_Invoke(void)
hr
=
IPictureDisp_Invoke
(
picdisp
,
DISPID_PICT_HPAL
,
&
IID_NULL
,
0
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
NULL
,
NULL
);
ok_ole_success
(
hr
,
"IPictureDisp_Invoke"
);
ok
(
V_VT
(
&
varresult
)
==
VT_I4
,
"V_VT(&varresult) should have been VT_UINT instead of %d
\n
"
,
V_VT
(
&
varresult
));
hr
=
IPictureDisp_Invoke
(
picdisp
,
DISPID_PICT_HPAL
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dispparams
,
&
varresult
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx
\n
"
,
hr
);
hr
=
IPictureDisp_Invoke
(
picdisp
,
0xdeadbeef
,
&
IID_NULL
,
0
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
NULL
,
NULL
);
todo_wine
{
ok
(
hr
==
DISP_E_MEMBERNOTFOUND
,
"IPictureDisp_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx
\n
"
,
hr
);
}
dispparams
.
cArgs
=
1
;
dispparams
.
rgvarg
=
&
vararg
;
hr
=
IPictureDisp_Invoke
(
picdisp
,
DISPID_PICT_HPAL
,
&
IID_NULL
,
0
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_BADPARAMCOUNT
,
"IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx
\n
"
,
hr
);
dispparams
.
cArgs
=
1
;
dispparams
.
rgvarg
=
&
vararg
;
hr
=
IPictureDisp_Invoke
(
picdisp
,
DISPID_PICT_HPAL
,
&
IID_NULL
,
0
,
DISPATCH_PROPERTYGET
,
&
dispparams
,
&
varresult
,
NULL
,
NULL
);
ok
(
hr
==
DISP_E_BADPARAMCOUNT
,
"IPictureDisp_Invoke should have returned DISP_E_BADPARAMCOUNT instead of 0x%08lx
\n
"
,
hr
);
IPictureDisp_Release
(
picdisp
);
}
...
...
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