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
dcef7c3b
Commit
dcef7c3b
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Use an iface instead of a vtbl pointer in IClassFactoryImpl.
parent
6d7d1b58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
19 deletions
+24
-19
dpnet_main.c
dlls/dpnet/dpnet_main.c
+24
-19
No files found.
dlls/dpnet/dpnet_main.c
View file @
dcef7c3b
...
...
@@ -64,39 +64,44 @@ HRESULT WINAPI DirectPlay8Create(REFGUID lpGUID, LPVOID *ppvInt, LPUNKNOWN punkO
typedef
struct
{
/* IUnknown fields */
const
IClassFactoryVtbl
*
lpVtbl
;
LONG
ref
;
REFCLSID
rclsid
;
HRESULT
(
*
pfnCreateInstanceFactory
)(
LPCLASSFACTORY
iface
,
LPUNKNOWN
punkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
);
IClassFactory
IClassFactory_iface
;
LONG
ref
;
REFCLSID
rclsid
;
HRESULT
(
*
pfnCreateInstanceFactory
)(
LPCLASSFACTORY
iface
,
LPUNKNOWN
punkOuter
,
REFIID
riid
,
LPVOID
*
ppobj
);
}
IClassFactoryImpl
;
static
inline
IClassFactoryImpl
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IClassFactoryImpl
,
IClassFactory_iface
);
}
static
HRESULT
WINAPI
DICF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
FIXME
(
"(%p)->(%s,%p),stub!
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
DICF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
DICF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
DICF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p)->(%p,%s,%p)
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
return
This
->
pfnCreateInstanceFactory
(
iface
,
pOuter
,
riid
,
ppobj
);
}
static
HRESULT
WINAPI
DICF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
}
...
...
@@ -110,13 +115,13 @@ static const IClassFactoryVtbl DICF_Vtbl = {
};
static
IClassFactoryImpl
DPNET_CFS
[]
=
{
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8Client
,
DPNET_CreateDirectPlay8Client
},
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8Server
,
DPNET_CreateDirectPlay8Server
},
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8Peer
,
DPNET_CreateDirectPlay8Peer
},
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8Address
,
DPNET_CreateDirectPlay8Address
},
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8LobbiedApplication
,
DPNET_CreateDirectPlay8LobbiedApp
},
{
&
DICF_Vtbl
,
1
,
&
CLSID_DirectPlay8ThreadPool
,
DPNET_CreateDirectPlay8ThreadPool
},
{
NULL
,
0
,
NULL
,
NULL
}
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8Client
,
DPNET_CreateDirectPlay8Client
},
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8Server
,
DPNET_CreateDirectPlay8Server
},
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8Peer
,
DPNET_CreateDirectPlay8Peer
},
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8Address
,
DPNET_CreateDirectPlay8Address
},
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8LobbiedApplication
,
DPNET_CreateDirectPlay8LobbiedApp
},
{
{
&
DICF_Vtbl
}
,
1
,
&
CLSID_DirectPlay8ThreadPool
,
DPNET_CreateDirectPlay8ThreadPool
},
{
{
NULL
}
,
0
,
NULL
,
NULL
}
};
/***********************************************************************
...
...
@@ -144,7 +149,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
*/
while
(
NULL
!=
DPNET_CFS
[
i
].
rclsid
)
{
if
(
IsEqualGUID
(
rclsid
,
DPNET_CFS
[
i
].
rclsid
))
{
DICF_AddRef
((
IClassFactory
*
)
&
DPNET_CFS
[
i
]
);
DICF_AddRef
(
&
DPNET_CFS
[
i
].
IClassFactory_iface
);
*
ppv
=
&
DPNET_CFS
[
i
];
return
S_OK
;
}
...
...
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