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
bb9a6ea2
Commit
bb9a6ea2
authored
Sep 07, 2010
by
Mariusz Pluciński
Committed by
Alexandre Julliard
Sep 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: IGameExplorer::RemoveGame implementation.
parent
9b7347b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
+35
-6
gameexplorer.c
dlls/gameux/gameexplorer.c
+31
-2
gameexplorer.c
dlls/gameux/tests/gameexplorer.c
+4
-4
No files found.
dlls/gameux/gameexplorer.c
View file @
bb9a6ea2
...
...
@@ -480,6 +480,36 @@ static HRESULT GAMEUX_ParseGDFBinary(struct GAMEUX_GAME_DATA *GameData)
return
hr
;
}
/*******************************************************************
* GAMEUX_RemoveRegistryRecord
*
* Helper function, removes registry key associated with given game instance
*/
static
HRESULT
GAMEUX_RemoveRegistryRecord
(
GUID
*
pInstanceID
)
{
HRESULT
hr
;
LPWSTR
lpRegistryPath
=
NULL
;
TRACE
(
"(%s)
\n
"
,
debugstr_guid
(
pInstanceID
));
/* first, check is game installed for all users */
hr
=
GAMEUX_buildGameRegistryPath
(
GIS_ALL_USERS
,
pInstanceID
,
&
lpRegistryPath
);
if
(
SUCCEEDED
(
hr
))
hr
=
HRESULT_FROM_WIN32
(
RegDeleteKeyExW
(
HKEY_LOCAL_MACHINE
,
lpRegistryPath
,
0
,
0
));
HeapFree
(
GetProcessHeap
(),
0
,
lpRegistryPath
);
/* if not, check current user */
if
(
FAILED
(
hr
))
{
hr
=
GAMEUX_buildGameRegistryPath
(
GIS_CURRENT_USER
,
pInstanceID
,
&
lpRegistryPath
);
if
(
SUCCEEDED
(
hr
))
hr
=
HRESULT_FROM_WIN32
(
RegDeleteKeyExW
(
HKEY_LOCAL_MACHINE
,
lpRegistryPath
,
0
,
0
));
HeapFree
(
GetProcessHeap
(),
0
,
lpRegistryPath
);
}
return
hr
;
}
/*******************************************************************************
* GAMEUX_RegisterGame
*
...
...
@@ -628,8 +658,7 @@ static HRESULT WINAPI GameExplorerImpl_RemoveGame(
GameExplorerImpl
*
This
=
impl_from_IGameExplorer
(
iface
);
TRACE
(
"(%p, %s)
\n
"
,
This
,
debugstr_guid
(
&
instanceID
));
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
return
GAMEUX_RemoveRegistryRecord
(
&
instanceID
);
}
static
HRESULT
WINAPI
GameExplorerImpl_UpdateGame
(
...
...
dlls/gameux/tests/gameexplorer.c
View file @
bb9a6ea2
...
...
@@ -446,10 +446,10 @@ static void test_add_remove_game(void)
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
TRUE
);
hr
=
IGameExplorer_RemoveGame
(
ge
,
guid
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"IGameExplorer::RemoveGame failed (error 0x%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IGameExplorer::RemoveGame failed (error 0x%08x)
\n
"
,
hr
);
}
todo_wine
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
FALSE
);
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
FALSE
);
/* try to register game with empty guid */
...
...
@@ -464,10 +464,10 @@ static void test_add_remove_game(void)
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
TRUE
);
hr
=
IGameExplorer_RemoveGame
(
ge
,
guid
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"IGameExplorer::RemoveGame failed (error 0x%08x)
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"IGameExplorer::RemoveGame failed (error 0x%08x)
\n
"
,
hr
);
}
todo_wine
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
FALSE
);
_validateGameRegistryKey
(
__LINE__
,
GIS_CURRENT_USER
,
&
guid
,
&
applicationId
,
sExePath
,
sExeName
,
FALSE
);
}
/* free allocated resources */
...
...
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