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
41059e16
Commit
41059e16
authored
Aug 05, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: COM cleanup for the IDirectPlay8ThreadPool iface.
parent
2e01ea4b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
16 deletions
+26
-16
dpnet_private.h
dlls/dpnet/dpnet_private.h
+1
-2
threadpool.c
dlls/dpnet/threadpool.c
+25
-14
No files found.
dlls/dpnet/dpnet_private.h
View file @
41059e16
...
...
@@ -93,8 +93,7 @@ struct IDirectPlay8PeerImpl
*/
struct
IDirectPlay8ThreadPoolImpl
{
/* IUnknown fields */
const
IDirectPlay8ThreadPoolVtbl
*
lpVtbl
;
IDirectPlay8ThreadPool
IDirectPlay8ThreadPool_iface
;
LONG
ref
;
};
...
...
dlls/dpnet/threadpool.c
View file @
41059e16
...
...
@@ -37,11 +37,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dpnet
);
/* IUnknown interface follows */
static
inline
IDirectPlay8ThreadPoolImpl
*
impl_from_IDirectPlay8ThreadPool
(
IDirectPlay8ThreadPool
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IDirectPlay8ThreadPoolImpl
,
IDirectPlay8ThreadPool_iface
);
}
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_QueryInterface
(
PDIRECTPLAY8THREADPOOL
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
/* IUnknown interface follows */
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_QueryInterface
(
IDirectPlay8ThreadPool
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
IDirectPlay8ThreadPoolImpl
*
This
=
(
IDirectPlay8ThreadPoolImpl
*
)
iface
;
IDirectPlay8ThreadPoolImpl
*
This
=
impl_from_IDirectPlay8ThreadPool
(
iface
)
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDirectPlay8ThreadPool
))
...
...
@@ -55,17 +60,17 @@ static HRESULT WINAPI IDirectPlay8ThreadPoolImpl_QueryInterface(PDIRECTPLAY8THRE
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirectPlay8ThreadPoolImpl_AddRef
(
PDIRECTPLAY8THREADPOOL
iface
)
static
ULONG
WINAPI
IDirectPlay8ThreadPoolImpl_AddRef
(
IDirectPlay8ThreadPool
*
iface
)
{
IDirectPlay8ThreadPoolImpl
*
This
=
(
IDirectPlay8ThreadPoolImpl
*
)
iface
;
IDirectPlay8ThreadPoolImpl
*
This
=
impl_from_IDirectPlay8ThreadPool
(
iface
)
;
ULONG
RefCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
RefCount
;
}
static
ULONG
WINAPI
IDirectPlay8ThreadPoolImpl_Release
(
PDIRECTPLAY8THREADPOOL
iface
)
static
ULONG
WINAPI
IDirectPlay8ThreadPoolImpl_Release
(
IDirectPlay8ThreadPool
*
iface
)
{
IDirectPlay8ThreadPoolImpl
*
This
=
(
IDirectPlay8ThreadPoolImpl
*
)
iface
;
IDirectPlay8ThreadPoolImpl
*
This
=
impl_from_IDirectPlay8ThreadPool
(
iface
)
;
ULONG
RefCount
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
RefCount
)
...
...
@@ -75,31 +80,36 @@ static ULONG WINAPI IDirectPlay8ThreadPoolImpl_Release(PDIRECTPLAY8THREADPOOL if
}
/* IDirectPlay8ThreadPool interface follows */
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_Initialize
(
PDIRECTPLAY8THREADPOOL
iface
,
PVOID
CONST
pvUserContext
,
CONST
PFNDPNMESSAGEHANDLER
pfn
,
CONST
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_Initialize
(
IDirectPlay8ThreadPool
*
iface
,
void
*
const
pvUserContext
,
const
PFNDPNMESSAGEHANDLER
pfn
,
const
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%p,%p,%x): stub
\n
"
,
iface
,
pvUserContext
,
pfn
,
dwFlags
);
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_Close
(
PDIRECTPLAY8THREADPOOL
iface
,
CONST
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_Close
(
IDirectPlay8ThreadPool
*
iface
,
const
DWORD
dwFlags
)
{
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_GetThreadCount
(
PDIRECTPLAY8THREADPOOL
iface
,
CONST
DWORD
dwProcessorNum
,
DWORD
*
CONST
pdwNumThreads
,
CONST
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_GetThreadCount
(
IDirectPlay8ThreadPool
*
iface
,
const
DWORD
dwProcessorNum
,
DWORD
*
const
pdwNumThreads
,
const
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%x,%p,%x): stub
\n
"
,
iface
,
dwProcessorNum
,
pdwNumThreads
,
dwFlags
);
*
pdwNumThreads
=
0
;
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_SetThreadCount
(
PDIRECTPLAY8THREADPOOL
iface
,
CONST
DWORD
dwProcessorNum
,
CONST
DWORD
dwNumThreads
,
CONST
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_SetThreadCount
(
IDirectPlay8ThreadPool
*
iface
,
const
DWORD
dwProcessorNum
,
const
DWORD
dwNumThreads
,
const
DWORD
dwFlags
)
{
FIXME
(
"(%p)->(%x,%x,%x): stub
\n
"
,
iface
,
dwProcessorNum
,
dwNumThreads
,
dwFlags
);
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_DoWork
(
PDIRECTPLAY8THREADPOOL
iface
,
CONST
DWORD
dwAllowedTimeSlice
,
CONST
DWORD
dwFlags
)
static
HRESULT
WINAPI
IDirectPlay8ThreadPoolImpl_DoWork
(
IDirectPlay8ThreadPool
*
iface
,
const
DWORD
dwAllowedTimeSlice
,
const
DWORD
dwFlags
)
{
static
BOOL
Run
=
FALSE
;
...
...
@@ -136,8 +146,9 @@ HRESULT DPNET_CreateDirectPlay8ThreadPool(LPCLASSFACTORY iface, LPUNKNOWN punkOu
return
E_OUTOFMEMORY
;
}
Client
->
lpVtbl
=
&
DirectPlay8ThreadPool_Vtbl
;
Client
->
IDirectPlay8ThreadPool_iface
.
lpVtbl
=
&
DirectPlay8ThreadPool_Vtbl
;
Client
->
ref
=
0
;
return
IDirectPlay8ThreadPoolImpl_QueryInterface
((
PDIRECTPLAY8THREADPOOL
)
Client
,
riid
,
ppobj
);
return
IDirectPlay8ThreadPoolImpl_QueryInterface
(
&
Client
->
IDirectPlay8ThreadPool_iface
,
riid
,
ppobj
);
}
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