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
Johnny Cai
wine
Commits
1c421d77
Commit
1c421d77
authored
22 years ago
by
Marcus Meissner
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Support DllGetClassObject of CLSID_StdPicture.
PICTYPE_NONE has width/height 0.
parent
0e162e46
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/oleaut32/oleaut.c
+8
-0
8 additions, 0 deletions
dlls/oleaut32/oleaut.c
dlls/oleaut32/olepicture.c
+67
-0
67 additions, 0 deletions
dlls/oleaut32/olepicture.c
with
75 additions
and
0 deletions
dlls/oleaut32/oleaut.c
+
8
−
0
View file @
1c421d77
...
...
@@ -507,6 +507,7 @@ HRESULT WINAPI OLEAUT32_DllUnregisterServer() {
}
extern
void
_get_STDFONT_CF
(
LPVOID
);
extern
void
_get_STDPIC_CF
(
LPVOID
);
/***********************************************************************
* DllGetClassObject (OLEAUT32.1)
...
...
@@ -521,6 +522,13 @@ HRESULT WINAPI OLEAUT32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *pp
return
S_OK
;
}
}
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_StdPicture
))
{
if
(
IsEqualGUID
(
iid
,
&
IID_IClassFactory
))
{
_get_STDPIC_CF
(
ppv
);
IClassFactory_AddRef
((
IClassFactory
*
)
*
ppv
);
return
S_OK
;
}
}
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_PSOAInterface
))
{
if
(
S_OK
==
TypeLibFac_DllGetClassObject
(
rclsid
,
iid
,
ppv
))
return
S_OK
;
...
...
This diff is collapsed.
Click to expand it.
dlls/oleaut32/olepicture.c
+
67
−
0
View file @
1c421d77
...
...
@@ -219,6 +219,11 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
newObject
->
himetricHeight
=
pictDesc
->
u
.
wmf
.
yExt
;
break
;
case
PICTYPE_NONE
:
/* not sure what to do here */
newObject
->
himetricWidth
=
newObject
->
himetricHeight
=
0
;
break
;
case
PICTYPE_ICON
:
case
PICTYPE_ENHMETAFILE
:
default:
...
...
@@ -997,6 +1002,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface,IStream*pStm) {
}
else
{
This
->
desc
.
picType
=
PICTYPE_ICON
;
This
->
desc
.
u
.
icon
.
hicon
=
hicon
;
This
->
himetricWidth
=
cifd
->
idEntries
[
i
].
bWidth
;
This
->
himetricHeight
=
cifd
->
idEntries
[
i
].
bHeight
;
hr
=
S_OK
;
}
break
;
...
...
@@ -1308,3 +1315,63 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
IPicture_Release
(
newpic
);
return
hr
;
}
/*******************************************************************************
* StdPic ClassFactory
*/
typedef
struct
{
/* IUnknown fields */
ICOM_VFIELD
(
IClassFactory
);
DWORD
ref
;
}
IClassFactoryImpl
;
static
HRESULT
WINAPI
SPCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
FIXME
(
"(%p)->(%s,%p),stub!
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
SPCF_AddRef
(
LPCLASSFACTORY
iface
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
return
++
(
This
->
ref
);
}
static
ULONG
WINAPI
SPCF_Release
(
LPCLASSFACTORY
iface
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
/* static class, won't be freed */
return
--
(
This
->
ref
);
}
static
HRESULT
WINAPI
SPCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
PICTDESC
pd
;
FIXME
(
"(%p,%p,%s,%p), creating stdpic with PICTYPE_NONE.
\n
"
,
iface
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
pd
.
cbSizeofstruct
=
sizeof
(
pd
);
pd
.
picType
=
PICTYPE_NONE
;
return
OleCreatePictureIndirect
(
&
pd
,
riid
,
TRUE
,
ppobj
);
}
static
HRESULT
WINAPI
SPCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
ICOM_THIS
(
IClassFactoryImpl
,
iface
);
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
}
static
ICOM_VTABLE
(
IClassFactory
)
SPCF_Vtbl
=
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
SPCF_QueryInterface
,
SPCF_AddRef
,
SPCF_Release
,
SPCF_CreateInstance
,
SPCF_LockServer
};
static
IClassFactoryImpl
STDPIC_CF
=
{
&
SPCF_Vtbl
,
1
};
void
_get_STDPIC_CF
(
LPVOID
*
ppv
)
{
*
ppv
=
(
LPVOID
)
&
STDPIC_CF
;
}
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