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
961c3dc4
Commit
961c3dc4
authored
Feb 21, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 21, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use generic class factory for class moniker.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
947c9ba2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
48 deletions
+15
-48
classmoniker.c
dlls/ole32/classmoniker.c
+2
-46
moniker.h
dlls/ole32/moniker.h
+1
-1
oleproxy.c
dlls/ole32/oleproxy.c
+12
-1
No files found.
dlls/ole32/classmoniker.c
View file @
961c3dc4
...
...
@@ -804,30 +804,8 @@ HRESULT ClassMoniker_CreateFromDisplayName(LPBC pbc, LPCOLESTR szDisplayName, LP
return
hr
;
}
static
HRESULT
WINAPI
ClassMonikerCF_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IClassFactory
))
{
*
ppv
=
iface
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ClassMonikerCF_AddRef
(
LPCLASSFACTORY
iface
)
{
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ClassMonikerCF_Release
(
LPCLASSFACTORY
iface
)
{
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ClassMonikerCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pUnk
,
REFIID
riid
,
LPVOID
*
ppv
)
HRESULT
WINAPI
ClassMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
{
HRESULT
hr
;
IMoniker
*
pmk
;
...
...
@@ -847,25 +825,3 @@ static HRESULT WINAPI ClassMonikerCF_CreateInstance(LPCLASSFACTORY iface,
return
hr
;
}
static
HRESULT
WINAPI
ClassMonikerCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
fLock
)
{
FIXME
(
"(%d), stub!
\n
"
,
fLock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
ClassMonikerCFVtbl
=
{
ClassMonikerCF_QueryInterface
,
ClassMonikerCF_AddRef
,
ClassMonikerCF_Release
,
ClassMonikerCF_CreateInstance
,
ClassMonikerCF_LockServer
};
static
IClassFactory
ClassMonikerCF
=
{
&
ClassMonikerCFVtbl
};
HRESULT
ClassMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
{
return
IClassFactory_QueryInterface
(
&
ClassMonikerCF
,
riid
,
ppv
);
}
dlls/ole32/moniker.h
View file @
961c3dc4
...
...
@@ -34,7 +34,7 @@ HRESULT WINAPI FileMoniker_CreateInstance(IClassFactory *iface, IUnknown *pUnk,
HRESULT
WINAPI
ItemMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
);
HRESULT
WINAPI
AntiMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
);
HRESULT
WINAPI
CompositeMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
);
HRESULT
ClassMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
ClassMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
;
HRESULT
PointerMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
ComCatCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/oleproxy.c
View file @
961c3dc4
...
...
@@ -117,6 +117,17 @@ static const IClassFactoryVtbl CompositeMonikerCFVtbl =
static
IClassFactory
CompositeMonikerCF
=
{
&
CompositeMonikerCFVtbl
};
static
const
IClassFactoryVtbl
ClassMonikerCFVtbl
=
{
ClassFactory_QueryInterface
,
ClassFactory_AddRef
,
ClassFactory_Release
,
ClassMoniker_CreateInstance
,
ClassFactory_LockServer
};
static
IClassFactory
ClassMonikerCF
=
{
&
ClassMonikerCFVtbl
};
/***********************************************************************
* DllGetClassObject [OLE32.@]
*/
...
...
@@ -142,7 +153,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_CompositeMoniker
))
return
IClassFactory_QueryInterface
(
&
CompositeMonikerCF
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ClassMoniker
))
return
ClassMonikerCF_Create
(
iid
,
ppv
);
return
IClassFactory_QueryInterface
(
&
ClassMonikerCF
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_PointerMoniker
))
return
PointerMonikerCF_Create
(
iid
,
ppv
);
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_StdComponentCategoriesMgr
))
...
...
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