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
6b35b5dd
Commit
6b35b5dd
authored
Nov 04, 2010
by
Pluciński Mariusz
Committed by
Alexandre Julliard
Nov 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: Add implementation of IGameStatistics::GetStatistic.
parent
ff9e31a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
20 deletions
+61
-20
gamestatistics.c
dlls/gameux/gamestatistics.c
+43
-2
gamestatistics.c
dlls/gameux/tests/gamestatistics.c
+18
-18
No files found.
dlls/gameux/gamestatistics.c
View file @
6b35b5dd
...
...
@@ -839,8 +839,49 @@ static HRESULT WINAPI GameStatisticsImpl_GetStatistic(
LPWSTR
*
pName
,
LPWSTR
*
pValue
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
HRESULT
hr
=
S_OK
;
LONG
nLength
;
GameStatisticsImpl
*
This
=
impl_from_IGameStatistics
(
iface
);
TRACE
(
"%p, %d,%d, %p, %p
\n
"
,
This
,
categoryIndex
,
statIndex
,
pName
,
pValue
);
if
(
!
pName
||
!
pValue
)
return
E_INVALIDARG
;
*
pName
=
NULL
;
*
pValue
=
NULL
;
if
(
categoryIndex
>=
MAX_CATEGORIES
||
statIndex
>=
MAX_STATS_PER_CATEGORY
)
hr
=
E_INVALIDARG
;
if
(
SUCCEEDED
(
hr
))
{
nLength
=
lstrlenW
(
This
->
stats
.
categories
[
categoryIndex
].
stats
[
statIndex
].
sName
);
if
(
nLength
!=
0
)
{
*
pName
=
CoTaskMemAlloc
(
sizeof
(
WCHAR
)
*
(
nLength
+
1
));
if
(
!
(
*
pName
))
hr
=
E_OUTOFMEMORY
;
else
lstrcpyW
(
*
pName
,
This
->
stats
.
categories
[
categoryIndex
].
stats
[
statIndex
].
sName
);
}
}
if
(
SUCCEEDED
(
hr
))
{
nLength
=
lstrlenW
(
This
->
stats
.
categories
[
categoryIndex
].
stats
[
statIndex
].
sValue
);
if
(
nLength
!=
0
)
{
*
pValue
=
CoTaskMemAlloc
(
sizeof
(
WCHAR
)
*
(
nLength
+
1
));
if
(
!
(
*
pValue
))
hr
=
E_OUTOFMEMORY
;
else
lstrcpyW
(
*
pValue
,
This
->
stats
.
categories
[
categoryIndex
].
stats
[
statIndex
].
sValue
);
}
}
TRACE
(
"returning pair; %s => %s
\n
"
,
debugstr_w
(
*
pName
),
debugstr_w
(
*
pValue
));
return
hr
;
}
static
HRESULT
WINAPI
GameStatisticsImpl_SetStatistic
(
...
...
dlls/gameux/tests/gamestatistics.c
View file @
6b35b5dd
...
...
@@ -367,44 +367,44 @@ static void test_gamestatisticsmgr( void )
CoTaskMemFree
(
lpName
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
0
,
0
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic00
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue00
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic00
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue00
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
0
,
1
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic01
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue01
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic01
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue01
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
1
,
0
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic10
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue10
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic10
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue10
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
1
,
1
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic11
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue11
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic11
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue11
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
2
,
0
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic20
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue20
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic20
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue20
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
hr
=
IGameStatistics_GetStatistic
(
gs
,
2
,
1
,
&
lpName
,
&
lpValue
);
todo_wine
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sStatistic21
)
==
0
,
"getting statistic returned invalid name
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpValue
,
sValue21
)
==
0
,
"getting statistic returned invalid value
\n
"
);
ok
(
hr
==
S_OK
,
"getting statistic failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sStatistic21
)
==
0
,
"getting statistic returned invalid name
\n
"
);
ok
(
lstrcmpW
(
lpValue
,
sValue21
)
==
0
,
"getting statistic returned invalid value
\n
"
);
CoTaskMemFree
(
lpName
);
CoTaskMemFree
(
lpValue
);
...
...
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