Mariusz Pluciński : gameux: Add UninstallGame implementation.
Alexandre Julliard
julliard at winehq.org
Thu Sep 16 14:09:05 CDT 2010
Module: wine
Branch: master
Commit: 95a9bc043e842a003234b8342fff11e91b555ed4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=95a9bc043e842a003234b8342fff11e91b555ed4
Author: Mariusz Pluciński <vshader at gmail.com>
Date: Thu Sep 16 13:55:34 2010 +0200
gameux: Add UninstallGame implementation.
---
dlls/gameux/gameexplorer.c | 18 ++++++++++++++++--
dlls/gameux/tests/gameexplorer.c | 4 ++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/gameux/gameexplorer.c b/dlls/gameux/gameexplorer.c
index 66173f2..1816ebd 100644
--- a/dlls/gameux/gameexplorer.c
+++ b/dlls/gameux/gameexplorer.c
@@ -991,9 +991,23 @@ static HRESULT WINAPI GameExplorer2Impl_UninstallGame(
IGameExplorer2 *iface,
LPCWSTR binaryGDFPath)
{
+ HRESULT hr;
+ GUID instanceId;
GameExplorerImpl *This = impl_from_IGameExplorer2(iface);
- FIXME("stub (%p, %s)\n", This, debugstr_w(binaryGDFPath));
- return E_NOTIMPL;
+ TRACE("(%p, %s)\n", This, debugstr_w(binaryGDFPath));
+
+ if(!binaryGDFPath)
+ return E_INVALIDARG;
+
+ hr = GAMEUX_FindGameInstanceId(binaryGDFPath, GIS_CURRENT_USER, &instanceId);
+
+ if(hr == S_FALSE)
+ hr = GAMEUX_FindGameInstanceId(binaryGDFPath, GIS_ALL_USERS, &instanceId);
+
+ if(hr == S_OK)
+ hr = GAMEUX_RemoveRegistryRecord(&instanceId);
+
+ return hr;
}
static const struct IGameExplorer2Vtbl GameExplorer2ImplVtbl =
diff --git a/dlls/gameux/tests/gameexplorer.c b/dlls/gameux/tests/gameexplorer.c
index 4fc432b..9ce0e39 100644
--- a/dlls/gameux/tests/gameexplorer.c
+++ b/dlls/gameux/tests/gameexplorer.c
@@ -646,10 +646,10 @@ void test_install_uninstall_game(void)
_validateGameRegistryKey(__LINE__, GIS_CURRENT_USER, &guid, &applicationId, sExePath, sExeName, TRUE);
hr = IGameExplorer2_UninstallGame(ge2, sExeName);
- todo_wine ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame failed (error 0x%08x)\n", hr);
+ ok(SUCCEEDED(hr), "IGameExplorer2::UninstallGame 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);
IGameExplorer2_Release(ge2);
}
More information about the wine-cvs
mailing list