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
fe65b83a
Commit
fe65b83a
authored
Aug 16, 2010
by
Mariusz Pluciński
Committed by
Alexandre Julliard
Aug 17, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: Add stub of IGameStatisticsMgr implementation.
parent
ef36c1fb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
0 deletions
+167
-0
Makefile.in
dlls/gameux/Makefile.in
+1
-0
factory.c
dlls/gameux/factory.c
+5
-0
gamestatistics.c
dlls/gameux/gamestatistics.c
+151
-0
gameux_private.h
dlls/gameux/gameux_private.h
+1
-0
regsvr.c
dlls/gameux/regsvr.c
+9
-0
No files found.
dlls/gameux/Makefile.in
View file @
fe65b83a
...
...
@@ -9,6 +9,7 @@ IMPORTS = uuid ole32 user32 advapi32
C_SRCS
=
\
factory.c
\
gameexplorer.c
\
gamestatistics.c
\
main.c
\
regsvr.c
...
...
dlls/gameux/factory.c
View file @
fe65b83a
...
...
@@ -131,6 +131,7 @@ static const struct IClassFactoryVtbl gameuxcf_vtbl =
};
static
gameuxcf
gameexplorercf
=
{
&
gameuxcf_vtbl
,
GameExplorer_create
};
static
gameuxcf
gamestatisticscf
=
{
&
gameuxcf_vtbl
,
GameStatistics_create
};
/***************************************************************
* gameux ClassFactory
...
...
@@ -148,6 +149,10 @@ HRESULT WINAPI DllGetClassObject(
{
cf
=
(
IClassFactory
*
)
&
gameexplorercf
.
lpVtbl
;
}
else
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_GameStatistics
))
{
cf
=
(
IClassFactory
*
)
&
gamestatisticscf
.
lpVtbl
;
}
if
(
!
cf
)
return
CLASS_E_CLASSNOTAVAILABLE
;
...
...
dlls/gameux/gamestatistics.c
0 → 100644
View file @
fe65b83a
/*
* Gameux library coclass GameStatistics implementation
*
* Copyright (C) 2010 Mariusz Pluciński
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "config.h"
#include "ole2.h"
#include "gameux.h"
#include "gameux_private.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
gameux
);
/*
* IGameStatisticsMgr implementation
*/
typedef
struct
_GameStatisticsMgrImpl
{
const
struct
IGameStatisticsMgrVtbl
*
lpVtbl
;
LONG
ref
;
}
GameStatisticsMgrImpl
;
static
inline
GameStatisticsMgrImpl
*
impl_from_IGameStatisticsMgr
(
IGameStatisticsMgr
*
iface
)
{
return
(
GameStatisticsMgrImpl
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
GameStatisticsMgrImpl
,
lpVtbl
));
}
static
HRESULT
WINAPI
GameStatisticsMgrImpl_QueryInterface
(
IGameStatisticsMgr
*
iface
,
REFIID
riid
,
void
**
ppvObject
)
{
GameStatisticsMgrImpl
*
This
=
impl_from_IGameStatisticsMgr
(
iface
);
TRACE
(
"%p %s %p
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObject
);
*
ppvObject
=
NULL
;
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IGameStatisticsMgr
)
)
{
*
ppvObject
=
iface
;
}
else
{
FIXME
(
"interface %s not implemented
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IGameStatisticsMgr_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
GameStatisticsMgrImpl_AddRef
(
IGameStatisticsMgr
*
iface
)
{
GameStatisticsMgrImpl
*
This
=
impl_from_IGameStatisticsMgr
(
iface
);
LONG
ref
;
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p): ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
GameStatisticsMgrImpl_Release
(
IGameStatisticsMgr
*
iface
)
{
GameStatisticsMgrImpl
*
This
=
impl_from_IGameStatisticsMgr
(
iface
);
LONG
ref
;
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ref=%d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
TRACE
(
"freeing GameStatistics object
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
}
static
HRESULT
STDMETHODCALLTYPE
GameStatisticsMgrImpl_GetGameStatistics
(
IGameStatisticsMgr
*
iface
,
LPCWSTR
GDFBinaryPath
,
GAMESTATS_OPEN_TYPE
openType
,
GAMESTATS_OPEN_RESULT
*
pOpenResult
,
IGameStatistics
**
ppiStats
)
{
FIXME
(
"stub (%p, %s, 0x%x, %p, %p)
\n
"
,
iface
,
debugstr_w
(
GDFBinaryPath
),
openType
,
pOpenResult
,
ppiStats
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
GameStatisticsMgrImpl_RemoveGameStatistics
(
IGameStatisticsMgr
*
iface
,
LPCWSTR
GDFBinaryPath
)
{
FIXME
(
"stub (%p, %s)
\n
"
,
iface
,
debugstr_w
(
GDFBinaryPath
));
return
E_NOTIMPL
;
}
static
const
struct
IGameStatisticsMgrVtbl
GameStatisticsMgrImplVtbl
=
{
GameStatisticsMgrImpl_QueryInterface
,
GameStatisticsMgrImpl_AddRef
,
GameStatisticsMgrImpl_Release
,
GameStatisticsMgrImpl_GetGameStatistics
,
GameStatisticsMgrImpl_RemoveGameStatistics
,
};
HRESULT
GameStatistics_create
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppObj
)
{
GameStatisticsMgrImpl
*
pGameStatistics
;
TRACE
(
"(%p, %p)
\n
"
,
pUnkOuter
,
ppObj
);
pGameStatistics
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pGameStatistics
)
);
if
(
!
pGameStatistics
)
return
E_OUTOFMEMORY
;
pGameStatistics
->
lpVtbl
=
&
GameStatisticsMgrImplVtbl
;
pGameStatistics
->
ref
=
1
;
*
ppObj
=
(
IUnknown
*
)(
&
pGameStatistics
->
lpVtbl
);
TRACE
(
"returning iface %p
\n
"
,
*
ppObj
);
return
S_OK
;
}
dlls/gameux/gameux_private.h
View file @
fe65b83a
...
...
@@ -19,3 +19,4 @@
*/
extern
HRESULT
GameExplorer_create
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppObj
);
extern
HRESULT
GameStatistics_create
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppObj
);
dlls/gameux/regsvr.c
View file @
fe65b83a
...
...
@@ -464,6 +464,15 @@ static struct regsvr_coclass const coclass_list[] = {
"gameux.GameExplorer.1"
,
"1.0"
,
},
{
&
CLSID_GameStatistics
,
"GameStatistics Class"
,
NULL
,
"gameux.dll"
,
"Apartment"
,
"gameux.GameStatistics.1"
,
"1,0"
,
},
{
NULL
}
/* list terminator */
};
...
...
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