Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
cf7883f3
Commit
cf7883f3
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: Added generic class factory implementation and use it for file moniker.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fefd1511
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
48 deletions
+48
-48
filemoniker.c
dlls/ole32/filemoniker.c
+1
-46
moniker.h
dlls/ole32/moniker.h
+1
-1
oleproxy.c
dlls/ole32/oleproxy.c
+46
-1
No files found.
dlls/ole32/filemoniker.c
View file @
cf7883f3
...
...
@@ -1541,31 +1541,7 @@ HRESULT FileMoniker_CreateFromDisplayName(LPBC pbc, LPCOLESTR szDisplayName,
}
static
HRESULT
WINAPI
FileMonikerCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
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
FileMonikerCF_AddRef
(
LPCLASSFACTORY
iface
)
{
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
FileMonikerCF_Release
(
LPCLASSFACTORY
iface
)
{
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
FileMonikerCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pUnk
,
REFIID
riid
,
LPVOID
*
ppv
)
HRESULT
WINAPI
FileMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
{
FileMonikerImpl
*
newFileMoniker
;
HRESULT
hr
;
...
...
@@ -1591,24 +1567,3 @@ static HRESULT WINAPI FileMonikerCF_CreateInstance(LPCLASSFACTORY iface,
return
hr
;
}
static
HRESULT
WINAPI
FileMonikerCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
fLock
)
{
FIXME
(
"(%d), stub!
\n
"
,
fLock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
FileMonikerCFVtbl
=
{
FileMonikerCF_QueryInterface
,
FileMonikerCF_AddRef
,
FileMonikerCF_Release
,
FileMonikerCF_CreateInstance
,
FileMonikerCF_LockServer
};
static
const
IClassFactoryVtbl
*
FileMonikerCF
=
&
FileMonikerCFVtbl
;
HRESULT
FileMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
{
return
IClassFactory_QueryInterface
((
IClassFactory
*
)
&
FileMonikerCF
,
riid
,
ppv
);
}
dlls/ole32/moniker.h
View file @
cf7883f3
...
...
@@ -30,7 +30,7 @@ DEFINE_OLEGUID( CLSID_CompositeMoniker, 0x309, 0, 0 );
DEFINE_OLEGUID
(
CLSID_ClassMoniker
,
0x31a
,
0
,
0
);
DEFINE_OLEGUID
(
CLSID_PointerMoniker
,
0x306
,
0
,
0
);
HRESULT
FileMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
FileMoniker_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pUnk
,
REFIID
riid
,
void
**
ppv
)
;
HRESULT
ItemMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
AntiMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
HRESULT
CompositeMonikerCF_Create
(
REFIID
riid
,
LPVOID
*
ppv
)
DECLSPEC_HIDDEN
;
...
...
dlls/ole32/oleproxy.c
View file @
cf7883f3
...
...
@@ -39,6 +39,51 @@
#include "moniker.h"
#include "comcat.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
static
HRESULT
WINAPI
ClassFactory_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
TRACE
(
"(%p)->(%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IClassFactory
))
{
*
ppv
=
iface
;
return
S_OK
;
}
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
fLock
)
{
TRACE
(
"(%x)
\n
"
,
fLock
);
return
S_OK
;
}
static
const
IClassFactoryVtbl
FileMonikerCFVtbl
=
{
ClassFactory_QueryInterface
,
ClassFactory_AddRef
,
ClassFactory_Release
,
FileMoniker_CreateInstance
,
ClassFactory_LockServer
};
static
IClassFactory
FileMonikerCF
=
{
&
FileMonikerCFVtbl
};
/***********************************************************************
* DllGetClassObject [OLE32.@]
*/
...
...
@@ -56,7 +101,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv)
if
(
IsEqualIID
(
rclsid
,
&
CLSID_StdGlobalInterfaceTable
)
&&
(
IsEqualIID
(
iid
,
&
IID_IClassFactory
)
||
IsEqualIID
(
iid
,
&
IID_IUnknown
)))
return
StdGlobalInterfaceTable_GetFactory
(
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_FileMoniker
))
return
FileMonikerCF_Create
(
iid
,
ppv
);
return
IClassFactory_QueryInterface
(
&
FileMonikerCF
,
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ItemMoniker
))
return
ItemMonikerCF_Create
(
iid
,
ppv
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_AntiMoniker
))
...
...
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