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
5b502e3e
Commit
5b502e3e
authored
Dec 30, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hlink: Use an iface instead of a vtbl pointer in CFImpl.
parent
81f44f50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
hlink_main.c
dlls/hlink/hlink_main.c
+13
-8
No files found.
dlls/hlink/hlink_main.c
View file @
5b502e3e
...
...
@@ -34,10 +34,15 @@ typedef HRESULT (CALLBACK *LPFNCREATEINSTANCE)(IUnknown*, REFIID, LPVOID*);
typedef
struct
{
const
IClassFactoryVtbl
*
lpVtbl
;
LPFNCREATEINSTANCE
lpfnCI
;
IClassFactory
IClassFactory_iface
;
LPFNCREATEINSTANCE
lpfnCI
;
}
CFImpl
;
static
inline
CFImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
CFImpl
,
IClassFactory_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"%p %d %p
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
...
...
@@ -500,7 +505,7 @@ cleanup:
static
HRESULT
WINAPI
HLinkCF_fnQueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
{
CFImpl
*
This
=
(
CFImpl
*
)
iface
;
CFImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_guid
(
riid
));
...
...
@@ -530,7 +535,7 @@ static ULONG WINAPI HLinkCF_fnRelease(LPCLASSFACTORY iface)
static
HRESULT
WINAPI
HLinkCF_fnCreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pUnkOuter
,
REFIID
riid
,
LPVOID
*
ppvObject
)
{
CFImpl
*
This
=
(
CFImpl
*
)
iface
;
CFImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"%p->(%p,%s,%p)
\n
"
,
This
,
pUnkOuter
,
debugstr_guid
(
riid
),
ppvObject
);
...
...
@@ -554,8 +559,8 @@ static const IClassFactoryVtbl hlcfvt =
HLinkCF_fnLockServer
};
static
CFImpl
HLink_cf
=
{
&
hlcfvt
,
HLink_Constructor
};
static
CFImpl
HLinkBrowseContext_cf
=
{
&
hlcfvt
,
HLinkBrowseContext_Constructor
};
static
CFImpl
HLink_cf
=
{
{
&
hlcfvt
}
,
HLink_Constructor
};
static
CFImpl
HLinkBrowseContext_cf
=
{
{
&
hlcfvt
}
,
HLinkBrowseContext_Constructor
};
/***********************************************************************
* DllGetClassObject (HLINK.@)
...
...
@@ -571,9 +576,9 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
*
ppv
=
NULL
;
if
(
IsEqualIID
(
rclsid
,
&
CLSID_StdHlink
))
pcf
=
(
IClassFactory
*
)
&
HLink_cf
;
pcf
=
&
HLink_cf
.
IClassFactory_iface
;
else
if
(
IsEqualIID
(
rclsid
,
&
CLSID_StdHlinkBrowseContext
))
pcf
=
(
IClassFactory
*
)
&
HLinkBrowseContext_cf
;
pcf
=
&
HLinkBrowseContext_cf
.
IClassFactory_iface
;
else
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