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
dee64631
Commit
dee64631
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 item moniker.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cf7883f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
49 deletions
+16
-49
itemmoniker.c
dlls/ole32/itemmoniker.c
+3
-47
moniker.h
dlls/ole32/moniker.h
+1
-1
oleproxy.c
dlls/ole32/oleproxy.c
+12
-1
No files found.
dlls/ole32/itemmoniker.c
View file @
dee64631
...
...
@@ -948,39 +948,16 @@ HRESULT WINAPI CreateItemMoniker(LPCOLESTR lpszDelim, LPCOLESTR lpszItem, IMoni
hr
=
ItemMonikerImpl_Construct
(
newItemMoniker
,
lpszDelim
,
lpszItem
);
if
(
FAILED
(
hr
)){
HeapFree
(
GetProcessHeap
(),
0
,
newItemMoniker
);
return
hr
;
return
hr
;
}
return
ItemMonikerImpl_QueryInterface
(
&
newItemMoniker
->
IMoniker_iface
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
}
static
HRESULT
WINAPI
ItemMonikerCF_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
ItemMonikerCF_AddRef
(
LPCLASSFACTORY
iface
)
{
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ItemMonikerCF_Release
(
LPCLASSFACTORY
iface
)
{
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ItemMonikerCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pUnk
,
REFIID
riid
,
LPVOID
*
ppv
)
HRESULT
WINAPI
ItemMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
{
ItemMonikerImpl
*
newItemMoniker
;
HRESULT
hr
;
...
...
@@ -1006,24 +983,3 @@ static HRESULT WINAPI ItemMonikerCF_CreateInstance(LPCLASSFACTORY iface,
return
hr
;
}
static
HRESULT
WINAPI
ItemMonikerCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
fLock
)
{
FIXME
(
"(%d), stub!
\n
"
,
fLock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
ItemMonikerCFVtbl
=
{
ItemMonikerCF_QueryInterface
,
ItemMonikerCF_AddRef
,
ItemMonikerCF_Release
,
ItemMonikerCF_CreateInstance
,
ItemMonikerCF_LockServer
};
static
const
IClassFactoryVtbl
*
ItemMonikerCF
=
&
ItemMonikerCFVtbl
;
HRESULT
ItemMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
{
return
IClassFactory_QueryInterface
((
IClassFactory
*
)
&
ItemMonikerCF
,
riid
,
ppv
);
}
dlls/ole32/moniker.h
View file @
dee64631
...
...
@@ -31,7 +31,7 @@ DEFINE_OLEGUID( CLSID_ClassMoniker, 0x31a, 0, 0 );
DEFINE_OLEGUID
(
CLSID_PointerMoniker
,
0x306
,
0
,
0
);
HRESULT
WINAPI
FileMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
);
HRESULT
ItemMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
ItemMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
;
HRESULT
AntiMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
CompositeMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
ClassMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/oleproxy.c
View file @
dee64631
...
...
@@ -84,6 +84,17 @@ static const IClassFactoryVtbl FileMonikerCFVtbl =
static
IClassFactory
FileMonikerCF
=
{
&
FileMonikerCFVtbl
};
static
const
IClassFactoryVtbl
ItemMonikerCFVtbl
=
{
ClassFactory_QueryInterface
,
ClassFactory_AddRef
,
ClassFactory_Release
,
ItemMoniker_CreateInstance
,
ClassFactory_LockServer
};
static
IClassFactory
ItemMonikerCF
=
{
&
ItemMonikerCFVtbl
};
/***********************************************************************
* DllGetClassObject [OLE32.@]
*/
...
...
@@ -103,7 +114,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_FileMoniker
))
return
IClassFactory_QueryInterface
(
&
FileMonikerCF
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ItemMoniker
))
return
I
temMonikerCF_Create
(
iid
,
ppv
);
return
I
ClassFactory_QueryInterface
(
&
ItemMonikerCF
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_AntiMoniker
))
return
AntiMonikerCF_Create
(
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_CompositeMoniker
))
...
...
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