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
46a3e7c2
Commit
46a3e7c2
authored
Jul 31, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Aug 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe: Add classfactory implementation.
parent
49b43e8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
1 deletion
+110
-1
explorerframe.spec
dlls/explorerframe/explorerframe.spec
+1
-1
explorerframe_main.c
dlls/explorerframe/explorerframe_main.c
+109
-0
No files found.
dlls/explorerframe/explorerframe.spec
View file @
46a3e7c2
...
...
@@ -3,5 +3,5 @@
# 134 stub EXPLORERFRAME_134
@ stdcall -private DllCanUnloadNow()
@ st
ub DllGetClassObject
@ st
dcall -private DllGetClassObject(ptr ptr ptr)
@ stdcall -private DllGetVersion(ptr)
dlls/explorerframe/explorerframe_main.c
View file @
46a3e7c2
...
...
@@ -94,3 +94,112 @@ HRESULT WINAPI DllGetVersion(DLLVERSIONINFO *info)
WARN
(
"wrong DLLVERSIONINFO size from app.
\n
"
);
return
E_INVALIDARG
;
}
/*************************************************************************
* Implement the ExplorerFrame class factory
*
* (Taken from shdocvw/factory.c; based on implementation in
* ddraw/main.c)
*/
#define FACTORY(x) ((IClassFactory*) &(x)->lpClassFactoryVtbl)
typedef
struct
{
const
IClassFactoryVtbl
*
lpClassFactoryVtbl
;
HRESULT
(
*
cf
)(
IUnknown
*
,
REFIID
,
void
**
);
LONG
ref
;
}
IClassFactoryImpl
;
/*************************************************************************
* EFCF_QueryInterface (IUnknown)
*/
static
HRESULT
WINAPI
EFCF_QueryInterface
(
IClassFactory
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
TRACE
(
"%p (%s %p)
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppobj
);
if
(
!
ppobj
)
return
E_POINTER
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
IsEqualGUID
(
&
IID_IClassFactory
,
riid
))
{
*
ppobj
=
iface
;
IClassFactory_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"Interface not supported.
\n
"
);
*
ppobj
=
NULL
;
return
E_NOINTERFACE
;
}
/*************************************************************************
* EFCF_AddRef (IUnknown)
*/
static
ULONG
WINAPI
EFCF_AddRef
(
IClassFactory
*
iface
)
{
EFRAME_LockModule
();
return
2
;
/* non-heap based object */
}
/*************************************************************************
* EFCF_Release (IUnknown)
*/
static
ULONG
WINAPI
EFCF_Release
(
IClassFactory
*
iface
)
{
EFRAME_UnlockModule
();
return
1
;
/* non-heap based object */
}
/*************************************************************************
* EFCF_CreateInstance (IClassFactory)
*/
static
HRESULT
WINAPI
EFCF_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
pOuter
,
REFIID
riid
,
void
**
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
This
->
cf
(
pOuter
,
riid
,
ppobj
);
}
/*************************************************************************
* EFCF_LockServer (IClassFactory)
*/
static
HRESULT
WINAPI
EFCF_LockServer
(
IClassFactory
*
iface
,
BOOL
dolock
)
{
TRACE
(
"%p (%d)
\n
"
,
iface
,
dolock
);
if
(
dolock
)
EFRAME_LockModule
();
else
EFRAME_UnlockModule
();
return
S_OK
;
}
static
const
IClassFactoryVtbl
EFCF_Vtbl
=
{
EFCF_QueryInterface
,
EFCF_AddRef
,
EFCF_Release
,
EFCF_CreateInstance
,
EFCF_LockServer
};
/*************************************************************************
* DllGetClassObject (ExplorerFrame.@)
*/
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
void
**
ppv
)
{
static
IClassFactoryImpl
NSTCClassFactory
=
{
&
EFCF_Vtbl
,
NamespaceTreeControl_Constructor
};
TRACE
(
"%s, %s, %p
\n
"
,
debugstr_guid
(
rclsid
),
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
&
CLSID_NamespaceTreeControl
,
rclsid
))
return
IClassFactory_QueryInterface
(
FACTORY
(
&
NSTCClassFactory
),
riid
,
ppv
);
return
CLASS_E_CLASSNOTAVAILABLE
;
}
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