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
6d7d1b58
Commit
6d7d1b58
authored
Dec 05, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Use an iface instead of a vtbl pointer in IClassFactoryImpl.
parent
72f3765a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
dinput_main.c
dlls/dinput/dinput_main.c
+13
-8
No files found.
dlls/dinput/dinput_main.c
View file @
6d7d1b58
...
@@ -794,24 +794,29 @@ static const IDirectInput8WVtbl ddi8wvt = {
...
@@ -794,24 +794,29 @@ static const IDirectInput8WVtbl ddi8wvt = {
typedef
struct
typedef
struct
{
{
/* IUnknown fields */
/* IUnknown fields */
const
IClassFactoryVtbl
*
lpVtbl
;
IClassFactory
IClassFactory_iface
;
LONG
ref
;
LONG
ref
;
}
IClassFactoryImpl
;
}
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
)
{
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
);
FIXME
(
"(%p)->(%s,%p),stub!
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
DICF_AddRef
(
LPCLASSFACTORY
iface
)
{
static
ULONG
WINAPI
DICF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
InterlockedIncrement
(
&
(
This
->
ref
));
return
InterlockedIncrement
(
&
(
This
->
ref
));
}
}
static
ULONG
WINAPI
DICF_Release
(
LPCLASSFACTORY
iface
)
{
static
ULONG
WINAPI
DICF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
IClassFactoryImpl
*
This
=
impl_from_IClassFactory
(
iface
)
;
/* static class, won't be freed */
/* static class, won't be freed */
return
InterlockedDecrement
(
&
(
This
->
ref
));
return
InterlockedDecrement
(
&
(
This
->
ref
));
}
}
...
@@ -819,7 +824,7 @@ static ULONG WINAPI DICF_Release(LPCLASSFACTORY iface) {
...
@@ -819,7 +824,7 @@ static ULONG WINAPI DICF_Release(LPCLASSFACTORY iface) {
static
HRESULT
WINAPI
DICF_CreateInstance
(
static
HRESULT
WINAPI
DICF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
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
);
TRACE
(
"(%p)->(%p,%s,%p)
\n
"
,
This
,
pOuter
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
)
||
...
@@ -840,7 +845,7 @@ static HRESULT WINAPI DICF_CreateInstance(
...
@@ -840,7 +845,7 @@ static HRESULT WINAPI DICF_CreateInstance(
}
}
static
HRESULT
WINAPI
DICF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
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
);
FIXME
(
"(%p)->(%d),stub!
\n
"
,
This
,
dolock
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -852,7 +857,7 @@ static const IClassFactoryVtbl DICF_Vtbl = {
...
@@ -852,7 +857,7 @@ static const IClassFactoryVtbl DICF_Vtbl = {
DICF_CreateInstance
,
DICF_CreateInstance
,
DICF_LockServer
DICF_LockServer
};
};
static
IClassFactoryImpl
DINPUT_CF
=
{
&
DICF_Vtbl
,
1
};
static
IClassFactoryImpl
DINPUT_CF
=
{
{
&
DICF_Vtbl
}
,
1
};
/***********************************************************************
/***********************************************************************
* DllCanUnloadNow (DINPUT.@)
* DllCanUnloadNow (DINPUT.@)
...
...
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