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
3f6751f4
Commit
3f6751f4
authored
Dec 08, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Use an iface instead of a vtbl pointer in ClassFactory.
parent
242bd9e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
msctf.c
dlls/msctf/msctf.c
+11
-6
No files found.
dlls/msctf/msctf.c
View file @
3f6751f4
...
...
@@ -95,11 +95,16 @@ static const struct {
typedef
struct
tagClassFactory
{
const
IClassFactoryVtbl
*
vtbl
;
IClassFactory
IClassFactory_iface
;
LONG
ref
;
LPFNCONSTRUCTOR
ctor
;
}
ClassFactory
;
static
inline
ClassFactory
*
impl_from_IClassFactory
(
IClassFactory
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ClassFactory
,
IClassFactory_iface
);
}
static
void
ClassFactory_Destructor
(
ClassFactory
*
This
)
{
TRACE
(
"Destroying class factory %p
\n
"
,
This
);
...
...
@@ -122,13 +127,13 @@ static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID r
static
ULONG
WINAPI
ClassFactory_AddRef
(
IClassFactory
*
iface
)
{
ClassFactory
*
This
=
(
ClassFactory
*
)
iface
;
ClassFactory
*
This
=
impl_from_IClassFactory
(
iface
)
;
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
ClassFactory_Release
(
IClassFactory
*
iface
)
{
ClassFactory
*
This
=
(
ClassFactory
*
)
iface
;
ClassFactory
*
This
=
impl_from_IClassFactory
(
iface
)
;
ULONG
ret
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ret
==
0
)
...
...
@@ -138,7 +143,7 @@ static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
static
HRESULT
WINAPI
ClassFactory_CreateInstance
(
IClassFactory
*
iface
,
IUnknown
*
punkOuter
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ClassFactory
*
This
=
(
ClassFactory
*
)
iface
;
ClassFactory
*
This
=
impl_from_IClassFactory
(
iface
)
;
HRESULT
ret
;
IUnknown
*
obj
;
...
...
@@ -153,7 +158,7 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
static
HRESULT
WINAPI
ClassFactory_LockServer
(
IClassFactory
*
iface
,
BOOL
fLock
)
{
ClassFactory
*
This
=
(
ClassFactory
*
)
iface
;
ClassFactory
*
This
=
impl_from_IClassFactory
(
iface
)
;
TRACE
(
"(%p)->(%x)
\n
"
,
This
,
fLock
);
...
...
@@ -179,7 +184,7 @@ static const IClassFactoryVtbl ClassFactoryVtbl = {
static
HRESULT
ClassFactory_Constructor
(
LPFNCONSTRUCTOR
ctor
,
LPVOID
*
ppvOut
)
{
ClassFactory
*
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ClassFactory
));
This
->
v
tbl
=
&
ClassFactoryVtbl
;
This
->
IClassFactory_iface
.
lpV
tbl
=
&
ClassFactoryVtbl
;
This
->
ref
=
1
;
This
->
ctor
=
ctor
;
*
ppvOut
=
This
;
...
...
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